How do I install both Firefox beta and Minefield on the same machine?

Install the Firefox beta as you normally would (with apt-get or dpkg), then do the following steps to install Minefield and create a custom shortcut for it (minefield):

Download the .tar.bz2 file from the Firefox Nightly Builds site. Extract the files into a directory of your choice (I'll just use /opt):

sudo tar xvfj firefox-4.0b9pre.en-US.linux-i686.tar.bz2 -C /opt

Minefield should now be installed in /opt/firefox. Now, let's create a custom command for it:

sudo tee /usr/bin/minefield <<EOF
#!/bin/bash
/opt/firefox/firefox "\$@"
EOF

...and make the script executable:

sudo chmod a+x /usr/bin/minefield

You should now be able to run the command minefield to start Minefield.

Uninstallation:

If you want to uninstall Minefield (when it was installed using the above method), simply do the following:

sudo rm -rf /opt/firefox /usr/bin/minefield

Regarding updates:
I am not quite sure, but I think Minefield has an auto-update feature (it at least have an updater program, which should be located at /opt/firefox/updater), so you shouldn't have to worry too much about it.


tar: Backing up an encrypted /home folder?

From the ecryptfs man page, try to mount it somewhere as a regular folder, and then execute your tar command.

sudo -i
mkdir /mnt/usermount 2>/dev/null
cd /
mount -t ecryptfs /home/user /mnt/usermount -o passwd=<your_pass_phrase> no_sig_cache
tar -cvpzf sysbackup-20110821.tar.gz \
  --exclude=/sysbackup-20110821.tar.gz \
  --exclude=/proc \
  --exclude=/lost+found \
  --exclude=/sys \
  --exclude=/media \
  --exclude=/dev /
umount /mnt/usermount
rm -rf /mnt/usermount

Note above that I removed the --exclude /mnt and also created the directory /mnt/usermount just in case you don't have it.


Does apparmor in enforce mode still logs?

Yes apparmor in enforce mode logs to /var/log/syslog
You can watch for any changes:

tail -f /var/log/syslog | grep -i apparmor


gnome 3 right click compress option missing

I installed xarchiver ,i logged out and logged in and then it appeared.


Focus a window without bringing the window forward

You can change the focusing habit of windows in Ubuntu like this

First got to:

System -> Preferences -> Windows

Then Check "Select windows when the mouse moves over them"

Make sure "Raise selected windows after an interval" is deselected.

Hope this helps.


Using alias to change ls to ls-l changes(or disables) the colors of ls output

After searching more, I found about the --color option so I used this:

alias ls="ls -l --color" and it worked fine!


First you need to own the David font and for that, you need to buy it. You can buy the fonts here https://www.fonts.com/font/masterfont/david

David font also comes pre-installed with Windows. https://www.microsoft.com/typography/fonts/font.aspx?FMID=1884

After you grab the fonts, copy them to ~/.local/share/fonts directory. Abiword should be able to see the fonts then.


How to set my Bluetooth python script on higher priority than Ubuntu's request?

Finally I was able to solve that problem!

Kill the Bluetooth-Applet:

sudo killall bluetooth-applet

For PIN-Pairing set sspmode to 0:

sudo hciconfig hci0 sspmode 0

I opened the simple-agent, so you can edit the code if you want to:

sudo -H gedit /usr/local/bin/simple-agent

Start simple-agent:

su -c /usr/local/bin/simple-agent


If your main objective is to avoid using the mouse, this script allows for a keyboard shortcut to move the windows between monitors. It works great for me on my triple monitor setup. Then you can assign a keyboard shortcut to tile after moving to a new monitor.

Download the script below. Save under ~/bin/
Make it executable: chmod +x ~/bin/move-to-next-monitor

Source: https://github.com/jc00ke/bin/blob/master/move-to-next-monitor. Thanks to jc00ke!

#!/bin/sh
#
# Move the current window to the next monitor.
#
# Also works only on one X screen (which is the most common case).
#
# Props to
# http://icyrock.com/blog/2012/05/xubuntu-moving-windows-between-monitors/
#
# Unfortunately, both "xdotool getwindowgeometry --shell $window_id" and
# checking "-geometry" of "xwininfo -id $window_id" are not sufficient, as
# the first command does not respect panel/decoration offsets and the second
# will sometimes give a "-0-0" geometry. This is why we resort to "xwininfo".
# Make sure your largest monitor is set to Primary display.

screen_width=`xdpyinfo | awk '/dimensions:/ { print $2; exit }' | cut -d"x" -f1`
screen_height=`xdpyinfo | awk '/dimensions:/ { print $2; exit }' | cut -d"x" -f2`
display_width=`xdotool getdisplaygeometry | cut -d" " -f1`
display_height=`xdotool getdisplaygeometry | cut -d" " -f2`
window_id=`xdotool getactivewindow`

# Remember if it was maximized.
window_state=`xprop -id $window_id _NET_WM_STATE | awk '{ print $3 }'`

# Un-maximize current window so that we can move it
wmctrl -ir $window_id -b remove,maximized_vert,maximized_horz

# Read window position
x=`xwininfo -id $window_id | awk '/Absolute upper-left X:/ { print $4 }'`
y=`xwininfo -id $window_id | awk '/Absolute upper-left Y:/ { print $4 }'`

# Subtract any offsets caused by panels or window decorations
x_offset=`xwininfo -id $window_id | awk '/Relative upper-left X:/ { print $4 }'`
y_offset=`xwininfo -id $window_id | awk '/Relative upper-left Y:/ { print $4 }'`
x=`expr $x - $x_offset`
y=`expr $y - $y_offset`

# Compute new X position
new_x=`expr $x + $display_width`
# Compute new Y position
new_y=`expr $y + $display_height`

# If we would move off the right-most monitor, we set it to the left one.
# We also respect the window's width here: moving a window off more than half its width won't happen.
width=`xdotool getwindowgeometry $window_id | awk '/Geometry:/ { print $2 }'|cut -d"x" -f1`
if [ `expr $new_x + $width / 2` -gt $screen_width ]; then
  new_x=`expr $new_x - $screen_width`
fi

height=`xdotool getwindowgeometry $window_id | awk '/Geometry:/ { print $2 }'|cut -d"x" -f2`
if [ `expr $new_y + $height / 2` -gt $screen_height ]; then
  new_y=`expr $new_y - $screen_height`
fi

# Don't move off the left side.
if [ $new_x -lt 0 ]; then
  new_x=0
fi

# Don't move off the bottom
if [ $new_y -lt 0 ]; then
  new_y=0
fi

# Move the window
xdotool windowmove $window_id $new_x $new_y

# Maintain if window was maximized or not
if [ "${window_state}" = "_NET_WM_STATE_MAXIMIZED_HORZ," ]; then
    wmctrl -ir $window_id -b add,maximized_vert,maximized_horz
fi

If not already installed, install xdotool and wmctrl: sudo apt-get install xdotool wmctrl
Next assign a keyboard shortcut for the script under Keyboard > Application Shortcuts. (I use Alt+Right. Then to tile right I use Ctrl+Alt+Right and to tile left Ctrl+Alt+Left. Window tiling keyboard shortcuts are under Window Manager.)
Source: http://makandracards.com/makandra/12447-how-to-move-a-window-to-the-next-monitor-on-xfce-xubuntu

For different size monitors
I have a 1920x1080 center monitor and two 1440x900 side monitors.

display_width=`xdotool getdisplaygeometry | cut -d" " -f1`
display_height=`xdotool getdisplaygeometry | cut -d" " -f2`

The above two commands output the dimensions of my largest monitor even if the window happens to be on a side monitor. Therefore the script always moved the window according to these dimensions. This caused the script to not always move to the next monitor, but sometimes it would move to the previous monitor. I took my overall screen width (4800) and divided it by three. Now it always moves to the next monitor.

display_width="1600"
display_height=`xdotool getdisplaygeometry | cut -d" " -f2`


Here exists better solution - you can user AppImage from official site, it has newer 3.0.1 version:

cd ~/Downloads
wget http://staruml.io/download/releases/StarUML-3.0.1-x86_64.AppImage
chmod +x StarUML-3.0.1-x86_64.AppImage
./StarUML-3.0.1-x86_64.AppImage

About exact 2.8.1 version - I tested the solution below (based on this answer) and my ideas.

#1. download StarUML package and its dependencies
cd ~/Downloads
wget https://s3.amazonaws.com/staruml-bucket/releases-v2/StarUML-v2.8.1-64-bit.deb
wget https://launchpad.net/ubuntu/+archive/primary/+files/libgcrypt11_1.5.3-2ubuntu4.2_amd64.deb
sudo dpkg -i libgcrypt11_1.5.3-2ubuntu4.2_amd64.deb
wget http://ftp.us.debian.org/debian/pool/main/u/udev/libudev0_175-7.2_amd64.deb
sudo dpkg -i libudev0_175-7.2_amd64.deb

#2. install StarUML dependencies but without `libcurl3`
sudo apt-get install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 \
libcups2 libdbus-1-3 libexpat1 libfontconfig1 libfreetype6 libgcc1 \
libgconf-2-4 libgcrypt11 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk2.0-0  \
libnspr4 libnss3 libpango1.0-0 libstdc++6 libudev0 libx11-6 libxcomposite1  \
libxdamage1 libxext6 libxfixes3 libxrandr2 libxrender1 ca-certificates \
lsb-base xdg-utils wget

#3. create folder for locally installed Software and StarUML
mkdir ~/Software ; cd ~/Software
mkdir StarUML ; cd StarUML

#3.1. extract StarUML here
dpkg -x ~/Downloads/StarUML-v2.8.1-64-bit.deb .

#3.2. add this folder to the PATH variable in ~/.bashrc
echo "PATH=$PATH:/home/$USER/Software/StarUML/opt/staruml" >> ~/.bashrc
source ~/.bashrc

#3.3. edit launcher file to reflect the path and add it to menu
cd opt/staruml/
sed -i "s/^Exec=\/opt\/staruml\/staruml\ %U/Exec=\/home\/$USER\/Software\/StarUML\/opt\/staruml\/staruml %U/" staruml.desktop
sed -i "s/^Icon=staruml/Icon=\/home\/$USER\/Software\/StarUML\/usr\/share\/icons\/hicolor\/scalable\/apps\/staruml.svg/" staruml.desktop
chmod +x staruml.desktop
mkdir -p ~/.local/share/applications/
ln -s /home/$USER/Software/StarUML/opt/staruml/staruml.desktop ~/.local/share/applications/staruml.desktop

When all these steps done you will be able to launch application from dash by StarUML shortcut or from terminal with staruml command.


Part-1:

See if the following steps help:

sudo dpkg-reconfigure $(dpkg -l | grep indicator-sound | awk '{print $2}' | tr '\n' ' ')
sudo update-initramfs -u

Reboot the system.

Still no sound indicator? Then try reinstalling it:

sudo apt-get -f install --reinstall indicator-sound indicator-sound-gtk2

Reboot the system.

Original answer here: https://askubuntu.com/a/363369/298860

Part-2: (Update)

sudo apt-get remove --purge alsa-base
sudo apt-get remove --purge pulseaudio
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo reboot

Then ...

sudo apt-get install alsa-base
sudo apt-get install pulseaudio
sudo alsa force-reload
sudo reboot

If one reboot doesn't do the trick, reboot a couple of times! (No, seriously!)


How can I hide an icon related to a mount point. Question about "x-gvfs-show"

x-gvfs-hide is the option you want to hide the icon. In etc/fstab, you add it to the existing options, as in
/mnt/data/.localfiles/ziko-locals/snap   /home/ziko/snap   none   defaults,bind,x-gvfs-hide   0 0

Actually, defaults could optionally be removed: it is only used as a placeholder if no specific options are provided.


Static ordering of keyboard layout switching in Ubuntu 17.10 and later with GNOME 3

As a workaround you may set an alternative keyboard shortcut like alt+shift to switch between keyboard layouts (see this question for reference: Ubuntu 17.10 can't change the input switching shortcut to alt+shift).

This shortcut should obey the "static ordering" you're looking for.

A feature request has been filed by OP here.


How can I empty the trash using terminal?

You can use the rm command:

rm -rf ~/.local/share/Trash/*

The rm command removes (deletes) files or directories.

-f, --force     Ignore nonexistant files, and never prompt before removing.
-r, -R, --recursive     Remove directories and their contents recursively.

The trash folder is found at: $HOME/.local/share/Trash

Be careful how you use the rm command - the files aren't sent to a trash can where you can undelete them, so it's not easy to undo.


How to resolve my problem with installing r-base?

Try this

sudo apt update
sudo apt list --upgradable

Then

sudo apt install r-base


Wireless driver not loading after changing ownership of /usr/lib. How can I restore default ownership?

I'm new to ubuntu (installed it on a flash drive today) but I think the best option is try to back up your data (the live DVD or USB may be helpful) and then perform a format and re-install your ubuntu.


How do I view non matching files only in fdupes?

I've been thinking about adding this option to rmlint for a while (but nobody had asked for it until now).  I've created a test branch which now has this option (https://github.com/SeeSpotRun/rmlint/tree/feature/uniques).

If you want to try it out, you will need to install as follows:

Install dependencies if you don't already have them:

$ sudo apt-get install git scons python3-sphinx python3-nose gettext build-essential
$ sudo apt-get install libelf-dev libglib2.0-dev libblkid-dev libjson-glib-1.0 libjson-glib-dev

Grab the test branch source:

$ cd ~
$ git clone -b feature/uniques https://github.com/SeeSpotRun/rmlint.git
$ cd rmlint/

Compile and (optionally) install:

$ scons config
$ scons DEBUG=1 -j4
$ sudo scons DEBUG=1 -j4 --prefix=/usr install
$ # (if you skip the install step then replace 'rmlint' with './rmlint' below)

Find unique files (will not delete anything):

$ # this will display unique files on your screen:
$ rmlint -o uniques path/to/your/files
$ # or use either of the following to write a list of unique files to unique.txt:
$ rmlint -o uniques:unique.txt path/to/your/files
$ rmlint -o uniques path/to/your/files > unique.txt

If you want a list of files in dir2 that don't have a twin in dir1 you can tag dir2 using // as a separator and add -k (or --keep-all-tagged) to the command:

$ rmlint -k -o uniques dir1 // dir2

(Note that if there are two identical files in dir2, but they don't have a copy in dir1, they will still get listed as "unique" in the last example)

Let us know how it went.
Any problems or suggestions either reply here or at our issues log

Be aware that in the above examples, if you have two files with different names but the same content, they will not be flagged as unique.  If you do want them to be flagged as unique, add -b or --match-basename to the command line.

Regarding md5 sums etc: rmlint uses SHA-1 by default, which is about 4 billion times stronger than md5.  You can upgrade this to SHA-512 by adding -p to the command line, or you can do a byte-by-byte comparison instead by adding -pp (although this chews up a bit more RAM).


Getting 'Error saving the document...due to insufficient user rights.'

Likely, the issue is caused because your ntfs volume is not "clean", i.e., has not been properly closed. This is, among other possibilities, the case if Windows is set to shut down and start fast. For this reason, you should always fully close down Windows if you intent to use the same ntfs partition with another operating system such as Ubuntu.

Ubuntu by default will not mount an unclean ntfs volume. As you specified errors=remount-ro in your fstab file, the volume will also be mounted when an error occurs, however as a read-only volume.

Resolution:

Boot into Windows, have the ntfs volume checked by the Windows disk checking tools.
Turn "Faststart" off in Windows. Then, Windows will always fully close the volume when shutting down, so it is left in a "clean" state for Ubuntu to use it.
Always shut down Windows completely (i.e., no hibernate or sleep state).


lowlatency kernel in 17.10 put machine in unusable state

I'm pretty much just guessing here, but it's possible that your system can only boot when certain kernel modules are loaded that are not supplied with the kernel. Then they have to be built using dkms, but this only works if you have the corresponding linux-headers-4.13.0-16-lowlatency package installed. When you install that package, the appropriate kernel modules will automatically be built for you.

In general the headers package should always be installed when an image is installed, but for some reason this does not always automatically happen.


Skype  shuts down when the other person tries sharing their screen

The find command should do the trick:

find ~/ -iname "Shared.xml"

If you can't find it there, you can try searching from the root of the filesystem, but this will take longer:

find / -iname "Shared.xml"


Wanted to install to external SSD, made a big mess

Basically, for UEFI installs, the installer puts grub on the first EFI it sees, on the internal disk, but the grub files are on the SDD, so boot fails without the SDD.  See launchpad bugs 1173457,1396379, and add yourself to the "Does this affect me" list.
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1396379
https://bugs.launchpad.net/ubuntu/+source/ubiquity/+bug/1173457
If you have an EFI partition on the SDD, simply copy everything from the internal disk's EFI to the SDD's EFI.  Then it should boot on other machines by selecting the device as the boot device.  To fix the internal disk, just reorder the first boot choice to be the original Windows selection (so grub does not even run).  The internal device default bootloader, /EFI/Boot/bootx64.efi was probably replaced by a copy of grub, but the original was renamed to bkp.... You may change it back, but the device bootloader normally would not even be used if you are booting off an nvram selection.
You can successfully run grub directly and put it where you want it, grub works, it's just the installer that ignores your choice and puts it on the first EFI it sees.

Removing the internal hdd, either physically or via BIOS settings is the easiest way to get the installer to do the right thing.  You should be able to temporarily remove the EFI flag on the internal disk, and restore it after the instal --  that might work, as might running the install from the "Try" desktop, and in a terminal, unmount the unwanted hdd EFI, and remount the sdd's EFI (if you made the SDD's EFI in advance).  The EFI partition just has a FAT filesystem, and the bootloaders are just files, so no special tools needed to slip binary blobs between partitions like under a legacy install.


Error while creating qcow2 file using qemu-img

First try to install this library if not exists:

sudo apt-get install librbd1

then try you qemu-img command. If failed find the library location:

sudo find / -name  librbd.so.1

make a symlink to it

ln -s /usr/lib/librbd.so.1 /path/to/your/librd.so.1

then execute qemu-img again


I think df is getting thrown by the lack of specified device. If you look with mount, you'll see that the filesystem is definitely tmpfs.

$ df -h | grep run
tmpfs                          4.8G  1.4M  4.8G   1% /run
none                           5.0M     0  5.0M   0% /run/lock
none                            12G  4.9M   12G   1% /run/shm
none                           100M  8.0K  100M   1% /run/user

$ mount | grep run
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
rpc_pipefs on /run/rpc_pipefs type rpc_pipefs (rw)

I would guess that because tmpfs is a ram-disk that you don't actually need to specify a block level object to "mount".

I would certainly welcome people correct me if that assumption is incorrect but for your case there is nothing to worry about. They're not missing, they're just mounted funny... And that just happens to be the way all my Ubuntu computers here are also set up. Panic not.


deb package are not able to install in Ubuntu 10.10

I think you have selected a wrong distribution as 64bit instead of 32bit.If your system is 64bit and you installed the same iso, then try to download and install .deb package for 64bit.


How do i use XDM to download youtube videos on 16.04LTS?

Videos are stored in the server which youtube connects to load the video. To download the video, you have to enter the URL of the server where the actual video is stored.
You can get the address of the original video using addons like flashgot.
Here, I'm going to explain How to download youtube videos using uget (you can choose your integration with XDM) and flashgot.
Goto youtube.com and find you video.

On top right corner you will see flashgot icon.
If you want to download hd720p/mp4 it's first, whereas hd1080p/mp4 is sixth. It is important to remember the number.
After you click on the shown icon it will give the following dialog
Choose Mark None and select the number you wished to download. Mine was hd720p/mp4 (i.e.1).
Hit OK and you are good to go.


How do I create an Ubuntu installation disk on Windows to install on my new computer?

all you need to do is:

Download an ISO for Ubuntu from this link: http://www.ubuntu.com/download/desktop
Then you want to burn that ISO to a disc or USB drive, for windows I'd use Rufus for USB burning: https://rufus.akeo.ie/ this will also format the usb drive for you.
Make sure you checkmark the "Make Bootable" checkbox so that you can boot of the USB Drive.
Insert the USB Drive into your other computer. Reboot it, and spam the F12 button to bring up the boot menu
Select your USB drive to boot off of it.
Follow this link for instructions on installing it on your other computer: https://help.ubuntu.com/community/Installation


Ok, I finally found solution. I have broken source.list. I regenerate new one here:

https://repogen.simplylinux.ch/

And replace at /etc/apt/


I have Ubuntu Mate 18.10, which sudo should I install, 18.04 or 20.04?

Ubuntu 18.10 went end of life on 19 July 2019 and so is offtopic here, and is also a really bad idea to be running as it doesn't receive security updates, as you have noticed.
It would not be a good idea to forcibly install a sudo package from another version of Ubuntu. You would be better off:

uninstalling sudo;
recompiling the sudo source package for 18.10 with the fix applied; or
downloading the upstream sudo source, compiling it and replacing your system sudo with that one.

But upgrading to a supported release is a better idea than all of the above.


Static IP address changed to another static IP address. What needs to be changed?

Checklist:

Firewall: if you've put a firewall rule in which denies all traffic which where not designated for your IP, you need to change that.
Interfaces file: Change the static IP in /etc/network/interfaces. This file is re-read when the network connection is set up again.
ProFTPd: the address on which ProFTPd is listening on
Apache: the address on which Apache is listening on. Also check your virtual host settings like <VirtualHost 1.2.3.4> and NameVirtualHost 1.2.3.4.
MySQL: check the address it's listening on. Usually, this is set to listen on all addresses.
DNS: all records which point to your IP.
To make sure you did not forget anything, search all files on your server for the old IP address using:

sudo grep -HrnF '1.2.3.4' /

This command shows every occurence of the IP address 1.2.3.4 as filename:line: line with 1.2.3.4.


May I speak with someone about these applications for a grant proposal I am writing?

Judi!  Most on here would applaud your efforts to expand the knowledge of alternative operating systems.

Unfortunately, this is primarily a user-based 'support' forum, and it would probably be more fruitful for you to contact Canonical, the company behind designing Ubuntu, or, alternatively, the Edubuntu team (within Canonical) directly instead.  It may be beneficial to work with both, to some degree.

Here is the respective organization's contact pages, which may be of more direct help getting straight to the vendor instead:

http://www.canonical.com/about-canonical/contact


Cannot compile an opencv source file (C++) using 'pkg-config --cflags --libs opencv'

To get the output from a command inserted into another command, use $(...) syntax.

g++ facedetect.cpp -o facedetect $(pkg-config --cflags --libs opencv)


Virtualbox riddle: "FATAL: No bootable medium found! System halted."

Open the virtual machine settings, check the boot order (in the "System" tab) and check that there is a live CD or bootable virtual disk (in the "Storage" tab).

Chances are you have used a Live CD, which ejected itself from the virtual drive on shutdown (as it would typically do on real hardware).

The message has nothing to do with the mounts, which are reset when Linux is shut down.


Only view the CPU temperature from command `sensors`

You can process the output of sensors command with grep and/or cut to format it the way you want.

To get only the line reporting the CPU temperature you can use this (including the high and critical limits):

sensors | grep -A 0 'CPU T'

The following will give you only the temperature (with the °C suffix) :

sensors | grep -A 0 'CPU T' | cut -c18-25

This will give the output as you indicated at the end of your question:

sensors | grep -A 0 'CPU T' | cut -c1-25


Installing Ubuntu on a new harddrive next to Windows 7 on SSD and raid 0 configurated drives

I managed to fix this by doing the following.

Just to make sure I backed up everything on the Raid 0 drives!

I physically detached the Raid 0 drives. Only the SDD and the new HDD were now connected.
I reinstalled Ubuntu on the new hard disk.
Rebooted and in the BIOS set the new HDD as primary boot.
Now I got the GRUB2 menu. Checked if I could still boot into Windows: no problem.
After that I booted into Ubuntu and I ran all updates available and shut down the system.
Reconnected the Raid 0 drives.
Booted up, ended up in GRUB2 menu like it should. I can now boot into both Ubuntu and Windows using the GRUB2 menu.

Unfortunately I can't see the Raid 0 drive yet in Ubuntu, but this can probably get fixed easily.

Thanks for the help everyone.


I realise this is old, but for anyone that view's this question, you can't run Hyper-V manager on anything but a Windows machine, either Windows 10 or Windows Server. You can however install Windows Admin Center and manager not only Hyper-V but other OS functionality via a web interface.
https://docs.microsoft.com/en-us/windows-server/manage/windows-admin-center/overview


Just select the region of text in the Terminal.
Right click on it.
Select Copy.
Right click on Askubuntu question area.
Select Paste.

Also you can use Ctrl+Shift+C to copy and Ctrl+Shift+V to paste

** You can also Paste it at pastebin.ubuntu.com and put the link at askubuntu question.

** Also you can use the application pastebinit to send the terminal output directly to the pastebin.ubuntu.com

sudo apt-get install pastebinit


Error while updating Ubuntu - The package system is broken

if you have synaptic package manager

here you can disable/enable repositories


Ubuntu 14.04 on Apple Macbook Air late 2010, 3-2 - installation not possible

Short answer: the guide for 13.04 also applies for 14.04

Longer answer: Apple does not let you boot any non Mac operating system from USB on the 2010 version of the Air. The easiest (and safest) way is booting from a SuperDrive. I tried booting the Ubuntu installation disk from an additional partition on my harddisk similar to this description, but probably corrupted my boot partition in the progress. This turned out to be worse than expected, because it's not easy to boot a 2010 MacBook Air from any other medium than the harddisk in a scenario like this. That said, I'm sure I made a mistake and it should be possible to install Ubuntu that way. If you try, just be sure to know what you're doing. If you have access to an Apple SuperDrive, make your life a lot easier by using this option!

I finally installed Ubuntu without any problems from a DVD via a SuperDrive (I did not use the "try"-option, just installed it to a separate partition created in Mac OS Disk Manager before).

@user275168: Check the Ubuntu installation guide for 13.04 for information on how to fix the graphics driver on the MacBook Air 2010. You need to get the proprietary version of the driver from Nvidia. I installed it and everything works like a charm ever since.


How can I set my lamp server into a static ip address of 10.10.0.23?

The IP address you use has to agree with the subnet on your router. So first you need to change your routers subnet. 10.253.0.* is more common for local networks, but you can get away with 10.10.0.* . You are also using a huge subnet mask, while you can use a netmask this large, there is no need to.

A better configuration would be:

address 10.10.0.23
netmask 255.255.255.0
network 10.10.0.0
broadcast 10.10.0.255
gateway 10.10.0.1

You will have to define a similar configuration at your router. Make sure the static IP is outside the range of your routers DHCP range.

Edit: Just noticed you mentioned Virtual Box. This answer still might be useful, but instead of 'router', the changes will be configured in virtual box. I'm not great with virtual box so I don't know the specifics.


Here is the Ubuntu official guide to automounting USB:

https://help.ubuntu.com/community/Mount/USB

If you have Ubuntu 10.04 Lucid Lynx, maybe you can take a look at this guide here:

http://www.webupd8.org/2010/05/fix-usb-devices-automount-not-working.html

You can also try to use Disk Utility, available in the Ubuntu Software Centre:

https://apps.ubuntu.com/cat/applications/natty/gnome-disk-utility/


Ubuntu 18.04 black screen after Plank install

For the third question about installing without losing the contents of the home folder:

The answer appears to be here:

Re-install Ubuntu without losing data in home folder

From my perspective, I would just re-install Ubuntu.

Also, if your home folder is not encrypted, you can access it with a live USB and transfer all the files to another USB (requires two free USB ports). This would be best to do even if following the method linked above, just in case. If it is encrypted, it's a bit more of a process, but still possible.


Go to Edit -> Preferences -> Applications. Find your file and assign what application you want to it.


How do I detect and remove Python packages installed via pip?

Ubuntu Oneiric (and I expect newer versions too) install pip packages to /usr/local/lib/python2.7/dist-packages, and apt packages to /usr/lib/python2.7/dist-packages. So just check the former directory and sudo pip uninstall every package you find there.


Using intel_iommu=on keeps system from booting

I never got to the bottom of it exactly, but I did confirm that the Asrock C236M WS motherboard will not boot with intel_iommu=on and a 4.3 (Debian backports) or 4.4 (Ubuntu 16.04) kernel.

It works ok with a Debian Jessie 3.16 kernel, but I didn't want to be tied to the old kernel, so I went with a different motherboard.


I need to stop a execution of a command and start the same comma every x interval of time in terminal?

Yes, /usr/bin/timeout is the tool to use. See man timeout. Here is an example, from one of my nightly cron jobs, you can wrap yours in a while true ; do loop:

TO_KILL="45m"           # timeout (kill -KILL) for hpodder
TO_HUP="42m"            # timeout (kill -HUP) for hpodder. Makes sense only if it is less than $TO_KILL
# ...
timeout -k $TO_KILL -s HUP $TO_HUP hpodder  update

This will run the hpodder update until it finishes, or 42 minutes have passed, when it will be sent (see man 7 signal) a HUP signal. If hpodder update is still running after 45 minutes (3 minutes after the HUP was sent), it will be sent the uncatchable KILL signal, and will be terminated.


Connected to wifi, but quits loading pages after a random amount of time

I was in network settings, and I noticed "Cloned MAC address" was left blank. At first, I changed the Device MAC address, AND the Cloned MAC address to be the same as the LAN MAC address. I thought this fixed it, because it lasted for about 30 minutes, before giving me the same issue. Although, this time, it gave me an error message that said "MAC address doesn't match (not exact words)". Then, I switched the Device MAC address back to it's original setting, and used that MAC address as the Cloned MAC address. This also seemed to work for a little bit. Then, instead of giving me the error in the terminal when runnging ping -n 8.8.8.8

From 192.168.10.199 icmp_seq=178 Destination Host Unreachable

It just outputs:

ping: sendmsg: Network is unreachable

AND, it shows that it's not connected to wifi anymore. I think I may be on the right track to fixing this.
Also, this "Network is unreachable error" may be because my dad turns the router off at night because the LEDs on it are too bright for him to sleep.


why cant ubuntu 14.04 install on my windows 8.1

What model of computer do you have? What OS was the second computer? windows 8.1 uses UEFI to start up, which is different from an older OS, which would use BIOS.


You can use similar methods with Chrome(ium) as well. You don't need to use -new-tab or -url in this case. The following command will launch Chromium with three new tabs open, or just will open these tabs if Chromium is already launched:

chromium-browser firefox.com ubuntu.com duckduckgo.com &

The ampersand & will push the process to the background if there is not already opened Chromium browser, and you will be able to use or close the terminal independently of Chromium. Otherwise it does not hinder.


boot from the live cd or usb drive you used to install ubuntu. Run gparted and resize at your leisure. Have a look at the "Using GParted" section of this page.


Unable to install PDFshuffler in ubuntu 11.04

I have enabled the universe repository and executed these commands to install pdfshuffler. And now pdfshuffler is installed.

sudo apt-get update

sudo apt-get install pdfshuffler


How do I get a Canon Selphy ES1 printer working?

Canon Selphy ES1 is currently not supported in 10.10 see wiki

Tested

There is a PPA with Canon drivers: https://launchpad.net/~michael-gruz/+archive/canon
Read here how to use it:

How can I install a Canon printer or scanner driver?

http://www.upubuntu.com/2011/12/how-to-install-canon-pixma-mp-canon-mx.html

http://www.ubuntubuzz.com/2011/06/download-install-canon-printer-driver.html


How to setup a file server over the Internet?

I would discourage you to use FTP, as it's a clear text protocol without any security.

Instead, I suggest you use ssh. Then you get both secure remote shell access and file transfer, all in one service. apt-get install openssh-server and you are good to go. Then you can connect to your machine through for instance Places -> Connect to server on a Gnome desktop, sftp in a shell, or using WinSCP on Windows.

To reach your machine, even with a dynamic ip, you could use a free dynamic dns service such as DynDNS or FreeDNS, which will give you a hostname such as mybox.uni.cx.

NAT is no issue either, as long as you forward the correct port to your machine. (tcp 22 in case of ssh)


Samsung Ativ Book 9 lite Ubuntu Gnome Slow Performance

I have installed the proprietary driver in the application and updates section (where you can add keys). There you can search for alternative drivers for the graphics card. But the normal preinstalled driver also worked without problems.


Ah, custom partitioning. This is a fun one, especially when you're trying to encrypt cross-volume. I'm going to assume you don't want to go overly crazy (yes, that is my partition structure) and use LVM inside of LUKS here. I'm also going to assume you've already installed things, as it makes this process a tiny bit easier.

Part I: Setting up your LUKS Partition

You're going to have to start by creating a new EXT4 partition on your hard drive. Make it take up as much space as you want.

Next, you will need to run cryptsetup to actually set up encryption. The command you want will be:

cryptsetup luksFormat /dev/sdXY

Replace /dev/sdXY with whatever is pointing at your new EXT4 partition. You will be prompted to choose a password. Choose a strong one and write it down. You will not have to remember it by the time you're done (you'll see why as we get further into this post).

Next, we need to make another ext4 partition inside of your LUKS container, which will eventually go on to hold /home. These commands will achieve this:

cryptsetup open --type luks /dev/sdXY home_drive
mkfs -t ext4 /dev/mapper/home_drive
cryptsetup close home_drive

Next, run blkid and make a note of the UUID of your new LUKS container (at /dev/sdXY). You'll need it in a sec.

Part II: Enable Automatic Decryption

Now, we need to set up something called decrypt_derived, which allows you to "chain" decryption operations.

By doing this, we will allow one password to work across both drives. In effect, your decrypted first drive will be the password for your second drive. Your password (chosen above) will still work in case of an emergency (think data recovery or similar).

Run the below commands/file edits. Be sure to rename ubuntu_crypt to whatever your current crypt is called (see /etc/crypttab to find this). Also replace /dev/sdXY with your new LUKS partition.

/lib/cryptsetup/scripts/decrypt_derived ubuntu_crypt > /tmp/home_keyfile
cryptsetup luksAddKey /dev/sdXY /tmp/home_keyfile
shred -u /tmp/home_keyfile

Next, you will want to add the following line to /etc/crypttab:

home_drive UUID=<your_drive_uuid> ubuntu_crypt luks,keyscript=/lib/cryptsetup/scripts/decrypt_derived

If you're using an SSD for your home drive, be sure to replace luks,keyscript=... with luks,discard,keyscript=....

Part III: Add to /etc/fstab

Now that your system is set up and can auto-mount the drive, we need to make /etc/fstab aware of this.

Fortunately, this is just a single line that needs to be added below the / entry in /etc/fstab. This line will look something like:

/dev/mapper/home_drive    /mnt    ext4    errors=remount-ro    0    1

Part IV: Testing it out

Next, you're going to want to mount your new (ready to go!) home partition. Your commands will be something like:

cryptsetup open --type luks /dev/sdXY home_drive
mount /dev/mapper/home_drive /mnt

Copy your current home folder over to the new drive, and make sure everything looks good.

Finally, you just need to run the below command to make your system aware of your crypt:

update-initramfs -u -k all

Reboot your system, and make sure you'll only have to enter your password once. If you need to do it more than once, something went wrong. Double-check all of your steps.

Once you're back online, confirm that /mnt has all of your home data present in it.

Part V: Moving for real

Now, you're going to want to re-open /etc/fstab again, and edit your new line, replacing /mnt with /home. It should look like this:

/dev/mapper/home_drive    /home    ext4    errors=remount-ro    0    1

Save the file.

Run update-initramfs -u -k all one more time, and reboot your system.

Once you're back up, run lsblk and make sure your homedir is mounted to the new drive.

Once you're happy, you'll need to get rid of your old home data. The problem is that a mount will replace the current folder with itself, so there's no way to access that data (and you can't delete your homedir while running). So, you'll need to do a bindmount:

mount --bind / /mnt

Run touch /mnt/home/test, and then immediately run cat /home/test and make sure it complains that the file is not found. If the file is found, something is wrong with your mount config.

Once you're sure that /home/test does not exist but /mnt/home/test does, you can go ahead and delete your old home with rm -rf /mnt/home/*.

Your system will now be on your SSD and your homedir will be on its own encrypted drive!


Cannot view files and folders of Windows drive from Wubi

You need to run chkdsk from Windows. There appears to be some filesystem corruption and since it's NTFS you have to run it from Windows.

Boot Windows, open My Computer, right click on D:, Properties, Tools, Check disk for errors. That should clear it up.

Note that the \found.??? directories are system protected and hidden by default and are used to recover corrupted files/directories.


Is there a virtual printer to output an Open Office doc to multiple images (jpg, png etc)?

Does it need to be an image file rather than a PDF? If not, you could use

sudo apt-get install cups-pdf

With ImageMagick you can convert PDFs to images from the command line but maybe that's getting too longwinded. Also, though I don't have it installed on the machine I'm currently used, I read on blog comment that GIMP can open PDFs...?


How to make an Ubuntu Minimal USB
It is possible to make an Ubuntu Minimal USB on either Ubuntu or Windows Subsystem for Linux in Windows 10 using dd. While the minimal iso image is handy, it isn't useful for installing on UEFI-based systems that you want to run in UEFI mode. The mini iso lacks the proper files for booting the computer in UEFI mode. Thus, the computer will boot in BIOS compatibility mode, and the installation will be in BIOS mode.

Download the Ubuntu Mini CD iso file for Ubuntu 18.04 and earlier from the link on the Ubuntu Documentation Installation Minimal CD webpage. Download the Ubuntu Mini CD iso file for Ubuntu 20.04 from http://archive.ubuntu.com/ubuntu/dists/focal/main/installer-amd64/current/legacy-images/netboot/mini.iso. Download the file called mini.iso to your Downloads folder. You can download the mini.iso file to wherever on your computer that you want, but download it to your Downloads folder so that you can easily run the commands in the following steps without changing anything.

Verify the md5 checksum of the Ubuntu mini CD iso file that you downloaded by running these commands:
 cd ~/Downloads/
 md5sum 'mini.iso'

If you are using Windows Subsystem for Linux download the Microsoft File Checksum Integrity Verifier tool from the official Microsoft Download Center. The Microsoft File Checksum Integrity Verifier tool is a command line utility that computes MD5 or SHA1 cryptographic hashes for files.

Check that the results of the command match the MD5 checksum of the mini.iso file on the Ubuntu Documentation Installation Minimal CD webpage.

Get a USB flash drive, 1GB or larger. Delete all the files from the USB flash drive. Mount the flash drive using the Disks disk utility.

Check in the Disks disk utility to find out the device name of your USB flash drive. This is very important because if you use the wrong device name in step 6, you will overwrite your whole operating system instead of writing to the USB flash drive. So check the USB flash drive device name twice.  It should be something like /dev/sd* where instead of the * character there is a lower case letter like a, b, c, etc. In the following step I am assuming that the device name is /dev/sdc, but the device name of your USB drive could be something else like /dev/sda or /dev/sdb so check the device name of your USB drive twice and make sure that you get it right in step 6!

Open the terminal or Windows Subsystem for Linux version 2 and run the following commands:
 cd ~/Downloads/
 sudo -i
 dd if='mini.iso' of=/dev/sdc bs=4096  ## make sure that the device name of your USB drive is correct!

The dd if='mini.iso' of=/dev/sdc bs=4096 command should take only a few seconds to complete on most computers because the mini.iso is a small file, less than 60MB. The result of running this command will be a bootable Ubuntu mini USB.

Boot the computer from the Ubuntu mini live USB. The Ubuntu mini live USB should boot successfully and show a menu screen.

If you select the Install option (the complete install, not the cli install) from the menu screen in Step 7, then you can select other options during the Ubuntu installation process to download all the packages that you need to perform a complete Ubuntu installation. Select the Ubuntu desktop package collection from the list of predefined collections of software in the Software selection screen in the Ubuntu mini CD installer. When you restart the system at the end of the installation, you will have a working Ubuntu desktop with the default desktop environment.


PulseAudio Manager gives the error Connection failure: Connection refused

I ended up installing Ubuntu 14.04 from scratch. An update to Ubuntu 12.04 completely ended up screwing things up


Why do I get 404 on LAMP Permalinks (Using wordpress)

Open a terminal and type:

sudo gedit /etc/apache2/apache2.conf

Find this:

<Directory /var/www/>

Change AllowOverride None to AllowOverride All

Then run:

sudo a2enmod rewrite

Dont forget to restart apache2:

sudo service apache2 restart


Moving rectangular box showing in Ubuntu desktop

Solved the issue by installing ubuntu desktop package.
sudo apt install ubuntu-desktop


Ubuntu 12.10 internal microphone does not work

Try to install Pulseaudio Volume Control (pavucontrol)  and check if your input port and profile selections for your sound card are correct. Such settings appears to be missing in the regular Sound Settings in Ubuntu.

General troubleshooting from here:

Open pavucontrol.
Click the Configuration tab.
Locate the correct sound card (just one in your case, probably).
Select the appropriate profile. For regular analogue sound, you should select something like Analogue Stereo Duplex. Options depend on the capabilities of your sound card.

(Continue...) Click the Input Devices tab.
Locate the correct sound card again.
Check the setting of the Port selection for it. My laptop offers me three options: Internal mic, Microphone (jack) and Line In.
Check if it's unmuted.


Partition table unrecognized on gParted, shown wrong in Disks

Your partition table is corrupt because sda3 and sda2 overlap.  I suggest using fdisk to delete sda5 and sda6 ( which live inside sda2 ), then delete sda2, and recreate it so that it does not overlap with sda3, then you should be able to recreate sda5 and sda6 with the same start and end sectors to avoid data loss.


I have 10 PC's of which I want to set up a centralised ubuntu server

I have implemented the same setup for our observatory network. We have several Linux clients, which use centralized logins using LDAP for the user data and PAM on the client side. The server hosts the users' home directories and delivers them via NFS to the clients, so I guess that's what you mean by "roaming profiles".

To adress your questions:

GUI assisted LDAP setup: Unfortunately, the Debian-derived distributions (Debian / Ubuntu / Mint etc.) do not have the GUI support for LDAP auth that is common with other distributions. Apart from the admin tools linked by bodhi.zazen, there is not much available.
Running Windows in a VirtualBox VM: You should better move this to another question as setting this up can become a bit tricky, but in general, this works. I run this setup on my server. VirtualBox offers CLI commands for automatically starting the VM when your host boots up, and you'll have to improvise something to shut down the virtualized Windows instance.
Connect to the Ubuntu server as a file server: You provide too little information to answer this well, perhaps this should also be moved to another question. Basically, everything you need is provided, but again, there's little to no GUI tools for configuring it all.
Setting up your server: After installing the base system, you'll need to install and configure the following subsystems:

The OpenLDAP server, according to https://help.ubuntu.com/10.04/serverguide/C/openldap-server.html . Skip what you don't need. Take great care to follow the guidelines and check the expected functionality after each step, as OpenLDAP's error reporting is not good and won't be very helpful in finding that tiny typo. Do not continue until the server tests out ok.
A NFS server to deliver the home directories to your client machines. This is easy and also covered in the Ubuntu Server Guide: https://help.ubuntu.com/10.04/serverguide/C/network-file-system.html
The clients' authentication mechanism, based on PAM, must then be modified to also look up user names from LDAP, not only from /etc/passwd as is normally the case. This is again documented on https://help.ubuntu.com/10.04/serverguide/C/openldap-server.html#openldap-auth-config .
The clients' home directory must be mounted via NFS from the server.

That's basically it :-) It's more work than it should be, because LDAP is very flexible and hence requires setting up a lot of things you won't really need in your simple setup.

A word on handling home directories and about using diskless clients, as suggested by lumbric: Consider using normal PCs with HDs as clients. For robustness, so that we'll be able to continue working when the server fails, I set up one local user on each client. This user's home was moved to /localhomes/localuser (beware of problems with nonstandard home directories, however). The advantage is that when the server or network is down, people can still log in locally using this local user account. Later, they can transfer their files from /localhomes/localuser to /home/foo, which is the NFS mount on the server. Since each client has an entire OS on its local disk (tip: cache package downloads using approx or similar), it's faster, and the local user makes the clients usable when offline.

I hate to say it, but I recently moved my server to OpenSuSE for precisely the lack of GUI tools. Their universal configuration tool, YaST2, is still annoyingly slow. But at least setting these basic things (LDAP server, LDAP auth, NFS server, Samba, ...) up is made very easy and, above all, transparent enough so that I can hand over managing the machine to less experienced people.


How to paste into emacs --no-window-system without auto-indent?

Autoindentation occurs in emacs when the newline character is encountered. You can use electric-indent-local-mode and electric-indent-mode to toggle this setting.

From http://emacsredux.com/blog/2013/03/29/automatic-electric-indentation/

  What’s little known is that Emacs 24.1 introduced a new global minor mode called electric-indent-mode. When enabled, typing certain characters(like newlines) triggers reindentation.


How to record only computer sound without microphone?

Try this solution using pavucontrol program.
I tried it and it worked, however I had to go first to "Configuration" tab of pavucontrol and change the profile of "Built-in Audio" device from "Analog stereo output" (which has been set by default) to "Analog stereo duplex". Then the button "Monitor of Built-in Audio Analog Stereo" appeared in the "Recording" tab and I was able to follow the instructions.


How do i check which process is reading hard disk?

Have a look at iotop, exactly like top in spirit, but for I/O operations.


Sound card is suddenly not being recognised

I reached out to Lenovo support and they suggested updating the BIOS using this utility, this solved my problem.


Wireless disabled by hardware switch(another)

look at Hard blocked: yes it seems at that time maybe you forgot about the hard switch. may be it was turned off ?

I had the same problem wireless is disabled by hardware switch and this happens to me every time when I am in windows and I disable the wireless using the hard-switch. and when I reboot to Ubuntu, I see that I can't enable my wireless and the error is wireless is disabled by hardware switch.

Then I found the command sudo rfkill unblock all which solved the problem. However I had to type it a couple of times before the command had enabled my wireless switch.

So what I will do is, go to windows, disable the wireless using the hard switch and then enable it again using the hard-switch while you are still in windows. then reboot to Ubuntu to see if it has worked. if not then use the command and type 3-4 times in the same terminal.


Problem with $PATH variable in terminal in ubuntu 16.04

When you want to change your path, be sure to include the existing part as well. To do that, add $PATH in the new path definition.

   export PATH="$PATH:/usr/bin"

Make sure that your /etc/environment is only re-read at reboot.

I think adding the $PATH in your ~/.bashrc can solve your problem.


I don't know exactly what causes the boot to terminate in a busybox/initramfs prompt but I can provide you with an alternate solution that does not involve installing Ubuntu to USB and still gives true persistence.

Try to use the mkusb tool to make your persistent USB system.

Detailed instructions are given here.

Complete documentation+working can be found at https://help.ubuntu.com/community/mkusb


It's probably about the boot-order of devices in your BIOS.
Check it to put your second hard-disk as the first checked at start-up.

You should try to repair grub : http://doc.ubuntu-fr.org/tutoriel/comment_restaurer_grub

For those who don't speak french : https://help.ubuntu.com/community/RecoveringUbuntuAfterInstallingWindows


What is a "Asking for cache data failed" warning?

What do the Asking for cache data failed and Assuming Drive Cache: write-through messages mean?

Hard disks have a small amount of RAM cache to speed up write operations. The system can write a chunk of data to the disk cache without actually waiting for it to be written to the disk. This is sometimes called "write-back" mode.

If there is no cache on the disk, data is directly written to it in "write-through" mode.

The Asking for cache data failed warning usually occurs with devices such as USB flash drives, USB card readers, etc. which present themselves as SCSI devices to the system (sdX), but have no cache.

The system asks the device: "Do you have a cache?" and gets no response. So it assumes there is no cache and puts it in "write-through" mode.


Convert my physical Operating System to a VirtualBox Disk

Yes, however it will most likely take a very long time.  I haven't actually tried the steps below, but they should work.

First, you need to make an image of your entire partition.  You need to know the partition path of the Ubuntu partition, for example /dev/sda1 would be the first partition on the first attached hard drive.

sudo dd if=PART_PATH of=OUTPUT_PATH/ubuntu.bin

note that you should do the above command from a liveCD with the partition you are trying to copy unmounted -- i.e. you need to have another hard drive or something to copy all the data to.

You can shut the liveCD down and boot back into Ubuntu to perform the last step:

Convert the binary into a vbox drive:

VBoxManage convertdd PATH_TO_ubuntu.bin ubuntu.vdi --format VDI

you can then use the resulting ubuntu.vdi as a Virtualbox drive.
Just make sure you have plenty of time and hard drive space for this operation.  A little tip:  commandline tasks can be suspended by hitting Ctrl+Z. The operation will go to sleep, and you can use you computer again.  When you are interested in resuming the process, type fg in the terminal, and the operation will resume.  Quite handy for long operations like this.


SOLUTION:

I finally found a solution to my problem randomly.

sudo pico /etc/pulse/default.pa

look for

load-module module-udev-detect

and add tsched=0

load-module module-udev-detect tsched=0

This simple modification fixed all the sound crackling and static on my PC, in Google Chrome, chromium, HTML5 videos, etc etc


Keep executed command in its tab (bash script)

There should be a more elegant solution than this, but you can try something like:

--command="bash -c 'export HISTFILE=/tmp/hist\$\$; history -s \"$cmd1\";
           history -w; $cmd1; exec $SHELL'"

where the bash is given its own history file hist$$, the $$ having to be escaped to be evaluated later to the pid of the process. history -s saves a string to the history list, and -w saves that to the HISTFILE. The shell is assumed to use this value set in the environment. You may need to add --norc for bash to stop it setting up a different history file from your ~/.bashrc, for example.


Dual-booting Windows 10 and Ubuntu 16.04

I googled your question and WebupD8 has an article about making Windows 10 bootable media for installing Windows. This should help to create the usb. For the dual boot you should try:

Make space about at least 50GB(since you were talking about games) space as "unallocated". You can use the program Gparted for it.

After you created your partition, start the computer from your USB drive that you made that to Windows usb and start to install Windows but when you come to the hard disk part choose the Unallocated partition that you created and continue(if you have problem than you can format it from that part or using diskpart in the repair part). I didin't try it before so i don't know that Windows overrides Windows Boot Manager to GRUB, but dual boot should be done. Besides you wont touch other partitions so you won't break the ubuntu part.

Hope this helps.


No sound in Manually Compiled Wine 1.7.18

Run the following commands to get pulseaudio working with wine:

sudo add-apt-repository ppa:ubuntu-wine/ppa
sudo apt-get update
sudo apt-get upgrade

This will update Wine to a version that supports pulseaudio. Once you have done that, open winecfg and select PulseAudio Driver under Sound Drivers.

Go to WebUpD8 for a complete tutorial on getting pulseaudio to work with wine.


video4linux recording and viewing at same time

Have you tried VLC? It can capture a stream and save it to a file or a network stream. Open VLC and select "Open capture device" from the "Media" menu. Give it a try.


In the software centre, you "buy" free applications with a purchase price of 0.00. This is normal and expected if using the software centre when it is independently produced.


How do I grep the text after two special characters?

I'd suggest using sed for that:

sed 's/.*[|>] *//'

This works for your example, but you may need to adapt it, depending on what to do with lines without any | or >. If those should get removed completely, use

sed -n 's/.*[|>] *//p'

This means don't output by default (option -n), but print a line (p), if the s command could perform a replacement.


13.10 with Mate and Clearlooks: some gtk apps are mostly black

Some of your misbehaving apps may be gtk3. To find out, run:

ldd /usr/bin/app_name | grep gtk

For example with gucharmap,

$ ldd /usr/bin/gucharmap | grep gtk
    libgtk-3.so.0 => /usr/lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007fcdee89a000)
$

Note libgtk-3.0 in the output.

Also check with whereis in case your app is elsewhere such as in sbin instead of in bin.

The Clearlooks theme only supports gtk2. (Look in your themes folder and you won't see a gtk-3.0 subfolder in the Clearlooks folder.)

I suggest you use a theme that supports both gtk2 and gtk3.


Remove/re-install LAMP with current versions on Ubuntu 18.04

You can remove all the main stuff with these commands:

sudo apt-get purge mysql-server apache2 php
sudo apt autoremove && sudo apt autoclean

Then reinstall it the modern way using taskel:

sudo apt install tasksel
sudo tasksel install lamp-server


Postfix | Because When I send a email to Gmail, this is received as spam?

In general this is not about Ubuntu, but I decided to write short answer. First, the domain, server.com in the question, must be a registered domain. Then you have at least these options:

Option A) Setup PTR and Reverse records for your domain. This should be done via the control panel of your DNS provider.

Option B) You can setup smtp-relay where a third party server (as sendgrid.com or www.mailjet.com) will send the emails for you.


Time it takes to resize /dev/loop0 and increase space

The most probable cause of this is that you had less than 100 GB free space on the directory /path/to/file. In other words, you are appending 100 GB to /dev/loop0 from the home directory in which Ubuntu is installed (given by /path/to/file). But you have less than 100 GB free space in /path/to/file so as a result it is eating up the space on the memory. You can check the space available in /path/to/file by GParted. Hope this answers your question.


mount vdhx image on ubuntu (data recovery)

The first time I tried this I got:

libguestfs: error: /usr/bin/supermin exited with error status 1.
To see full error messages you may need to enable debugging.
Do:
  export LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1
and run the command again.  For further information, read:
  http://libguestfs.org/guestfs-faq.1.html#debugging-libguestfs
You can also run 'libguestfs-test-tool' and post the *complete* output
into a bug report or message to the libguestfs mailing list.

If this happens to you, and you're operating as a regular (i.e. non-root) user, you may not have permission to read the kernel. To check this, do:

ls -l /boot/vmlinux-`uname-r`

If it shows up as, e.g.

-rw------- 1 root root 11399928 Nov 12 02:51 /boot/vmlinuz-5.3.0-23-generic

then you don't have permission to read the kernel. To correct this, either run guestmount as root with sudo, or do:

sudo dpkg-statoverride --update --add root root 0644 /boot/vmlinuz-`uname -r`

The latter will make the kernel world-readable and will allow you to use guestmount. Note that having the kernel world-readable may be a security risk, so do some reading if you're worried about it.


Viewing Installation Log on Failed Ubuntu 12.04 Installation?

This particular question has been resolved.  I resolved it myself by adding some code to the end of the preseed file that I was using for the installation.  The line I added was something like d-i preseed/late_command sleep 999999999999999 ...  Perhaps a simple shell command "read" would also have sufficed?  In any event, problem solved.  Thanks.


Automatically disable wifi (wireless) when 'x seconds' since last browser page change

The Wi-Fi on your computer probably costs less than the Wi-Fi on your router. This website says:

  Taking a standard rate of 21.63 cents per kilowatt hour, you can
  therefore expect your Wi-Fi router to cost around $0.0311 per day to
  operate.

$20 per month (or 20 Euros in your case) is about what an air-conditioner would cost in a month. That draws 1200-1500 watts whereas an average laptop draws 15 to 60 watts and an average desktop about 130 watts.

I just read that Wi-Fi cards in desktops draw about 0.3 to 0.8 Watts which is almost nothing when you consider the average light bulb is 60 Watts.

YMMV - Your Mileage May Vary.


Can I connect a printer through WiFi if I only have Internet through Ethernet cable?

If you have a wifi router and several machines, you can connect the printer to the router via wifi and the other machines connected to the same LAN (same subnet will be easier) via ethernet cable will be able to use the printer.

If you have a network with no wifi and the printer can only connect via wifi (very unusual), you won't be able to connect to it.

If your router has no wifi and you have a machine with wifi, you can connect the printer to this machine and share it from there but this is not the best way as your machine will need to be always on (and working).

If you have a router with an USB port and no wifi, almost certainly, the printer will have an USB port and you can use it to connect to the router and share it to the network.

If you have only one machine, you can use wifi if available on your machine but almost certainly your printer will have an USB connection available too.


ImportError: libcublas.so.9.0: cannot open shared object file: No such file or directory

You're trying to build tensorflow-gpu 1.4, which is too old to be compatible with CUDA 9.1.

From here you have three options:

You can try to create a symbolic link to force the system to use CUDA 9.1, though it's not sure it'll succeed
You can follow this tutorial which explains how to easily install CUDA 9.0 on Ubuntu 16.04.
If it still doesn't work and that you really want to try to install Tensorflow with CUDA 9.1, you can try to install CUDA, CUDNN and NCCL sources from the NVIDIA site, and then emulate the way these packages would have been installed from ppa.

Once you've downloaded the tar packages, type the following to configure CUDA:

sudo mkdir -p /usr/local/cuda /usr/local/cuda/extras/CUPTI /usr/local/cuda/nvvm
sudo ln -s /usr/bin /usr/local/cuda/bin
sudo ln -s /usr/include /usr/local/cuda/include
sudo ln -s /usr/lib/x86_64-linux-gnu /usr/local/cuda/lib64
sudo ln -s /usr/local/cuda/lib64 /usr/local/cuda/lib
sudo ln -s /usr/include /usr/local/cuda/extras/CUPTI/include
sudo ln -s /usr/lib/x86_64-linux-gnu /usr/local/cuda/extras/CUPTI/lib64
sudo ln -s /usr/lib/nvidia-cuda-toolkit/libdevice /usr/local/cuda/nvvm/libdevice

Then you can either download cuDNN and NCCL from source and configure them in the same fashion as above (this article here explains how to do so), or download their .deb package and see if the installation works now. If it doesn't, then try to install from source.


What are the steps to deploy OpenStack in a VM using juju?

What environment should I choose? - "maas"? - "local"?

Local is faster and more lightweight because you are not doing virtualization but using Linux Containers (LXC). I would try it first. I tried it and ran in to some problems where the LXC container was not allowed to build some kernel modules for Quantum/Neutron networking, but Quantum/Neutron networking is optional, so LXC may work for you.

MaaS is designed to manage machines (usually physical, not virtual ones, but you can do virtual ones). Because of this, if you use MaaS, you will have to make a machine (possibly virtual) act as the MaaS server, and then network other machines (again, possibly virtual) to it. I've tried doing this before with KVM virtualized machines, and if you are doing it with very many things deployed, you need a lot of RAM.
If I choose "maas":

while bootstrapping, I get ERROR 409 Conflict - why?

409 Conflict is a general error that means there was some reason MaaS could not complete your request. There could be a lot of reasons this is happening, see the rest of my answers to see if anything starts to stick out as a possible cause.
I've setup the mass-cli login, using the profile "maas" as instructed. Do I need to add additional nodes?

To deploy anything with MaaS, you will need to add machines to the MaaS cluster (other than the MaaS server itself -- so you very well may have to create more virtual machines).
Can I add the node on which maas is already installed? - Do I execute juju commands from the machine being the original "maas" machine?

You get an API key from the account page in the MaaS web UI and put that in your .juju/environments.yaml juju configuration file along with the network address of the juju server. That allows whatever machine the juju client is running on to login to the MaaS server and send it commands. To get the key to use, go to the MaaS server web interface (http://ip_of_maas_server/MAAS/) click on the username in the upper right and then click on preferences on the menu that appears. That page will list a key to use.

I've tried using juju-gui in a "local" environment. I've followed the video from youtube on deploying openstack using juju, some of the components failed to install, their progress bars turned red - why?

It is hard to say for sure without more information -- the bar turning red means that some part of the code that set up the machine juju is using experienced an error for some reason. See Juju debug-hooks, how to run hook in debug terminal or get more information? for information on how you can get more information about the specific error.
Where can I find the list of juju commands to deploy a single all in one node?

The juju team has been working on bundles that let you deploy more that one service with a single command. I did see what looked like support for this in the WebGUI, in the form of an option to export and import a group of services. I don't know how ready this is (and you would need an export of a working configuration for openstack).

When deploying from commandline, how can I verify the installation's progress/status? watch juju status seems a bit uninformative for first time user.

Running juju debug-log would be one way, but that can be (quite) verbose.

Considering the above picture : - Is there a single OpenStack deployment spanning across multiple clusters? Or is there a single OpenStack deployment per cluster?

That picture doesn't necessarily show anything directly having to do with openstack. It shows how you can configure MaaS. I will note that in a testing case, it is possible and quite likely to have one region controller and one cluster instead of one region with two clusters. A cluster is simply a group of servers (usually physical, but could be virtual) on the same switch that MaaS will manage and deploy juju services on. MaaS is not specific to Openstack -- you can deploy any Juju charm on top of it. So, you could have a cluster with a few machines managed by MaaS, and then use Juju to deploy wordpress and MySQL. MaaS would turn on two of the machines it manages at Juju's request, install Ubuntu on them, and then let Juju configure a webserver with Wordpress on one of the physical machines and a MySQL database server on the other. If you were to add another Unit to the MySQL service in Juju, Juju would have MaaS start yet another machine and it would install Ubuntu on that machine and then configure MySQL on that machine. In an openstack setup, Juju is just configuring the openstack software on the machines that MaaS manages. In a production, high availability setup, it would be prudent to create at least two MaaS clusters, and split up the units for each openstack service across those clusters so if you had trouble with one MaaS cluster the Openstack units in the other cluster would take over and the openstack system would continue to run without interruption.


Mount the remote folder as follows:

sshfs user@myremotecomputer:/remote/path /local/path -C -p 9876 -o allow_other

Where -p 9876 stands for the port number, -C enables compression and -o allow_other grants non-rooted users read/write access. The allow_other option is disabled by default. To enable it, uncomment the line user_allow_other in /etc/fuse.conf to enable non-root users to use the allow_other mount option. The -p option is not necessary if the standard ssh port (22) is being used, and the -C option only if you want compression.


Install needed packages using
sudo apt-get install libpcre2-dev libbz2-dev zlib1g-dev


I have had success with the Jabra 65t Active headphones and Ubuntu 18.04.1 LTS.  I am using a Lenovo Y 50-70 Laptop.

The sound quality while listening to the linux Spotify application seems equal to my phone, perhaps with better range due to the laptop's, obsolete, Bluetooth 4.0 hardware.
~~~~~
So:

1.Music and all audio seem to work great.  Phone and computer can be connected receiving audio simultaneously.

Microphone? I haven't tried this function yet.  I'm curious to hear if you come up with anything!


Unable to find or create trash directory?

No need to have it somewhere else to copy it:

First, confirm that your normal user is ID "1000":

$ id

Then

$ sudo mkdir -p /.Trash-1000/{expunged,files,info}
$ sudo chown -R $USER /.Trash-1000


how to change the existing path name in ubuntu 18.04

Just to confirm, you would like to change an account's home directory? If so, you can do it like this:

Open terminal
cd /home
sudo mkdir {new directory}
sudo chown {account}:{group} {new directory}
sudo usermod -d /home/{new directory} {account}

Notes:

you cannot change the home directory for the account that is currently signed in⇢ if you want to change your own account, you'll need to sign in as a different user that has sudo privileges
existing data and folders will not be changed
you'll probably want to create the default folders such as ~/Desktop, ~/Downloads, ~/Music, etc. if you do not plan on copying the current home directory contents over

Hope this answers your question.


Ubuntu 15.10 does not boot on Intel NUC6i3 with Samsung 950 Pro PCIe NVME SSD

I'm not sure the difference between 15.04 and 15.10 with respect to GRUB, EFI, and NVME, but I found a way to make 15.10 work on my NUC 5i5RYK with Samsung NVMe drive.

No BIOS configuration changes are necessary. I've seen some posts say that you need to change the EFI or Legacy boot settings by at least with my NUC that had no effect.

Here's two work arounds that I found - perhaps the will help you.

1) Use the GUI program Boot Repair - This requires you to boot to a working system using a USB stick or CD using Kubuntu or other LiveCD style installer. See https://help.ubuntu.com/community/Boot-Repair for information. The default or "Recommended Repair" doesn't work, but I selected the "Advanced Options" and uncheck "SecureBoot" but keep all other default options then follow the instructions, the system correctly boots to the newly installed OS.

2) Install Ubuntu 15.04 first, then upgrade to 15.10. I found that if I install 15.04, run all updates:

sudo apt-get update
sudo apt-get upgrade

then run

sudo do-release-upgrade -d

then 15.10 will successfully boot.


Choose languages to translate to/from in FreeSpeak

If you use REQUEST TRANSLATION SUGESTION in the start window it will work using opentrans engine. Freespeak is outdated, there were changes made to google translate and to bing probably


First, backup all of your data before you lose everything you ever loved and cared about. Then, proceed.

Install gparted via sudo apt-get install gparted or find it in the Software Center. GParted is a WMD for filesystems.
Open up gparted from the menu or start it in a terminal, whichever is your preference.
In GParted, find your Windows volume. It should be of format NTFS and will look something like this:

Right click on it, and click remove.
Hit the check box up near the top or "Edit > Apply All Operations..."

You have now destroyed Windows. Cheers.

Next, let's grow your Ubuntu partition. For this, you'll have to boot into a Live CD since you can't perform operations on a mounted filesystem.

Boot up into an Ubuntu Live CD.
"Try Ubuntu" if prompted, don't install.
Install GParted in this Live CD, for this you'll probably need internet access.
Find your Ubuntu partition of type ext4 on your hard disk.
Right click then click "Resize/Move."
Resize it however large you'd like. If Windows was before it on the disk, ie: you have a large empty space of filesystem space before your Ubuntu partition, you should also move it. This will take time.

6a. If you're resizing and moving, you should do them separately. Do a move before a resize, as a move will take a lot of time. To do this, move the disk without increasing the size, then continue to step 7 below. After that completes (will take a while) proceed to resize the partition to fill your disk.
Apply changes.
Profit.


how to format a external HDD in Fat32 to swap between Ubuntu and Windows 7

Linux (and thus Ubuntu) does not use drive letters. Look on your desktop or in the /media folder

If that doesn't help, read up on linux "mounting" and USB especially (Ubtunu Mount/USB page is as good a place to start as any)


Sending mail to domains not hosted on your Postfix (external mails thus) is only possible for IP and networks allowed to do relaying by the configuration of Postfix.

In Postfix, this is achieved by giving these allowed IP's and networks to the mynetworks configuration directive in main.cf.

In your case, it shows that only localhost is allowed to relay mail outside your Postfix installation.

To allow you to send mail outside without making your server an open relay you should at least add the IP of the clients that need to send external mails.

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 A.B.C.D/32

Note the /32 after the IP address, this is to be sure that Postfix will not allow the whole subnet but just that particular address.

If all the clients are on the same subnet, you can configure (example: all your clients are connected to a 192.168.1.0 network with 255.255.255.0 as mask) :

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.1.0/24

Of course, if you plan to install a webmail based software for your users, the only allowed host to send & relay mail would be the web server itself. In this case, you don't have to modify the configuration of Postfix but be sure that your web mail solution use 127.0.0.1 as SMTP server.


How do I restore a single file with Deja Dup / Nautilus 3.8?

Use the command line:

deja-dup --restore path/to/file.whatever

It'll take ages to scan through the archives, but it'll restore only that file eventually.


Ubuntu does not resume after suspend - Lenovo IdeaPad z510

I have updated my OS.
Suspend-resume works fine with Ubuntu 16.04.1 LTS


When I upgraded to 17.04 this network manager file was blocking my system from automatically managing my ethernet interface, maybe this is affecting bluetooth.

/usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf

Content:

[keyfile]

unmanaged-devices=*,except:type:wifi,except:type:wwan

I commented it all out, rebooted, and everything works fine now. It can also be deleted. Let me know if this works.

Reference: Network Manager refusing to manage wired interfaces


Your search-foo is incomplete. Try man wget, which says, in part:

   -O file
   --output-document=file
       The documents will not be written to the appropriate files, but all will be concatenated together and written to file.  If - is used as
       file, documents will be printed to standard output, disabling link conversion.  (Use ./- to print to a file literally named -.)

       Use of -O is not intended to mean simply "use the name file instead of the one in the URL;" rather, it is analogous to shell
       redirection: wget -O file http://foo is intended to work like wget -O - http://foo > file; file will be truncated immediately, and all
       downloaded content will be written there.

       For this reason, -N (for timestamp-checking) is not supported in combination with -O: since file is always newly created, it will
       always have a very new timestamp. A warning will be issued if this combination is used.

       Similarly, using -r or -p with -O may not work as you expect: Wget won't just download the first file to file and then download the
       rest to their normal names: all downloaded content will be placed in file. This was disabled in version 1.11, but has been reinstated
       (with a warning) in 1.11.2, as there are some cases where this behavior can actually have some use.

       Note that a combination with -k is only permitted when downloading a single document, as in that case it will just convert all relative
       URIs to external ones; -k makes no sense for multiple URIs when they're all being downloaded to a single file; -k can be used only when
       the output is a regular file.

and

   -q
   --quiet
       Turn off Wget's output.


Why does the console output stop being bold half way on startup and how can I change this behaviour?

You will notice this happening when the OS is able to set a font that it prefers, if you would like to keep the font as it is run:

sudo dpkg-reconfigure -p medium console-setup

Then select the Do not change the boot/kernel font option from the list of options, unless of course another of the options there is more appealing for you, in which case you may choose one of them to decide which font it changes it to. Otherwise choosing the option I have mentioned will mean that the font at the beginning (in this case the bold font) will be the font always used in the console and it will not change to another. This is the font set in the BIOS.


Unable to Use Ctrl-keyboard Shortcuts in any application

Turned out to be the application SyncWall (which is otherwise great). Specifically removing the shortcuts did the trick (disabling the function wasn't enough). Don't know why they would conflict and why it only happened after the reboot since I installed the application much earlier and definitely didn't have this problem before.

Such a relieve, this was really bugging me. So I wanted to file a ticket on sourceforge but wasn't authorized by the project admin.


Keyboard randomly stops working on browser(Chrome), works again only when I type on the search bar of Applications Overview Ubuntu 18.04

After observing the keystrokes using ScreenKey, I realized that some media keys were automatically pressed. Which resulted in the above issue. I am using an external keyboard currently, after disabling the laptop keyboard and have not faced this issue. This might suggest that there is no problem with the Ubuntu keyboard/touchpad drivers hopefully. It does seem a little obvious in retrospect but it was really hard to detect.


One liner to convert small text string to PDF

Tl;dr
pdfunite may error out in case the file descriptor containing the standard output of the command running inside the command substitution is empty by the time it's read.
So you're better off using an alternative to pdfunite; since you have ghostscript installed you could use gs:
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=~/Desktop/2016-03-12.pdf Welcome.pdf <(enscript <<<"echo foo" -p -) Rooftops.pdf Announcements.pdf ComeAliveDryBones.pdf Benediction.pdf Dismissal.pdf

If I understood correctly you were pretty close:
pdfunite Welcome.pdf <(enscript <<<"Have a seat" -p - | ps2pdf - -) Rooftops.pdf Announcements.pdf ComeAliveDryBones.pdf Benediction.pdf Dismissal.pdf ~/Desktop/2016-03-12.pdf

The <<<"Have a seat" token in the enscript command will redirect enscript's standard input to the string and the -p - token will make the enscript command print to standard output;
Using <() instead of () will make the whole <() token be replaced with the file descriptor containing the standard output of the command running inside <() (AKA process substitution), using - instead of output.pdf will make ps2pdf print the PDF to standard output instead of to a file.
But the problem with this approach is that pdfunite may error out in case the file descriptor containing the standard output of the command running inside the command substitution is empty by the time it's read.
So you're better off using an alternative to pdfunite; since you have ghostscript installed you could use gs:
gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=~/Desktop/2016-03-12.pdf Welcome.pdf <(enscript <<<"echo foo" -p -) Rooftops.pdf Announcements.pdf ComeAliveDryBones.pdf Benediction.pdf Dismissal.pdf

% enscript <<<"foo" -p -  | ps2pdf - foo.pdf
[ 1 page * 1 copy ] left in -
% gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=foobar.pdf foo.pdf <(enscript <<<"bar" -p -)
[ 1 page * 1 copy ] left in -
GPL Ghostscript 9.16 (2015-03-30)
Copyright (C) 2015 Artifex Software, Inc.  All rights reserved.
This software comes with NO WARRANTY: see the file PUBLIC for details.
Processing pages 1 through 1.
Page 1
Loading NimbusMon-Bol font from /usr/share/ghostscript/9.16/Resource/Font/NimbusMon-Bol... 4726404 3142423 2470576 1091522 3 done.
Loading NimbusMon-Reg font from /usr/share/ghostscript/9.16/Resource/Font/NimbusMon-Reg... 4759732 3269347 2490768 1100127 3 done.
%

gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=foobar.pdf foo.pdf <(enscript <<<"bar" -p -) correctly chains foo.pdf and a document containing the word "bar" generated via the PostScript script generated by enscript <<<"bar" -p -.


I have just changed over to Ubuntu so not sure how to do that in Linux.

Since you have a copy of windows, go into the Device Manager and select the sound card device and un-install it. Then install again it and that should reset anything Ubuntu has changed.

Or, try going to the sound card website and downloading the driver again and install it manually in the Device Manager.


Upgrading to kernel 3.5.0-26-generic, which came as a normal system update, fixed the problem. Now everything works fine.


Cut and store a string untill a word is found in bash

sed  's/www.*$/www/' file

where file is the file containing this type of strings.

pilot6@Pilot6:~$ sed  's/www.*$/www/' <<< "/path/to/www/continued/xyz"
/path/to/www

If you have the string in a variable var then run

echo $var | sed  's/www.*$/www/'


In order to redirect from ip1:port to ip2:port you will need some software in addition to iptables. First you should make sure that iptables properly routes from one port to the new port.

You can review the accepted answer in this question to modify the page that is displayed. Generally this is index.html by default.

https://stackoverflow.com/questions/19322345/how-do-i-change-the-default-index-page-in-apache


Ping output - epoch time to human readable

You can use something like this, transforming the date with perl :

 ping -DO 8.8.8.8 |  perl -pe 's/(\d{10}.\d{6})/localtime($1)/e'

Similar to the sed expression, this uses 's/ / /' format.  The $1 is equivalent to sed's \1 .  localtime converts the numbers matched inside the escaped parentheses:
\d{10}.\d{6} is the epoch time (10 digits) with microseconds (6 digits) suffixed, as set by the ping -D option.

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
[Sun Jan 17 22:47:40 2016] 64 bytes from 8.8.8.8: icmp_seq=1 ttl=51 time=15.4 ms
[Sun Jan 17 22:47:41 2016] 64 bytes from 8.8.8.8: icmp_seq=2 ttl=51 time=14.3 ms
[Sun Jan 17 22:47:42 2016] 64 bytes from 8.8.8.8: icmp_seq=3 ttl=51 time=20.0 ms
[Sun Jan 17 22:47:43 2016] 64 bytes from 8.8.8.8: icmp_seq=4 ttl=51 time=15.1 ms
[Sun Jan 17 22:47:44 2016] 64 bytes from 8.8.8.8: icmp_seq=5 ttl=51 time=12.8 ms


Both drives are solid state drives, and the NVMe SSD is the faster of the two drives. NVMe SSDs currently run in the 256GB/512GB/1TB size range. Depending on the size of the SSDs, you can install everything in a single partition on the NVMe SSD and split the home directory into two different partitions or use the 2nd SSD for data storage.


We have the same problem. After restarting the xrdp service with:

sudo service xrdp restart

the problem seems to be solved till the next restart (?)


The reason is that Libre Office is quite some ressource intensive.
If you want a light system I recommend the office software Lubuntu uses: Spreadsheet, Wordprocessor, Notes and maybe planning calendar.


md5 is (from the python docs:) "deprecated since version 2.5: Use the hashlib module instead".

You need hashlib. It is in the zlib module and that is in the zlib1g package and/or zlib1g-dev package.


For Ubuntu 18.04, is there a way to show drop-down menus for a certain applications in a menu bar?

There are not an easy solution to that problematic. I need to explain some things as a meta-anwser to realy be possible underestand what happens and where it's the rigth place to ask about all this features you notice are gone.

In recently versions of Gtk (Gtk+3) was added a new feature called appmenu. This feature can be used instead/as an option, of the normal and standard feature called menubar.

Appmenu:

Menubar:

The appmenu is more realated with options of the whole application (quit, about..), than options related with this specific window where the menu is set, while the menubar cover both type of actions, the application actions and the window actions(copy, paste, ...). Because of that reason, the menubar is a bit more general then and also ofcourse is more big than the  appmenu. Then the menubar is more difficult to be acomodate in interfaces desinged for litle screens like in a phone.

Please note that a copy and paste actions are window specifics, because you are copying some selected files from one window to another. So, it's not the type of application actions and then they are not part of the appmenu actions, but they can be part of the menubar actions.

After that point and like exist both features, the menubar and the appmenu, the developer of the especific application is who need to deside if he want to show one or both types of menu and what type will be selected.

While most of external gnome developers want that his applications will be compatible with other desktop enviroments like KDE, they select the menubar way as is the standard. Instead, the gnome developers select the appmenu, as this is his own way and they concidered it better. This not mean  necesary that if you select one or the another way, the rest will not exist ever more. Just will not be show as default.

Anyway, some exceptions of this decisions are for example:

Gimp, is also a gnome application, but can not implement the appmenu for obvious reasons (it have a big menu). So, this gnome application continues showing the menubar.
Nautilus, because his gnome developers, desided to remove all the implementation of the menubar and only support the appmenu. As they considered  the gnome perspective enough appropiete. They don't care to forcing other desktops developers to correct that for his platforms. Like was the case of in Unity where Nautilus have a patch. Or Mate and Cinnamon where other application was create as a fork of Nautilus.

In adition to all this chaos, there are a way to published the appmenu and the menubar over DBus. This ability can be used by the specific shell (unity, gnome-shell) to create or a Global Menu Bar (like in MacOS) or the Global Appmenu like in Gnome shell. Also and how applications can deside export both types of menus at the same time, the solution of join both type in one, like this occurs in the Unity Desktop is also posible.

But, the Global options are only possible if they have support inside the specific applications (Nautilus, Gedit...), so:

In the Unity Desktop (a cannonical desktop), a lot of gnome application were patched to be working in correspondency of the Unity Global Menu feature.
In the Gnome-Shell (a gnome desktop) they alert his own developers to only care about of the Global Appmenu feature and force it to be the standard.

This facts then enter in contradition and ofcourse load a lot the efforts of the shell developers with are working one agains the anothers.

Please also note: I don't want to mention more difficult and related problematics that was introduced with the gnome decision of use the client side decoration instead of the server side decorations. Repercussions of this decision are also related a lot with your question, but i will avoid that, because really it can be implemented in a way that not cause any disturb. Just take in advance that currently is not how gnome is implementing this feature really. As again, they are trying to force it to be become in the standard.

Users are notice this problems rigth now, because is now when the Ubuntu developers deside to not use the unity desktop as primary. As they are not patching the applications to support the global menu outside Unity, is more easy to the user see the conflict, as the application can be see like it's, because have not the patch that the Ubuntu developers added.

There are then several solution to the exposed problematic at the level of the  developers:

The specific developers of the application need to support both
features (in that case Gnome developers).
The distro developers need to create/continues patching that
problematic    gnome applications and also the patch need to be
extended outside of an     specific desktop (Unity), to be possible
use it in other desktops enviroments.

Please note then finally: Like the Ubuntu patches are at the level of the code and this depend of the application itself, there are nothing you as a user can do to solved the conflict and then also there are nothing that can be done in a gnome shell extension like Gnome Global Menu, to fix this type of problematics.

To solved the individual missing features of an application like Nautilus, the only solution is from inside Nautilus. So the solution need to come from inside the application itselft. The only "solution" that it's in your side, is declarate your unconformity with this fact and then use a diferent application. For example: Use Nemo or Caja as a replace of Nautilus.


Has behaviour of upstart changed in 13.04

First of all, it should be 'IFACE!=lo' and not 'IFACE=!lo', but I'll assume this is a typo in your question.

That said, I'm having the exact same problem, and even tried different machines running 13.04 and the problem was reproduced. But from what I have gathered, no, nothing changed in Upstart 1.8.

I find that while 'net-device-up IFACE=*' does not work at all in the complex upstart job I wrote, it will work if I put it in simple job such as:

# /etc/init/debug.conf
start on (local-filesystems and net-device-up IFACE!=lo)
script
  exec 1>>/tmp/log.file
  echo "$0:$$:`date`: got called. Environment of job $JOB was:"
  env
  echo
end script

So, clearly there's something else going on here. I'm reading the /var/log/syslog and /var/log/kern.log logs but couldn't pick up a candidate for culprit yet.

My solution (to the other, complex job) was to leave out the interface and just write:

start on (local-filesystems and net-device-up)

This worked perfectly. However this is not good enough for me yet, since my script will be run on machines with multiple interfaces. I'll update this answer if I find a better solution than my workaround or yours.


How to make Firefox load thumbnails in the New Tab page?

The thumbnails are now in ~/.cache/mozilla/firefox/*.default/thumbnails. You can try closing Firefox and deleting that directory. See also https://bugzilla.mozilla.org/show_bug.cgi?id=756881


MAAS (Metal as a Service) is a hardware provisioning layer, not a complete cluster-like OS. The purpose of MAAS is simply to enable the user to bring up a collection of hardware nodes and then deploy whatever services they need on top.
So MAAS will

Discover available nodes on the network.
Commission them with your choice of ubuntu server image.
Manage and allocate the nodes into groups which  you can then target with other services.

So, yes, you CAN use MAAS without juju if you just need to bring up a lot of hardware and install Ubuntu Server images on it. Juju makes it easier to deploy other services such as databases, web servers or even a full OpenStack.

For more explanation of MAAS, you should check out the MAAS documentation


How to setup OpenVPN provided with OTA10 on Ubuntu Touch?

There is a click-package that provides more configuration-options, including ca-certificate only with username and password.
But you still cannot import the ovpn-file. You have to set the options manually in the app.

Get the latest (0.3.1) click-package here, you can download it directly to the phone:
http://people.canonical.com/~pete/vpn-editor/

Then install it with this command from the phones terminal app:

pkcon install-local --allow-untrusted ~/Downloads/com.ubuntu.developer.pete-woods.vpn-editor_0.3.1_all.click

VPN-Editor should appear in the App-Scope. There you have a lot more options...
Good luck.


I have the newest Adobe flash player, but it still wont work!

Sorry there is no fix for this. The latest Flash version provided by Adobe for Linux is 11.2. And pogo.com requires >11.7
As a workaround you could install a Windows version of e.g. Firefox in Wine or in a VM and use Flash for Windows with that. But that's quite ugly. I'd rather look for alternative websites/games.
Edit: Install Chromium with Pepper Flash
Open a Terminal with CTRL+ALT+T and type:
sudo add-apt-repository ppa:skunk/pepper-flash
sudo apt-get update
sudo apt-get install chromium-browser pepflashplugin-installer
echo ". /usr/lib/pepflashplugin-installer/pepflashplayer.sh" | sudo tee -a /etc/chromium-browser/default

Now open Chrome and go to chrome://plugins. If everything was correct you should see now Adobe Flash Player - Version: 11.8.XXX


VmWare issue - can run machine only once per reboot... 'Not enough physical memory'

For resolve your problem you can:
Solution 1: Update Vmware module
just run this script:

sudo su
cd /tmp
cp /usr/lib/vmware/modules/source/vmmon.tar .
tar xf vmmon.tar
rm vmmon.tar
wget https://raw.githubusercontent.com/mkubecek/vmware-host-modules/fadedd9c8a4dd23f74da2b448572df95666dfe12/vmmon-only/linux/hostif.c
mv -f hostif.c vmmon-only/linux/hostif.c
tar cf vmmon.tar vmmon-only
rm -fr vmmon-only
mv -f vmmon.tar /usr/lib/vmware/modules/source/vmmon.tar
vmware-modconfig --console --install-all

source: communities.vmware.com

Solution 2: Downgrade your kernel

Install Ukuu:

sudo add-apt-repository ppa:teejee2008/ppa
sudo apt-get update && sudo apt-get install ukuu

Run Ukuu and chose kernel version 4.12 then click on install button
After installing new kernel finished, you must reboot your system and go to Grub menu and boot system with kernel 4.12


I had the same problem a few days ago...
This bug is common and there are a lot of solutions for it...
For me the solution was to update the kernel...
It was a kernel bug...Hope you can solve your problem too it was driving me crazy.
UPD: here this post helped me to update the kernel: https://ubuntuforums.org/showthread.php?t=1872537
The one I use is 4.9.22-040922-generic Though as I said there are a lot of reasons why this happens this might not help you but you will never know if you don't try
:)


Window snapping not working after uninstalled compiz?

Window snapping is enabled by a Compiz extension: the Grid Plugin. You cannot use window snapping without the Grid Plugin, and you cannot use the Grid Plugin without Compiz.


Are there plans to add calendar and ToDo List Sync in UbuntuOne?

At the moment, there are no plans to add any calendar or ToDo lists, so don't expect to see them in the next release.


I had the same issue. As muclux's answer hints that the issue is related to recurring transactions, I gunzipped a copy of the file (renamed with a .gz extension), which gives a XML file, and opened the file in a text editor. Then I removed all

<gnc:schedxaction>...</gnc:schedxaction>

XML tags (with their content), saved the file, gzipped it, renamed it, and this file can now be opened by GnuCash with no error. In this way, there is no need for GnuCash on Windows to delete the recurring transactions.