To install youtube-dl:

Recommended way (latest version):

Open a terminal with Ctrl+Alt+T or searching Terminal in the dash.
Install youtube-dl with this command (you'll be prompted for your password):

sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl && sudo chmod a+x /usr/local/bin/youtube-dl

Not recommended way (older version):

Open a terminal with Ctrl+Alt+T or searching Terminal in the dash.
Install youtube-dl with this command (you'll be prompted for your password):

sudo apt-get install youtube-dl

To use youtube-dl:

To select where to save the video, you can follow these steps:

Type cd on the terminal.
Press Space
Drag the folder from File Manager and drop it on the terminal.
If you skip this step, the video will be saved on your home folder.

To download the video you can use one of these procedures:

2.1. Run youtube-dl video_url where video_url is the URL of the video.

2.2. If you want to download many videos, you can follow these steps instead of 2.1:

Run the below command:

xargs youtube-dl

Repeat the following procedure for each link:

Paste a link.
Press Enter

Press Ctrl+D

2.3. If do you have a plain text file with a list of links, you can download them this way:

Type cat on the terminal.
Press Space
Drag the file form the File Manager and drop it on the terminal.
Press Space
Type | xargs youtube-dl
Press Enter

Now the video(s) will download to the selected folder.

Some final thoughts:

On the method 2.3 the final command should look like this:

cat '/home/foo/Desktop/myawesomevideos.txt' | xargs youtube-dl

You can also use the URL of a channel and youtube-dl will save the entire channel.
You can update youtube-dl with sudo youtube-dl -U
You can see all the options of youtube-dl with youtube-dl --help

Thanks to user185719 and Michael Grünewald for their contributions to this answer.


Is there any hope of recovering this installation?

Your data is safe as long as you do not format the disc and the hard disc is healthy.

You can use your LiveCD without touching your current install so you are always safe using the LiveCD (that is the whole concept of the LiveCD ;-) ).

I have used the LiveCD before to save a couple of files to a USB drive (drag and drop from the desktop) and I did it with the tools we all use with normal gnome.

Yes, I can imagine you are panicking but rest assured: the LiveCD will come to your rescue. Your system will be fine! Except you do need to sort out that heating problem... it could bite you again when you (again) least expect it.

Good luck!!


graphics mode error in desktop ubuntu 18.04

done it.I solved my problem.I think the best way to improve my problem is downloading Ubuntu drivers(ISO drivers) and extract them in a USB, After that going to the boot menu and reinstall the Ubuntu from zero. But if I had back up from my last destroyed Ubuntu I could bring back my programs and apps. but I hadn't .Um I downloaded the Ubuntu driver and install Ubuntu 19.04 instead last Ubuntu 18.04.
I hope my suggestion was true and helpful.


What snapshot software do you recommend?

Shutter (Click to Install)

  Shutter is a feature-rich screenshot program. You can take a screenshot of a specific area, window, your whole screen, or even of a website – apply different effects to it, draw on it to highlight points, and then upload to an image hosting site, all within one window.


http://www.omgubuntu.co.uk/2014/01/ubuntu-13-04-end-of-life-january-27

Does that cover it? Support period for non-LTS releases was changed recently.


Modifier Keys get stuck on single or double tap

Start the gnome-control-center aka Settings
Select Universal Access

Click Typing Assist (AccessX) in the Typing section.

Switch Sticky Keys to OFF.


How to know the partition where grub is installed

One way is to run Boot Info Script.  It will return the file RESULTS.txt which will include a line similar to:

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
    partition #7 for /boot/grub.


GTK2 applications are not themed correctly

I had a similar problem after installing kde and then going back to gnome. I managed to mostly fix it by editing ~/.gtkrc-2.0. It had references to oxygen theme in it which is the kde theme I guess. So I changed those to Ambiance and ubuntu-mono-dark. No guarantee this will fix it for you though.

style "user-font"
{
    font_name="Ubuntu Regular"
}
widget_class "*" style "user-font"
gtk-font-name="Ubuntu Regular 8"
gtk-theme-name="Ambiance"
gtk-icon-theme-name="ubuntu-mono-dark"
gtk-fallback-icon-theme="gnome"
gtk-toolbar-style=GTK_TOOLBAR_ICONS
gtk-menu-images=1
gtk-button-images=1


How to update Wine to the latest version?

Add the correct repo

sudo add-apt-repository ppa:ubuntu-wine/ppa

Update your sources list

sudo apt-get update

Update or install wine to the version on the PPA

sudo apt-get install wine1.3

Note: even tough the package name is wine1.3 the listed version on the Ubuntu wine packagers PPA contains version 1.4~rc1-0ubuntu1~ppa1~oneiric1.


WIll the unity 8 mir be usable in 16.04 LTS release?

Unity 8 will definitely be standard with upcoming releases. It is already available for you to preview if you want to get a feel for it.

This is a great article on it: http://news.softpedia.com/news/unity-8-all-you-need-to-know-494057.shtml


You can use yad, which you can install from the Software Centre. The box it displays full screen looks awful but it works:

w=$(xdpyinfo | awk '/dimensions/{print $2}'|cut -f1 -dx); \
h=$(xdpyinfo | awk '/dimensions/{print $2}'|cut -f2 -dx); \
yad --title "Enter you password to perform adminitrative tasks" \
--entry --text "Enter your password" \
--width=$w --height=$h \
--center \
--button="gtk-cancel:252" \
--button="gtk-ok:0"

It works by using xdpyinfo to get the current resolution and passing the values as $w and $h to yad. The return codes will be 0 and 252 on clicking OK and Cancel respectively.

man yad and yad --help-all provide assistance.


I think the settings for automounting can found and modified in different locations (GUI tools) between standard Ubuntu and each of the community flavours.

In standard Ubuntu 16.04.x LTS you can try via

System Settings (the button with the cog wheel and the crankshaft)

Details

Removable Media (menu item)

Other Media ...

Try some of the Type options, 'maybe HD DVD video disc'
Select the Action 'Do nothing'


So I got cups-lpd to work.  Here's how:

I created two files:

cups-lpd.socket

[Unit]
Description=CUPS LPD Server Socket
PartOf=cups-lpd.service

[Socket]
ListenStream=515
Accept=true

[Install]
WantedBy=sockets.target

cups-lpd@.service

[Unit]
Description=CUPS LPD server
Documentation=man:cups-lpd(8)

[Service]
ExecStart=/usr/lib/cups/daemon/cups-lpd
StandardInput=socket

[Install]
WantedBy=multi-user.target

I copied both files to /lib/systemd/system/
I ran this command: sudo systemctl start cups-lpd.socket, and sudo systemctl enable cups-lpd.socket to enable it on boot


SNAPD automatic updates and sunning servers in LXC

Currently, you can defer any package updates up to sixty days.
By doing so, you have a window of two months to select when you can perform the update.
Not updating a package is a security issue by itself.


How to give read and write acess to a particular user to acess particular folder in NTFS partition

NTFS partitions have a file system designed for Windows. While a Linux file system (for example ext4) can store Linux user / group ownership and permission information, an NTFS partition cannot store these. So, in NTFS partitions the "owner" of all the files and folders is the user who mounted the partition. You can see that information for example by doing ls -al /ntf_partition.

If this were an ext4 partition you could have changed the ownership of all the files in the partition (chown -R root:root /ext4_paritition) to the root user and group (you have called that user userA in your case). After that, you could have given the ownership of that specific folder to that specific user (userB in your case): chown -R userB:userB /ext4_paritition/specific_folder.


Since you are able to login with gdm try sudo dpkg-reconfigure gdm and select gdm as default display manager.


I don't know what you mean by "the Server stopped working with the Command apt-get install xubuntu-desktop" which is very strange, nevertheless xubuntu-desktop installs a complete xubuntu desktop on your system.  Not just XFCE.

If you want to install XFCE only and tweak everything manually, you need to install Xorg too and a display manager, like lightdm for example.

All three of them can be installed with this command:
sudo apt-get install xorg lightdm xfce4.

This will install the absolute basic XFCE on your system without any additional fonts or any kind of addditional mouse cursors for example.  You will have to install and tweak everything by hand afterwards.


Ubuntu boot loader stuck at Dell logo in Ubuntu-W10 dual boot on Dell laptop

Solution to: Stuck on Dell logo in Dual Boot Dell Machine
Machine Information:

Model: Dell G5 5587
Processor: Intel core i7-8750H
Ram: 16GB
Graphics: NVIDIA 1060 GeForce GTX 1060 Mobile
SSD: 256GB
HDD: 1TB
OS: Ubuntu 20.04 LTS

Scenario:

Updated packages, drivers, and softwares using Software Updater as usual.
Restarted the machine as suggested.
Dell logo freezes in the laptop and on the connected second display(VGA) I could login.
Network connectivity and Bluetooth connection was missing.
I disconnected the second display and restarted the machine.
Stuck on the Dell logo screen after selecting the Ubuntu from Grub menu. Waited for more than 5 minutes but it did not change.

Solution:

Selected Ubuntu Advanced Options from the Grub menu.
Selected the recovery mode for the latest Kernel version. For me it was: Linux 5.4.0-60-generic (recovery mode)
Selected the dpgk Repair broken packages.
Pressed y and then Enter.
Selected Resume Resume to normal boot.
Logged in to the OS, it was flickering on the second display.
Got network connection and Bluetooth connection.
Update the packages using sudo apt-get update
Changed settings in Software Updater>Updates> Notify me of a new Ubuntu version > Any version.
Closed the Software Updater and opened it again.
Got notification of a new upgrade of Ubuntu 20.10 version.
Clicked Upgrade.
Followed on screen instructions to upgrade Ubuntu 20.04 LTS to Ubuntu 20.10.
Restarted the machine.
The Dell logo is not freezing anymore.
Restarted the machine several times to confirm the normal behavior of the machine. Everything was working as expected.


Consider using a proper editor for editing long commands. Set EDITOR to your favourite editor, for example, gedit in your .bashrc:

EDITOR=gedit

Then, when you want to edit a long command, press CtrlX CtrlE. Gedit should open up, with the current command line already in it. Edit it your heart's content, then save and quit. Bash will now run the new command.


How can I play Majesty (natively) on Ubuntu?

With the release of Proton late last year, I tried the Steam version of Majesty Gold HD, and it worked flawlessly, which seems to be the consensus.

Technically this is not "the Linux port" of Majesty, but it runs just as well (possibly better, because it's the "HD" version which handles higher resolutions and mouse sensitivity better than the original). This solution also requires purchasing an additional copy via Steam, even if you previously purchased the Linux port, but they regularly have it on sale for under $3.


Ubuntu (WSL) in your system is using Gradle available in Windows. From Share environment variables between Windows and WSL - Windows interoperability with Linux
:

WSL and Windows share a special environment variable, WSLENV, created to bridge Windows and Linux distributions running on WSL.

If you run echo $PATH, you'll see Windows folders added. So, essentially, Gradle isn't installed in Ubuntu.
If you want to disable interoperability, you can run:
echo 0 | sudo tee /proc/sys/fs/binfmt_misc/WSLInterop

Now, you won't be able to use Windows programs in WSL, for example, File Explorer, although, you may still see Windows folders in PATH.
To re-enable interoperability, run:
echo 1 | sudo tee /proc/sys/fs/binfmt_misc/WSLInterop


Note: not tested because of no availability of two wifi-cards/ adapters in my laptop..

get the wifi-cards/ adapters names by running lshw command and look for the required values.. Identify the wifi card 1 & 2 in your case and note down the logical names

some of the contents of lshw in my System

*-network
                description: Wireless interface
                product: Wireless 3165
                vendor: Intel Corporation
                physical id: 0
                bus info: pci@0000:02:00.0
                logical name: wlp2s0

Here for example the second Wifi card/ adapters logical name is wlp2s0 and we want to use this connection for wifi-hotspot

Create a Wifi-Hotspot connection with below command..

nmcli device wifi hotspot ifname wlp2s0 con-name PARROT password 1234abcd

change wlp2s0 with your wifi cards logical name
change PARROT with what ever connection name you wish to
change 1234abcd with what ever password you wish with minimum 8 characters

to turn on and off this Wifi-Hotspot use below commands, change PARROT with your connection name

nmcli connection up PARROT
nmcli connection down PARROT

from man nmcli

wifi hotspot [ifname ifname] [con-name name] [ssid SSID] [band {a | bg}] [channel channel]
   [password password]
       Create a Wi-Fi hotspot. The command creates a hotspot connection profile according to
       Wi-Fi device capabilities and activates it on the device. The hotspot is secured with
       WPA if device/driver supports that, otherwise WEP is used. Use connection down or
       device disconnect to stop the hotspot.

       Parameters of the hotspot can be influenced by the optional parameters:

       ifname
           what Wi-Fi device is used.

       con-name
           name of the created hotspot connection profile.

       ssid
           SSID of the hotspot.

       band
           Wi-Fi band to use.

       channel
           Wi-Fi channel to use.

       password
           password to use for the created hotspot. If not provided, nmcli will generate a
           password. The password is either WPA pre-shared key or WEP key.


You need to install guest additions but first do:

sudo apt-get install dkms

Then:

Click on file cabinet then vboxadditions and click on run software.
Reboot guest.


Is there any conflict between nohup and mpirun?

The problem is that you are starting the job from within a desktop environment, so the jobs are children of that desktop. When the desktop ends, for whatever reason, all children automatically end, too. 'nohup' won't save them - logout removes the display that output should print to, which should also cause a fatal error.

Consider running tmux in a tty instead of a terminal window. Then the process can run forever regardless of whatever the desktop is doing.


You aren't quite done installing yet. Looks like you forgot to install a Python2 interpreter: sudo apt install python2.

Older releases of Ubuntu included Python2. That's likely why your instructions did not specify it.


MD5 mismatch on my 12.04 ISO, what is going on?

So, firstly, sorry for the confusion here.  Fundamentally it came down to a communication glitch between the release team and our sysadmins.

Around release time, we push many of our images out to Amazon's CloudFront service to keep our bandwidth use under control.  releases.ubuntu.com is managed directly by the release team, but the images on CloudFront are pushed by our sysadmins, and we have to push there well in advance to make sure everything's in place.  The sysadmins pushed the most recent daily build at the time, but after that we had to respin images for some serious bugs, and we forgot to let the sysadmins know about this so that they could update CloudFront.  As a result, you were getting out-of-date versions.

We've pushed updated images to CloudFront now, and all should be well, although I'm going to check things over manually just to make sure.


gimp -how to remove background of scanned text?

In order to achieve this,
one have to do this:
go to Layer -> Transparency -> Color To Alpha

this window will open
select the color of background(in my case it was white) and then click Ok button and done.


A common mistakes when discovering regular expression is to think that they can be used as parser (and so you see questions like "how can I parse an XML file using REGEXs?"). However you can't insert too much logic inside a regular expression: for complex problems, like yours, you either need a parser or more than one regular expression.

If you want to go with the way of regular expressions, you need two: one for the non-empty tags case and one for the empty tags field. The two regex could look like the following ones:

s/^(hostname123 \|.*?\|.*?\|\s*)(\S+\s*\|.*?\|)$/\1new,\2/
s/^(hostname123 ?\|.*?\|.*?\|)\s*(\|.*?\|)$/\1 new \2/

These two expressions can be used either with two sed piped together:

sed 'expression1' | sed 'expression2'

or, better, with one command in the following way:

sed -r -e '/^'"$server"' \|/ { s/^(.*?\|.*?\|.*?\|\s*)(\S+\s*\|.*?\|)$/\1new,\2/; s/^(.*?\|.*?\|.*?\|)\s*(\|.*?\|)$/\1 new \2/ }' testfile.csv

This is more efficient than using two seds because it does not parse the file twice.


i have this problem when i open phpmyadmin

It looks like you have a problem with your Apache installation. Make sure you have installed everything properly.

Open a terminal (Ctrl+Alt+T) and install :

LAMP stack

sudo apt-get install apache2 php5 mysql-server libapache2-mod-php5 php5-mysql

Phpmyadmin  :

sudo apt-get install phpmyadmin

At this step :

Do not forget to check apache2 with Space, then Tab to select OK.


Change the default option to "Forget password immediately" when mounting a Luks usb drive

I was looking for the same thing, but judging from a similar question that was answered on StackExchange, there isn't a way at present. It looks like the default behavior was changed from "Forget password immediately" to "Remember password until you log out", but absent some way to tweak this, the new default isn't going to work for some of us either.

Hope this helps!


baloo_file_extractor in Ubuntu 18.04 LTS taking up a lot of memory

I removed baloo through Synaptic.  It turned out to be associated with KDE's file manager, which I had tried but found no advantage over using Ubuntu's.  So I removed all of it.

Baloo was using 6 GB of RAM which is ridiculous.  I just installed it a week ago, in late August, 2019, I don't think they fixed it!  And it had a subprocess that was using a lot of resources as well.  Every time I booted up my computer I had to go into process manager and terminal and kill them or my computer would crawl.

I'm not even going to try to fix something like that, that's for KDE/ Kubuntu, if they cared, which they must not.  It seems like none of their utilities work properly without creating far more problems than they're worth.  I'm running Ubuntu 18.04.   I might install the Kubuntu desktop only in time, but I'm leaving its utilities alone!


Lenovo G50-80 Ubuntu 14.04 Wifi not working

Run in terminal

sudo tee /etc/modprobe.d/iwlwifi-opt.conf <<< "options iwlwifi 11n_disable=1"

and reboot.

This will disable 802.11n mode, that works badly with many Intel wireless adapters.

If this does not help, you can try this command

sudo tee /etc/modprobe.d/iwlwifi-opt.conf <<< "options iwlwifi 11n_disable=1 power_save=0 bt_coex_active=0"


Failed to build snap package: The linker version '2.23' used by the base 'core' is incompatible with files in this snap

You can fix this by running snapcraft inside an lxd-container

Install Snapcraft:

sudo snap install snapcraft

Install lxd

sudo addgroup --system lxd
sudo adduser $USER lxd
sudo snap install lxd

Build inside lxd-container

lxd init
export SNAPCRAFT_BUILD_ENVIRONMENT=lxd
snapcraft cleanbuild


I'd first check /etc/hosts.deny to make sure nothing has actually been blacklisted directly here. Otherwise, if iptables is installed, check it hasn't blacklisted something with iptables -L INPUT -v -n. You can try whitelisting the relevant IP too (see this question).

Considering you can SSH into them from home or from other servers, if you can't solve this, your best bet would be to use a third party (either your computer or one of those other servers) as an intermediary. rsync from your old server to your third server, then from your third server to your new server. Possibly you can also use SSH port-forwarding if you don't want to leave any data in the middle, though it will still pass through that third server.


Download the latest version of python-pip using apt-get

sudo apt-get install --reinstall python2.7
sudo apt-get purge python-pip
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
sudo python get-pip.py
sudo pip install package-name

This works perfectly in Ubuntu 14.04,check in 12.04 otherwise upgrade the version and follow above steps.


How to delete rows where the non-zero elements are less than one

Try:

$ awk '{f=0; for(i=2;i<=NF;i++) if($i+0!=0 && $i+0>=1)f=1} f' file
a  2   0   0   0   9
b   3   0   0   0.7 13

The code uses a variable f.  If f ends up as true (nonzero), then we print the row.

f=0

For each row, start by setting f to false (don't print)
for(i=2;i<=NF;i++) if($i+0!=0 && $i+0>=1)f=1

If any element is non-zero and is greater than one, then set f to 1 (true).
f

If f is true (nonzero), print this row.


How to run a cron job that relies on .Xauthority?

Assuming your user is logged in with an X session, and is the first session, it will get the display number 0, otherwise try to find out the display number the user is running. Try to put this in the user's crontab

*/5 * * * * DISPLAY=:0 /usr/bin/scrot


Is it possibe to view a forgotten admin password?

The actual passwords are not stored, you can only find their hashes in /etc/shadow.

There is no easy way to recover passwords, your best try is to use a software like John the Ripper to crack your password, but if you used a strong password, cracking it might take a very, very long time.


Unable to get to GRUB at boot and cannot boot with the default kernel

The top answer to the question you linked to explains how to get into the GRUB menu if pressing shift does not work. You just edit the file /etc/default/grub and comment out GRUB_HIDDEN_TIMEOUT=[some number]. Then you run sudo update-grub.

Since you can't boot at all, you can't do that so easily.

However, you can do it from a live system, so go ahead and boot from a live system as you did before.

Now you can set up a chroot. If you're not sure of the device label of your installation's root partition, try running sudo fdisk -l to identify it. You should see something in the output like

/dev/sda2 <numbers indicating size> Linux filesystem

Try mounting that partition:

sudo mount /dev/sdXY /mnt

where sdXY is the correct label. Then have a look to see if the mounted partition has the directories you expect to see in your root partition:

ls /mnt

If you see things like this (not necessarily exactly like this, but at least most of them)

bin    dev   mnt         root        sys   var
boot   etc   lost+found  opt         run   srv  tmp
home   lib   media       proc        sbin  usr

then you got the right partition.

If you have a separate boot partition, you will need to mount it. If you are not sure, check the file /mnt/etc/fstab to see if it has a partition mounted on /boot. Ignore any mention of a partition mounted on /boot/efi.

If you have a separate boot partition, mount it:

sudo mount /dev/sdXY /mnt/boot

where sdXY is the correct label of the boot partition.

We might need to bind some additional resources (I am not sure this is necessary in this case):

for d in dev sys run proc; do sudo mount --bind /$d /mnt/$d; done

OK, now enter the chroot

sudo chroot /mnt

Now we can act as if we are in our installed system. First let's edit the configuration file:

sudoedit /etc/default/grub

(or call your favourite text editor). Find the line

GRUB_HIDDEN_TIMEOUT=0

(it may have a different number, but that is not important). Comment out the line by placing # at the start of it, so it says

#GRUB_HIDDEN_TIMEOUT=0

If you do not have the above line, look for

GRUB_TIMEOUT_STYLE=hidden

and comment that out instead to

#GRUB_TIMEOUT_STYLE=hidden

check that the line

GRUB_TIMEOUT=[some number]

ends in a number greater than 0 (the default may be 10). Save the file and exit.

Run this command to write the configuration to /boot/grub/grub.cfg

sudo update-grub

Now you can reboot into your installation, and the GRUB menu will be forced to come up every time.


How can I make Compiz have the Genie minimize animation?

Open ccsm, go to Effects - Animations. Select Minimize Action tab.

Double click the default effect and modify it:

Tweak Duration as you like.


Lenovo Yoga 2 wifi 'disabled by hardware switch', no wifi hardware switch, tried installing both 15.10 and 16.04

Edit /etc/modprobe.d/blacklist.conf and add blacklist ideapad-laptop.

gksudo gedit /etc/modprobe.d/blacklist.conf


You add the path with -I arguments to g++ for example,

$ cat /home/efrisch/t/myheader.h
#include <iostream>
$ cat hello.cc
#include "myheader.h"

int main(int argc, char **argv) {
    std::cout << "Hello, World!" << std::endl;
}
$ g++ -O -I/home/efrisch/t hello.cc -o hello
$ ./hello
Hello, World!


Limit SFTP user access to specified directory

Settings for /etc/ssh/sshd_config

Subsystem sftp internal-sftp -f AUTH -l VERBOSE
UsePAM yes
Match group sftp
  ChrootDirectory %h
  ForceCommand internal-sftp
  AllowTcpForwarding no

create group sftp:

groupadd sftp

Create directory

sudo mkdir /ftpusers
sudo mkdir /ftpusers/HomeFolder

Create user directly with new sftp group attached:

sudo useradd -d /ftpusers/HomeFolder -m UserName -g sftp -s /bin/false
sudo passwd UserName

set permissions for use with ssh for sftp:

chown root:root /ftpusers/HomeFolder
chmod 755 /ftpusers/HomeFolder

restart service:

service ssh restart

Note, the home folder for the new sftp user has to be given root owner.


Check out the Help > Content (open it by pressing F1) - here the highlight:

Left arrow: Go back 15 seconds

Right arrow: Go forward 60 seconds

Shift+Left arrow: Go back 5 seconds

Shift+Right arrow: Go forward 15 seconds

Ctrl+Left arrow: Go back 3 minutes

Ctrl+Right arrow: Go forward 10 minutes


Do from terminal:

sudo apt-get install apt-file

Then, after it is installed and you updated the lists:

apt-file search mbstring.h

And this is the output that it returned to me:

mingw-w64: /usr/amd64-mingw32msvc/include/mbstring.h
mingw32-runtime: /usr/i586-mingw32msvc/include/mbstring.h
php-doc: /usr/share/doc/php-doc/html/book.mbstring.html
php-doc: /usr/share/doc/php-doc/html/intro.mbstring.html
php-doc: /usr/share/doc/php-doc/html/mbstring.http.html
php-doc: /usr/share/doc/php-doc/html/ref.mbstring.html
php5-dev: /usr/include/php5/ext/mbstring/mbstring.h
wine1.0-dev: /usr/include/wine/msvcrt/mbstring.h
wine1.2-dev: /usr/include/wine/msvcrt/mbstring.h
wine1.3-dev: /usr/include/wine/msvcrt/mbstring.h


Need to recover data from RAID5 array with just two out of three working disks

Great news.. I was able to answer my own question.

As much as the term scared me, I finally tried:
mdadm --assemble --force /dev/md0 /sda1 /sdd1

and I was rewarded with the message:
mdadm: /dev/md0 has been started with 2 drives (out of 3)

Hope this is useful to someone else.. in related news, the wikipedia article on mdadm (as of 2011/12/11) actually is one of the better resources out there for troubleshooting RAID mishaps.


Ubuntu to Lubuntu migration using only apt-get (for Ubuntu 13.04)

sudo apt-get remove account-plugin-aim account-plugin-facebook account-plugin-flickr account-plugin-google account-plugin-icons account-plugin-identica account-plugin-jabber account-plugin-salut account-plugin-twitter account-plugin-windows-live account-plugin-yahoo acpi-support acpid activity-log-manager-common activity-log-manager-control-center adium-theme-ubuntu aisleriot apg app-install-data-partner appmenu-gtk appmenu-gtk3 appmenu-qt apt-xapian-index apturl apturl-common avahi-autoipd avahi-daemon bamfdaemon baobab binutils bluez-alsa bluez-cups bluez-gstreamer branding-ubuntu brasero brasero-cdrkit brasero-common brltty checkbox checkbox-qt compiz compiz-core compiz-gnome compiz-plugins-default cryptsetup-bin cups-bsd dc dconf-tools deja-dup doc-base duplicity dvd+rw-tools empathy empathy-common eog espeak-data evolution-data-server evolution-data-server-common example-content firefox firefox-globalmenu firefox-gnome-support folks-common fonts-kacst fonts-kacst-one fonts-khmeros-core fonts-lao fonts-lklug-sinhala fonts-opensymbol fonts-sil-abyssinica fonts-sil-padauk fonts-takao-pgothic fonts-thai-tlwg fonts-tibetan-machine fonts-tlwg-garuda fonts-tlwg-kinnari fonts-tlwg-loma fonts-tlwg-mono fonts-tlwg-norasi fonts-tlwg-purisa fonts-tlwg-sawasdee fonts-tlwg-typewriter fonts-tlwg-typist fonts-tlwg-typo fonts-tlwg-umpush fonts-tlwg-waree foomatic-db-engine freerdp-x11 gcalctool gcc gcc-4.7 gedit gedit-common geoclue geoclue-ubuntu-geoip gir1.2-accounts-1.0 gir1.2-appindicator3-0.1 gir1.2-atspi-2.0 gir1.2-dbusmenu-glib-0.4 gir1.2-dee-1.0 gir1.2-gdata-0.0 gir1.2-gmenu-3.0 gir1.2-gnomebluetooth-1.0 gir1.2-gnomekeyring-1.0 gir1.2-goa-1.0 gir1.2-gst-plugins-base-0.10 gir1.2-gstreamer-0.10 gir1.2-gtksource-3.0 gir1.2-gudev-1.0 gir1.2-indicate-0.7 gir1.2-javascriptcoregtk-3.0 gir1.2-messagingmenu-1.0 gir1.2-peas-1.0 gir1.2-rb-3.0 gir1.2-signon-1.0 gir1.2-soup-2.4 gir1.2-syncmenu-0.1 gir1.2-totem-1.0 gir1.2-totem-plparser-1.0 gir1.2-ubuntuoneui-3.0 gir1.2-unity-5.0 gir1.2-webkit-3.0 gnome-accessibility-themes gnome-bluetooth gnome-contacts gnome-control-center gnome-control-center-data gnome-control-center-signon gnome-desktop3-data gnome-font-viewer gnome-games-data gnome-mahjongg gnome-media gnome-menus gnome-online-accounts gnome-orca gnome-power-manager gnome-screensaver gnome-screenshot gnome-session gnome-session-bin gnome-session-canberra gnome-session-common gnome-settings-daemon gnome-sudoku gnome-system-log gnome-system-monitor gnome-terminal gnome-terminal-data gnome-user-guide gnome-user-share gnomine growisofs gstreamer0.10-alsa gstreamer0.10-gconf gstreamer0.10-plugins-base-apps gstreamer0.10-pulseaudio gstreamer0.10-tools gstreamer0.10-x gtk2-engines-murrine guile-1.8-libs gvfs-bin gwibber gwibber-service gwibber-service-facebook gwibber-service-identica gwibber-service-twitter hplip hplip-data hwdata ibus-gtk3 ibus-pinyin ibus-pinyin-db-android ibus-pinyin-db-open-phrase ibus-table indicator-appmenu indicator-datetime indicator-messages indicator-power indicator-printers indicator-session indicator-sound intel-gpu-tools kerneloops-daemon landscape-client-ui-install laptop-detect libaccount-plugin-1.0-0 libaccounts-glib0 libaccounts-qt1 libart-2.0-2 libasound2-plugins libatk-adaptor libatk-adaptor-data libavahi-core7 libavahi-gobject0 libbamf3-0 libboost-date-time1.49.0 libbrasero-media3-1 libbrlapi0.5 libc-dev-bin libc6-dev libcamel-1.2-40 libcanberra-gtk-module libcanberra-gtk0 libcanberra-gtk3-0 libcanberra-gtk3-module libcanberra-pulse libcanberra0 libclutter-1.0-0 libclutter-1.0-common libclutter-gst-1.0-0 libclutter-gtk-1.0-0 libcmis-0.2-2 libcogl-common libcogl-pango0 libcogl9 libcompizconfig0 libcrypt-passwdmd5-perl libcryptsetup4 libcurl3-nss libdaemon0 libdbusmenu-qt2 libdecoration0 libdee-1.0-4 libdmapsharing-3.0-2 libdotconf1.0 libebackend-1.2-5 libebook-1.2-14 libecal-1.2-15 libedata-book-1.2-15 libedata-cal-1.2-18 libedataserver-1.2-17 libespeak1 libexempi3 libexiv2-12 libexttextcat-1.0-0 libexttextcat-data libfile-copy-recursive-perl libfolks-eds25 libfolks-telepathy25 libfolks25 libfreerdp-plugins-standard libfreerdp1 libgail-common libgail18 libgdata-common libgdata13 libgeoclue0 libgexiv2-1 libglew1.8 libglewmx1.8 libgmime-2.6-0 libgnome-control-center1 libgnome-desktop-3-4 libgnome-media-profiles-3.0-0 libgnome-menu-3-0 libgnome-menu2 libgnomekbd-common libgnomekbd8 libgoa-1.0-0 libgoa-1.0-common libgomp1 libgtkmm-3.0-1 libgtksourceview-3.0-0 libgtksourceview-3.0-common libgtkspell-3-0 libgweather-3-1 libgweather-common libgwibber-gtk3 libgwibber3 libhpmud0 libhyphen0 libical0 libido3-0.1-0 libindicate5 libitm1 libjavascriptcoregtk-3.0-0 libjs-jquery liblcms1 liblouis-data liblouis2 liblua5.1-0 liblvm2app2.2 libmessaging-menu0 libmetacity-private0a libmission-control-plugins0 libmng1 libmusicbrainz5-0 libmx-1.0-2 libmx-bin libmx-common libmysqlclient18 libmythes-1.2-0 libnotify-bin libnss-mdns libnux-3.0-0 libnux-3.0-common liboauth0 libopencc1 libpackagekit-glib2-14 libpam-freerdp libpam-gnome-keyring libpeas-1.0-0 libpeas-common libprotobuf7 libprotoc7 libproxy1-plugin-gsettings libproxy1-plugin-networkmanager libpulsedsp libpython3.2 libqjson0 libqt4-dbus libqt4-declarative libqt4-designer libqt4-help libqt4-network libqt4-script libqt4-scripttools libqt4-sql libqt4-sql-mysql libqt4-sql-sqlite libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns libqtassistantclient4 libqtcore4 libqtgui4 libqtwebkit4 libquadmath0 libquvi-scripts libquvi7 libraw5 libreoffice-base-core libreoffice-calc libreoffice-common libreoffice-core libreoffice-draw libreoffice-emailmerge libreoffice-gnome libreoffice-gtk libreoffice-help-en-us libreoffice-impress libreoffice-math libreoffice-ogltrans libreoffice-pdfimport libreoffice-presentation-minimizer libreoffice-presenter-console libreoffice-style-human libreoffice-style-tango libreoffice-writer librest-0.7-0 librhythmbox-core6 librsync1 libsane-hpaio libsensors4 libsgutils2-2 libsignon-extension1 libsignon-glib1 libsignon-plugins-common1 libsignon-qt1 libsnmp-base libsnmp15 libsonic0 libspeechd2 libspeexdsp1 libssh-4 libstlport4.6ldbl libsync-menu1 libsyncdaemon-1.0-1 libtelepathy-farstream2 libtelepathy-logger2 libtimezonemap1 libtotem-plparser17 libtotem0 libubuntuoneui-3.0-1 libufe-xidgetter0 libunity-core-6.0-5 libunity-misc4 libunity-protocol-private0 libunity-webapps0 libunity9 libuuid-perl libvncserver0 libwacom-common libwacom2 libwebkitgtk-3.0-0 libwebkitgtk-3.0-common libwmf0.2-7-gtk libyaml-tiny-perl libyelp0 libzeitgeist-1.0-1 light-themes lightdm-remote-session-freerdp lightdm-remote-session-uccsconfigure linux-headers-generic-pae linux-libc-dev make manpages-dev mcp-account-manager-uoa media-player-info metacity-common mousetweaks mscompress mtools mysql-common nautilus nautilus-sendto nautilus-sendto-empathy nautilus-share network-manager-pptp network-manager-pptp-gnome notify-osd notify-osd-icons nux-tools obexd-client onboard oneconf overlay-scrollbar overlay-scrollbar-gtk2 overlay-scrollbar-gtk3 pcmciautils pinyin-database pkg-config plymouth-theme-ubuntu-logo policykit-desktop-privileges pptp-linux printer-driver-c2esp printer-driver-foo2zjs printer-driver-hpcups printer-driver-min12xxw printer-driver-postscript-hp printer-driver-ptouch printer-driver-pxljr printer-driver-sag-gdi printer-driver-splix protobuf-compiler pulseaudio pulseaudio-module-bluetooth pulseaudio-module-gconf pulseaudio-module-x11 pulseaudio-utils python-apport python-configglue python-debtagshw python-dirspec python-gconf python-gi-cairo python-gnupginterface python-gst0.10 python-httplib2 python-imaging python-lxml python-mako python-markupsafe python-oauth python-openssl python-pam python-pexpect python-piston-mini-client python-problem-report python-protobuf python-pyinotify python-qt4 python-qt4-dbus python-renderpm python-reportlab python-reportlab-accel python-serial python-simplejson python-sip python-twisted-bin python-twisted-core python-twisted-names python-twisted-web python-ubuntu-sso-client python-ubuntuone-client python-ubuntuone-control-panel python-ubuntuone-storageprotocol python-uno python-xapian python-zeitgeist python-zope.interface python3-aptdaemon.pkcompat python3-brlapi python3-cairo python3-crypto python3-gi-cairo python3-httplib2 python3-louis python3-lxml python3-oauthlib python3-pyatspi2 python3-pycurl python3-speechd python3-virtkey qdbus qt-at-spi radeontool remmina remmina-common remmina-plugin-rdp remmina-plugin-vnc remote-login-service rhythmbox rhythmbox-data rhythmbox-mozilla rhythmbox-plugin-cdrecorder rhythmbox-plugin-magnatune rhythmbox-plugin-zeitgeist rhythmbox-plugins rhythmbox-ubuntuone rtkit samba-common samba-common-bin sane-utils seahorse session-migration sessioninstaller sgml-base shotwell signon-keyring-extension signon-plugin-oauth2 signon-plugin-password signon-ui signond sni-qt software-center software-center-aptdaemon-plugins sound-theme-freedesktop speech-dispatcher ssh-askpass-gnome syslinux syslinux-common syslinux-legacy telepathy-gabble telepathy-haze telepathy-idle telepathy-indicator telepathy-logger telepathy-mission-control-5 telepathy-salut thin-client-config-agent thunderbird thunderbird-globalmenu thunderbird-gnome-support toshset totem totem-common totem-mozilla totem-plugins ttf-indic-fonts-core ttf-punjabi-fonts ubuntu-artwork ubuntu-desktop ubuntu-docs ubuntu-mono ubuntu-settings ubuntu-sounds ubuntu-sso-client ubuntu-sso-client-qt ubuntu-system-service ubuntu-wallpapers ubuntu-wallpapers-quantal ubuntuone-client ubuntuone-client-gnome ubuntuone-control-panel ubuntuone-control-panel-qt ubuntuone-couch udisks unity unity-asset-pool unity-common unity-greeter unity-lens-applications unity-lens-files unity-lens-gwibber unity-lens-music unity-lens-photos unity-lens-shopping unity-lens-video unity-scope-gdocs unity-scope-musicstores unity-scope-video-remote unity-services unity-webapps-common unity-webapps-service uno-libs3 update-inetd ure usb-creator-common usb-creator-gtk vino wodim xcursor-themes xdiagnose xfonts-mathml xul-ext-ubufox xul-ext-unity xul-ext-websites-integration yelp yelp-xsl zeitgeist zeitgeist-core zeitgeist-datahub zenity zenity-common && sudo apt-get install lubuntu-desktop ubuntu-minimal && sudo /usr/lib/lightdm/lightdm-set-defaults -g lightdm-gtk-greeter

for more info http://www.psychocats.net/ubuntu/purelubuntu


I can't switch from one window to another

This sounds like a problem with Compiz, though it's difficult to be sure based on the information you provide. But you can test it yourself the next time you experience this; press Alt+F2 and enter compiz --replace.

You should expect the screen to flicker a little bit, and then everything should be fine. If it works, then that confirms that the problem is with Compiz. In that case, in order to make sure it doesn't happen again, you can choose No effects in System > Preferences > Appearance > Desktop Effects. (I haven't used 10.04 in a while, so the location might not be entirely correct. If not, just look for it in System > Preferences. You'll find it).

Changing the setting to No effects means switching to Metacity, which is a different window manager and won't have the same problems.


A usual Desktop cannot send emails by default.

You need an email account somewhere and then for example setup postfix with satellite SMTP (see Setting up a send-only mail server )


Ubuntu 12.04 LTS - installing Qt 4.8.5 and Qt Creator

Try doing sudo apt-get install synaptic, then open synaptic package manager. Install qt4-default and remove qt5-default. Hope it helps :)


Virtual machines lost internet after physical host upgrade

After further investigation I came to the conclusion that there must be something wrong with my bridge adapter. I ended up setting my bridge and network settings on the hypervisor from scratch and after a reboot all virtual machines were fully functioning again.

I have a hunch that a relatively fresh docker setup somehow conflicted with the parallel virtual infrastructure, but I failed to find the actual problem in the configuration so I cannot be 100% sure.

Anyway, this time the solution was a fresh build of a bridge configuration.


Opening Links from some applications takes a long time

I was having the same issue until I found a solution. Whenever I tried to click a link in Slack, the logs in journalctl -f showed:

xdg-desktop-portal-kde[1886]: xdp-kde-settings: Read called with parameters:
xdg-desktop-portal-kde[1886]: xdp-kde-settings:     group:  "org.kde.kdeglobals.General"
xdg-desktop-portal-kde[1886]: xdp-kde-settings:     key:  "menuFont"
xdg-desktop-portal-kde[1886]: xdp-kde-settings: Key  "menuFont"  doesn't exist"

It turns out I was missing some values in my .config/kdeglobals configuration file, as the error above shows. You can regenerate the missing values by going to System Configuration -> Fonts -> Do any random change -> Apply.

After doing this the links started working fine.


Slow SFTP Speeds with Raspberry Pi on Local Network

which soft are you using?
for example,ftp or just LAN shared files?
When typing IP address on Nautilus, Nautilus have to decide which software to use.
so assume your RPI IP is 192.168.1.2, if your RPI were using ftp ,then type : ftp://192.168.1.2. (sftp maybe the same, I haven't used)
if you are using LAN shared files, make sure the directory of RPI has been shared with all the permissions. Then try type IP on Nautilus again.


how to search file using wget or curl on server?

You can not search for files on a server with the HTTP protocol. The server may give you a directory listing of a directory if you request a directory path rather than a specific file and there is no default file to send available (i.e. index.html). But this directory listing is not a directory listing as the output of the shell command ls -l, but a server generated html-document which contains a well formatted and linked representation of a directory listing which, of cause, must not contain all files of the server directory.

It is up to you to analyse the delivered html document and take the information you need to traverse through the server file system.

But as I say, the server may send you that listing. But it is more common that there is a default file in the directory (i.e. index.html) which the server would deliver or that it sends you a html-document with the content "404 - Not found" to inform you, that the requested directory has no default file to deliver and that there is nothing else the server could do for you.


Which might cause this problem is Antivirus. If you are running any Antivirus disable it temporarily until installation complete then re-enable Antivirus again.
If solution didn't solved try installing Chromium from Snap Store which won't have this problem.


If you know where the logical volumes begin/end you should be fine. The easier method to know that is through the lvm backup files you have. It doesn't really matter that they're a few days old, as long as the lvm-partitioning didn't change since then. On the other hand, if you've modified the partitioning then you've to grep search the devices for this information. This is slightly more challenging but not still feasible.

Have a look at what this guy did.

Or this other one

In a nutshell the usual recovery strategy for lvm corrupted systems seems to be this:

find where the logical volume/s you want to recover begins/ends
dd the blocks in this sector in a new file
Possibily manipulate the header so that it works (someone zeroed the
lvm header), then mount the file as ext3/4 block device.
Recover files


How do I install Ubuntu on one hard drive, and use a second hard drive for storage?

You don't need to do anything special.  Just start Ubuntu installation and select the option to erase everything and install Ubuntu.  Your first hard disk will be selected automatically.  The other one won't be used at all for the installation.  It will keep all the partitions and the data it holds.


error: attempt read-write outside of disk `hd0`

It can be a BIOS problem. Your screenshot says:

  Alienware M14xR1/M14xR1, BIOS A04

So I think this is the support page of your laptop. If you look under the BIOS sections you will see two available BIOS updates. (One of them (A08) is even marked as "Urgent", but I think it is only urgent for those who installed A07) You can also look at the A07 version of the BIOS under "previous versions", where it says:

  Fixes & Enhancements: Modify SATA speed limit to SATA2

(So maybe there is some kind of SATA speed mismatch causing this problem for you, just guessing.)

So I would advise you to update you BIOS to the latest available (A08) and check the results.


Complete Disk Wipe, reformat and OS change

If your hardware is not too exotic ALL hardware drivers will be included.  It is best to test Ubuntu from a live disc (instructions on how to make a live CD/DVD or Live USB can be found here) to make sure everything works. When installing you can simply select "erase everything and install ubuntu" and the disc will be formatted before installing, however formatting using other methods first should not affect installation
The BIOS is on a chip on your motherboard. Wiping the hard drive will have no effect on the BIOS. For additional information have a look this guide on my website for details and a video on accessing and using BIOS. (if it helps let me know so I can post the details here)
With only 512mb Ram you would be best off using Lubuntu 12.04 since it is less hardware hungry.
You don't need to worry at all. Just read all the Installation Instructions carefully, and you'll be all right. However, there are several problems that people encounter mostly because they don't follow the instructions correctly. If you encounter any problem, search the web. Most of the problems are already answered.


Can't get ubuntu 12.04 to set pixel resolution higher than 1360x768

0pen gnome-display-properties from the dash or in a Terminal. There you could choose the resolution that fits your needs.


Two bugs with Keyboard Shortcuts: confirmation and/or solutions requested

Till this date I have seen most of the program using Ctrl+TAB for iterating through opened tab panes,and Ctrl+W to close the presently active tabbed pane.

Now what you are expecting is closing the application i.e. overriding the default to act on whole application rather than the internal child contents in both the cases.

So marking them as bug wont be right as they are doing what has been assigned to them, but your experiment is creating conflict for them.Right now I am not using ubuntu 12 otherwise must have suggested you some workaround. :)


Ubuntu 11.10, FF 11, ATI Catalyst v12.2, Driver Package version 8.95, WebGL doesn't work

I have been able to get WebGL working by passing the aticonfig --initial command in the terminal. This is an installation step for the driver that I have initially missed.


ubuntu-12.04.3-desktop-i386(i have downloaded it manually)

To install from a USB stick, just:

Download Rufus
Run Rufus and select your USB stick as the device
Click Start
Once Rufus is done, reboot to BIOS on the computer you wish to install on
Change the boot order to USB first
Plug in your USB if it is not still plugged in and cold reboot your computer
The computer should boot straight to Ubuntu, from which you can install as if from a disk

I have tried this process and it worked for me. Also, be sure to make sure your checksums match for your iso.


If you don't mention any file descriptor, it defaults to file descriptor 1 (standard output). If you do give an explicit descriptor, you must do so without whitespace before the >> operator. As noted in man bash:

   Appending Redirected Output
       Redirection of output in  this  fashion  causes  the  file  whose  name
       results  from  the expansion of word to be opened for appending on file
       descriptor n, or the standard output (file descriptor 1) if  n  is  not
       specified.  If the file does not exist it is created.

       The general format for appending output is:

              [n]>>word

So when you wrote

tail /var/log/fontconfig.log 1 >> /home/myuser/b.log

it tries to tail both /var/log/fontconfig.log and a file named 1, and redirect the resulting standard output to /home/myuser/b.log : the error is because you don't have a file named 1 from which tail can read.


How Can I Monitor My Laptop Battery Usage?

To check if your laptop was hibernating, sleeping or active you can check the syslog files in the /var/log folder, for example with

grep -i 'shutdown\|sleeping\|hibernat\|resumed' /var/log/syslog*

AFAIK there isn't any software that keeps a history of battery usage of all processes, at least not something similar to what Android has. There are some statistics in the default 'Power statistics' application but it only shows how fast your battery was drained/charged, not which processes are responsible for it.

Probably the best you can do is install an application like PowerTOP (sudo apt install powertop). It shows which processes are most actively using the CPU. After PowerTOP has run on battery for some time and has taken enough measurements, it will start showing process power consumption in terms of wattage.

However I doubt if you can use it to check power consumption during hibernate or suspend. I tried generating a report with sudo powertop --html=powertop.html --time=300 while letting my laptop go into sleep mode and it seems the program just stops measuring while the system is sleeping. Also not all reported stats seem to be accurate when you use the --time= option and/or let your system go to sleep mode.


Ubuntu 16.04 installed AMD Drivers -oops

Run

sudo sh amd-driver-installer-x86.x86_64.run --uninstall

in the directory where the driver installer was downloaded.

It will remove the driver and your resolution will be back to normal.


Odd LiveCD error message that says "??? ???"

There are Athlons and then there are Athlons. Specifying which you have is a good idea, for you could have four different versions running at 855MHz.  It could also be very useful to discover which network card you have with lshw while running from the Live disc.

However, standard Ubuntu will run slowly on your machine, and therefore I suggest you consider using the Lubuntu or Xubuntu variants of Ubuntu as both have a lighter desktop and thereby will run faster, but will run the same apps as stock Ubuntu.


This is not a real answer to your question, but after the complication of setup and its slowness, I decided to use adminer: just one file, a lot of feature, more speed and no installation required: http://www.adminer.org . I suggest it to you.


15.04: I can't change the resolution of my second screen (Nvidia)

The 340.76 version from edgers ppa works:

sudo apt-add-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-340


Can I open .debs with Synaptic in 11.10?

You open downloaded debs with gdebi

It is not installed by default, so use this command to do so

sudo apt-get install gdebi

To make it default for deb handling, follow these steps

Right click on any .deb file and click properties

Go to the Open With Tab

Select Gdebi Package Installer and click Set as default

As for software center, you can safely remove it by the following command:

sudo apt-get remove software-center

and you can use synaptic for the GUI installation of packages from the repos


Why I can't write a file in /tmp/ even when it is root:root and has "t" flag?

The sticky bit will prevent any user other than the owner of file (and owner of directory and root) to remove/rename any file inside the directory containing sticky bit. If any user does not have permission to write then he would not be able to create any file in /tmp or any other directory having sticky bit set, same goes for read and execute operations.

In your case if postgres has sufficient permission to read/write/execute files in /tmp then he can do that otherwise you need to set the appropriate permissions manually.

Example :

drwxrwxrwt   7 root   root    4096 Jun  9 00:41 tmp

$ sudo chmod o-rwx /tmp

drwxrwx--T   7 root   root    4096 Jun  9 00:41 tmp

$ touch /tmp/foo.txt
touch: cannot touch ‘/tmp/foo.txt’: Permission denied

$ sudo chmod o+rwx /tmp

$ touch /tmp/foo.txt

$ ls -l /tmp/
-rw-rw-r-- 1 user user    0 Jun  9 00:50 foo.txt


Most likely, your problem is being caused by Secure Boot which is a new Win8 feature. You can start with disabling Secure Boot while looking for a better solution with an SB-compatible Linux loader. Check this thread: GRUB UEFI windows boot fail

P.S. What is a "4th generation laptop"? )


How to start dconf and gconf in a non-Gnome environment?

I am not entirely sure if this is all but I have compared my Gnome environment with Openbox and found the following additional processes to be started by Gnome:

gsettings-data-convert &
/usr/lib/Gconf/gconfd-2 &
/usr/lib/dconf/dconf-service &

In addition it might help to export the following variables:

export DE=gnome
export DESKTOP_SESSION=gnome


First type  sudo gedit /etc/grub.d/40_custom in a terminal and add this boot sequence to the file.

menuentry "Lineage x86" {
  set root='(hdX,Y)'
  linux /cm-x86-14.1-rc1/kernel quiet root=/dev/ram0 androidboot.selinux=permissive acpi_sleep=s3_bios,s3_mode SRC=/cm-x86-14.1-rc1
  initrd /cm-x86-14.1-rc1/initrd.img
}

hdX,Y here is the name of your partition where Android is installed. My installed partition is sda9, so the entry will be hd0,9. For sdb5 the entry would be hd1,5 and so on.

If you haven't installed cm-x86-14.1-rc1 but some other version, replace the lines containing "cm-x86-14.1-rc1" with your version.

Then save the file and run sudo update-grub in terminal.

A new working GRUB menu entry for your new androidx86 should be available at the next boot.

PS: androidboot.selinux=permissive is necessary for androidx86 version >=7.0


grub menu lists windows xp fails to boot

Try setting a nomodeset option.
On some hardware configurations, you need to set some kernel parameters for ubuntu to boot or work properly. A common one is nomodeset, which is needed for some graphic cards that otherwise boot in to a black screen or corrupted splash, acpi_osi= to fix lcd backlight and other problems, and noapic and nolapic to work around various ACPI BIOS issues.

Note that this option is sometimes needed for nVidia cards when using the default "nouveau" drivers. Installing proprietary nvidia drivers usually makes this option no longer necessary, so it may not be needed to make this option permanent, just for one boot until you installed the nvidia drivers.

Sourced from: http://ubuntuforums.org/showthread.php?t=1613132


Chrome Ignores Monospace Font Choice in Settings

The font settings in Chrome was not meant to override the settings provided by the Website. It will only take effect when webpage provides a generic name for fonts like Serif, or Sans Serif or the font name specified are not found. If a website specifies a font and that font is available in your computer or can be downloaded as a web-font, your settings will not take effect.

Here is a Google forum post about same topic. The user Core says same there. But you can use an extension to force your settings take effect.

Here is one such extension. It's Force custom fonts. There should be many others to choose from.


unable to enter proxy authentication details in synaptic Ubuntu 13.04

I have the same problem, also in 13.04 - 64 bit.
In Ubuntu 12.10 - 64 bits, on the same machine, it worked.

Anyway, until the problem is solved, you can manually edit its conf file to change proxy parameters for Synaptic.

The file is /root/.synaptic/synaptic.conf and you can specify the user and password on the   httpProxyUser and
httpProxyPass lines


Mm... I have faced the same problem recently, but don't remember what i did to it to work ;-( If you have installed Ubuntu inside windows, try to run check disk the partition of the Wubi installation (Ubuntu installation) and boot into Ubuntu again, what have you done before this problem, I think you have done something wrong with the GDM (Gnome display manager) is it?


Move windows between screens in dual screen mode

1. Script to swap all windows from screen 1 --> screen 2 and vice versa

The script assumes the screens are of the same vertical resolution, and the left screen is the primary one. The horizontal resolutions of both screens is searched by the script.

How to set up

The script needs wmctrl to be installed:

sudo apt-get install wmctrl

Copy the script below into an empty file, save it as swap_windows (no extension) in ~/.bin. Create the directory if it doesn't exist already, and make the script executable.
If you just created the directory ~/bin (it didn't exist yet), either log out/in or run in a terminal: source ~/.profile.
test run the script with the command:

swap_windows

If all works as expected, add shortut key; choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command

The script

#!/usr/bin/env python3
import subprocess
import sys

def get(cmd):
    return subprocess.check_output(["/bin/bash", "-c",  cmd]).decode("utf-8")

def get_shiftright(xr_output):
    lines = [l for l in xr_output.splitlines() if "+0+0" in l][0].split()
    return int([it for it in lines if "x" in it][0].split("x")[0])

def get_shiftleft(xr_output):
    lines = [l for l in xr_output.splitlines() if  "+0" in l and not "+0+0" in l][0].split()
    return -int([it for it in lines if "x" in it][0].split("x")[0])

def swap_windows():
    xr_output = get("xrandr")
    shift_r = get_shiftright(xr_output)
    shift_l = get_shiftleft(xr_output)
    w_data = [l.split() for l in get("wmctrl -lG").splitlines()]
    for w in w_data:
        props = get("xprop -id "+w[0])
        if any(["_TYPE_NORMAL" in props, "TYPE_DIALOG" in props]):
            if 0 < int(w[2]) < shift_r:
                shift = shift_r
            elif shift_r-shift_l > int(w[2]) >= shift_r:
                shift = -shift_r
            else:
                shift = 0
            command = "wmctrl -ir "+w[0]+" -e 0,"+(",").join([str(int(w[2])+shift), str(int(w[3])-28), w[4], w[5]])
            subprocess.Popen(["/bin/bash", "-c", command])
swap_windows()

2. Script to move (all) windows from one monitor to the other

The script below moves windows in a dual monitor setup from one screen to another, either:

from the left to the right monitor -->

or
from the right to the left monitor <--

Depending on the argument you run it with (left or right)

The script (again) assumes the screens are of the same vertical resolution, and the left screen is the primary one. The horizontal resolutions of both screens is searched by the script.

How to set up

The script needs wmctrl to be installed:

sudo apt-get install wmctrl

Copy the script below into an empty file, save it as shift_windows (no extension) in ~/.bin. Create the directory if it doesn't exist already, and make the script executable.
If you just created the directory ~/bin (it didn't exist yet), either log out/in or run in a terminal: source ~/.profile.
test run the script with the commands

shift_windows right

and:
    shift_windows left

In the first case, windows on your left screen should move to the right screen and in the second case vice versa.
If all works as expected, add the script to two shortcut combinations: choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the commands as explained above.

The script

#!/usr/bin/env python3
import subprocess
import sys

vec = sys.argv[1]

def get(cmd):
    return subprocess.check_output(["/bin/bash", "-c",  cmd]).decode("utf-8")

def get_shiftright(xr_output):
    lines = [l for l in xr_output.splitlines() if "+0+0" in l][0].split()
    return int([it for it in lines if "x" in it][0].split("x")[0])

def get_shiftleft(xr_output):
    lines = [l for l in xr_output.splitlines() if  "+0" in l and not "+0+0" in l][0].split()
    return -int([it for it in lines if "x" in it][0].split("x")[0])

def shift_windows():
    xr_output = get("xrandr")
    shift_r = get_shiftright(xr_output)
    shift_l = get_shiftleft(xr_output)
    w_data = [l.split() for l in get("wmctrl -lG").splitlines()]
    for w in w_data:
        props = get("xprop -id "+w[0])
        if vec == "right":
            check = (0 < int(w[2]) < shift_r, "_TYPE_NORMAL" in props, "TYPE_DIALOG" in props).count(True)
            shift = shift_r
        if vec == "left":
            check = (shift_r-shift_l > int(w[2]) >= shift_r , "_TYPE_NORMAL" in props, "TYPE_DIALOG" in props).count(True)
            shift = -shift_r
        if check == 2:
            command = "wmctrl -ir "+w[0]+" -e 0,"+(",").join([str(int(w[2])+shift), str(int(w[3])-28), w[4], w[5]])
            subprocess.Popen(["/bin/bash", "-c", command])
shift_windows()

3. Move a single window from one screen to another

Although not literally your question, with just a few lines more, you can either move all windows from one screen to the other, but also a single one (the frontmost) with a key combination.

With the script below, you can move all windows with the command:

shift_windows right

or move a single window with the command:

shift_windows right s

The setup is pretty much the same as the script above (don't forget to install wmctrl)

The script

#!/usr/bin/env python3
import subprocess
import sys

vec = sys.argv[1]
try:
    n = sys.argv[2]
except IndexError:
    n = "a"

def get(cmd):
    return subprocess.check_output(["/bin/bash", "-c",  cmd]).decode("utf-8")

def get_shiftright(xr_output):
    lines = [l for l in xr_output.splitlines() if "+0+0" in l][0].split()
    return int([it for it in lines if "x" in it][0].split("x")[0])

def get_shiftleft(xr_output):
    lines = [l for l in xr_output.splitlines() if  "+0" in l and not "+0+0" in l][0].split()
    return -int([it for it in lines if "x" in it][0].split("x")[0])

def shift_windows():
    xr_output = get("xrandr")
    shift_r = get_shiftright(xr_output)
    shift_l = get_shiftleft(xr_output)
    w_data = [l.split() for l in get("wmctrl -lG").splitlines()]
    if n == "s":
        frontmost = [l for l in get("xprop -root").splitlines() if "_NET_ACTIVE_WINDOW(WINDOW)" in l][0].split()[-1]
        frontmost = frontmost[:2]+"0"+frontmost[2:]
        w_data = [l for l in w_data if frontmost in l]
    for w in w_data:
        props = get("xprop -id "+w[0])
        if vec == "right":
            check = (0 < int(w[2]) < shift_r, "_TYPE_NORMAL" in props, "TYPE_DIALOG" in props).count(True)
            shift = shift_r
        if vec == "left":
            check = (shift_r-shift_l > int(w[2]) >= shift_r , "_TYPE_NORMAL" in props, "TYPE_DIALOG" in props).count(True)
            shift = -shift_r
        if check == 2:
            command = "wmctrl -ir "+w[0]+" -e 0,"+(",").join([str(int(w[2])+shift), str(int(w[3])-28), w[4], w[5]])
            subprocess.Popen(["/bin/bash", "-c", command])
shift_windows()


You could try reinstall both, and then again set the default, and type this in the terminal:

sudo apt-get install thunderbird

sudo apt-get install kmail

and then enter this

sudo dkms-reconfigure chromium

and it might work fine this way.


Copy string to clipboard and display into output window simultaeneously

To copy the output to the clipboard also outputting to the current terminal you could simply use tee, which will output its stdin to any file passed to it as an argument and to stdout; you can use a process substitution running xclip to "fake" a regular file and output to it instead of to a regular file:

echo -n $GEDIT_CURRENT_DOCUMENT_URI | tee >(xclip -selection clipboard)

Another option is to output to one of the free "default" pseudo-terminals (tty1 to tty6), which have a correspodent device file in "/dev" ("/dev/tty1" to "/dev/tty6"):

echo -n $GEDIT_CURRENT_DOCUMENT_URI | tee >(xclip -selection clipboard) >/dev/tty1

Yet another option is to output to another "listening" pseudo-terminal using a named pipe; this requires a setup to set the "listening" terminal:

First open the "listening" terminal and run this script (for the sake of the example I'll assume that the script is running in ~/tmp):

#!/bin/bash
mkfifo fifo # creates a named pipe named "fifo" in the current working directory
trap 'rm fifo; exit 0' 1 2 3 13 15 # traps SIGHUP, SIGINT, SIGQUIT, SIGPIPE and SIGTERM; removes "fifo" and exits upon the reception of each of them
while [ 1 ]; do
    cat fifo # outputs the content of "fifo"
done

This will create a named pipe named "fifo" in the current working directory and will continuously output its content until the script execution is halted;

Then using Gedit's External Tools run this modified version of the second command, which instead of redirecting the output to "/dev/tty1" redirects it to the named pipe:

echo -n $GEDIT_CURRENT_DOCUMENT_URI | tee >(xclip -selection clipboard) >>~/tmp/fifo

Sample output using two gnome-terminal instances:

  Running the script on the right terminal

  Running echo -n $GEDIT_CURRENT_DOCUMENT_URI | tee >(xclip -selection clipboard) >>~/tmp/fifo on the left terminal

  Hitting CTRL+SHIFT+V

More informations on named pipes


Can I use fstab to mount ssh without pub keys and without entering a password?

You can use sshfs for remote mounting using ssh with user and password
Ubuntu-SSHFS

Install sshfs package

$ sudo apt-get install sshfs


I as well had this issue, for my setup it was a rather simple fix. If you look under Applications>System Tools. You'll find a program called Additional Drivers, Open it. Browse to the tab "Additional Drivers" and wait for it to load. Amongst the list of other potential drivers, find the one that says "Broadcom Corporation: BCM4360" and select the "Use this driver" option, then the "Apply Changes" button. I'm unaware if a system restart is required, but I always restart after installing new drivers to insure everything is functional before I begin.

If this solution does not work for your machine, I apologize.

~Best of luck!


cp $file >> backupfile.txt

Should be:

cp "$file" backupfile.txt

>> is used to append output, which is not what you need to do.

Other things:

Quote your variables: Use "$file". What will happen if user enters File Name With Spaces?
file=$file is a tautology. And unnecessary.


Ubuntu 15.10: Cannot expand Ubuntu partition even though I have 14GB of unallocated space

The partition you are trying to re-size is mounted and in use (since it's your system partition), and you cannot unmount it when it is active (also since it's your system partition).

To fix it:

Boot from a USB or CD with a Linux live distribution (Ubuntu for example)
Now use Gparted to re-size your partition. GParted is part of the default toolset in Ubuntu live environment.


bash doesn't use all directories from $PATH to search for executable

Bash keeps a cache of PATH lookups. I surmise that you removed /usr/bin/clamscan during the lifetime of this instance of bash, so it still has the presence of that file in its cache. Use the hash command to rebuild the cache: hash clamscan for just one name or hash -r to erase the cache and start over.


pulseaudio does not start after logout and login again

Try changing default output plugin with the tool: gstreamer-properties.
Select default output as "PulseAudio Sound Server". It should work. Logout and Login again.

If you have still problem, Delete the folder .pulse and the file .pulse-cookie in your home directory. Logout and Login again to see change.


According to smart status ...

  Hard drives, supporting this attribute

  Samsung, Seagate, IBM (Hitachi), Fujitsu, Maxtor, Western Digital, Hewlett-Packard

and

  End-to-End error S.M.A.R.T. parameter is a part of HP's SMART IV technology and it means that after transferring through the cache RAM data buffer, the parity data between the host and the hard drive did not match. For detailed information see SMART IV Documentation from HP.
  Recommendations

  This is a critical parameter. Degradation of this parameter may indicate imminent drive failure. Urgent data backup and hardware replacement is recommended.

I would suggest getting a replacement disk. But I have seen it also before and the disk could still have a few years of life in it.


How can I successfully install Ubuntu 12.10 next to windows 7

If you are unsure about partitions I wouldn't even install it. My recommendation is to install it inside windows like a program, this way you don't risk overwriting your partitions. I found this link http://www.ubuntu.com/download/desktop/windows-installer


Recovering a borked GRUB with a Ubuntu 19.10 ZFS root filesystem

Since your commands above get it to boot, the first & straightforward way is to insert them into your/boot/grub/grub.cfg (standard location) like this:
Menuentry 'my Ubuntu installation' {
insmod zfs
insmod part_gpt
insmod (whatever)
 ... here go your commands (without "boot")...
}

Most likely, if editing grub.cfg is enough, you many not even need the insmod stuff there. Anyway, won't hurt to take a look at the entries already there (created by the system install).
OR you may choose to reinstall grub altogether using grub-install command, assuming your (hd0) is /dev/sda: grub-install /dev/sda.


$ wget http://download.redis.io/releases/redis-5.0.5.tar.gz
$ tar xzf redis-5.0.5.tar.gz
$ cd redis-5.0.5
$ make

And then run redis-server:

$ src/redis-server


How to prevent another user from editing my display name in Empathy?

Set up different user accounts for each user, or, a separate account just for yourself with autologin disabled, and a shared account for everyone else.


I'm assuming you have some embedded board and intend to plug in some USB Audio Class device to have it play audio?

JACK is a sound server that can be installed with the jackd package, if you didn't know that already.

Note that JACK is intended for professionals. If you didn't use JACK before and just want to play audio similar to what is used in the Ubuntu Desktop releases you should have a look at the alsa-base and probably pulseaudio packages to get things started (be aware of the dependencies that are being pulled in!).

The error message requiring "jack server" may just be misleading, as most applications should work fine with PulseAudio or ALSA alone.


How to auto ban an IP when he access some ports?

**

What is the recommended way to automatically ban IP?

**
iptables and ufw can do better with a little automation.
fail2ban does that and I would recommend that as a good choice.
Do preliminary checks,

check for established connections
sudo lsof -i -n | egrep '<sshd>' | grep ESTABLISHED
sudo lsof -i -n | egrep '<ssh>' | grep ESTABLISHED

check for weird users & sudo-ers
getent group sudo | cut -d: -f4
grep -Po '^sudo.+:\K.*$' /etc/group

Persistent Bans
With a little tweak, you can ban repeated attempts and restore the ban in effect.
install fail2ban,
apt install fail2ban

now edit the multiport.conf file in fail2ban vim or nano,
nano /etc/fail2ban/action.d/iptables-multiport.conf

append these lines to 'actionstart' (from 4th line i guess )
cat /etc/fail2ban/persistent.bans | awk '/^fail2ban-<name>/ {print $2}' \
          | while read IP; do iptables -I fail2ban-<name> 1 -s $IP -j <blocktype>; done

such that it looks something like this
[Definition]

# Option:  actionstart
# Notes.:  command executed once at the start of Fail2Ban.
# Values:  CMD
#
actionstart = <iptables> -N f2b-<name>
              <iptables> -A f2b-<name> -j <returntype>
              <iptables> -I <chain> -p <protocol> -m multiport --dports <port> -j f2b-<name>
        cat /etc/fail2ban/persistent.bans | awk '/^fail2ban-<name>/ {print $2}' \
          | while read IP; do iptables -I fail2ban-<name> 1 -s $IP -j <blocktype>; done

append this line to 'actionban' right after the line actionban = ... for a persistent ban on the ips
echo "fail2ban-<name> <ip>" >> /etc/fail2ban/persistent.bans

now restart fail2ban,
sudo service fail2ban restart

and give some 'ban'
   sudo fail2ban-client set sshd banip  112.0.0.0/8
   sudo fail2ban-client set sshd banip  222.186.0.0/16

now check for effective persistent bans,
tail /var/log/fail2ban.log

you should see something like,
NOTICE  [sshd] Restore Ban 112.0.0.0/8

this way repeated attacks can be avoided and now you can use iptables to allow just for your ip
PS: as fail2ban works on banning persistently the attackers, you can just relax and make sure no ESTABLISHED connections to the services using,
sudo lsof -i -n | egrep '\<ssh\>'
sudo lsof -i -n | egrep '\<sshd\>'

(note that you need specific 'jail' for specific service ) and see the persistent bans
cat /etc/fail2ban/persistent.bans

Output:
fail2ban-sshd 112.0.0.0/8
fail2ban-sshd 218.92.0.0/16
fail2ban-sshd 218.92.0.138

Explanation

actionstart:  we can add some action commands that will execute only during fail2ban start. so, we added /etc/fail2ban/persistent.bans during start

actionban: whenever a ban is imposed on an ip, the ip is added to persistent.bans file which will be in effect during the fail2ban run. You can relaxed-edit this file later if you feel an ip is not involved in malicious attacks.

you can manually ban ip's in question using
sudo fail2ban-client set sshd banip  112.0.0.0/8
sudo fail2ban-client set sshd banip  222.186.0.0/16


You're not going to hurt either your Ubuntu or Windows systems by exchanging drives, other than the fact that you're going to be handling the drives a lot more than they need to be, and if they're mechanical drives, as opposed to solid state drives, they will probably wear out a lot quicker. You are able to load both operating systems on the same hard drive if that's the only reason you want to swap drives. This is called dual booting.

To accomplish this is extremely easy, you will want to install your Windows OS first (due to Window's Boot Record tendency to overwrite Grub). Once you have Window's installed you can open disk manager, and resize your disk to allow for at least 50GiB of "unallocated" space. Once this is complete reboot your computer and startup into Ubuntu. Click "Install Ubuntu" and go through the instructions for setup. When prompted for which disk to install to, make sure you select "Largest contiguous free space". This will ensure Ubuntu installs to the "unallocated" space you created using Window's Disk manager. When installing Grub, Ubuntu should detect your Windows OS, and will display this information. Go ahead and install Grub, when you startup, there will be an option in Grub to boot Windows. Complete the installation instructions, and viola! You now have a dual bootable system with both Windows and Ubuntu.


How do I scale the enormously sized desktop icons on Ubuntu 18.04?

Open Files (aka Nautilus)
Grid view: Change your icon view from "list" to "grid" first by clicking the button next to the hamburger menu.

Zoom out: Click on the hamburger menu (three-horizontal-lined button at top-right) and decrease the icon size by clicking the "zoom out" button (or Ctrl+-).

This should also reduce the size of the icons in your desktop.


Google Chrome in Kubuntu does not use file manager to show files?

Go to Downloads. At there, right-click the downloaded file. Choose 'Open with...' and select the File Manager.

Hope this helps!


To remvove Unity

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo apt-get remove unity unity-2d-places unity-2d unity-2d-panel unity-2d-spread unity-asset-pool unity-services unity-lens-files unity-lens-music unity-lens-applications gir1.2-unity-4.0 unity-common indicator-sound indicator-power indicator-appmenu libindicator6 indicator-application evolution-indicator indicator-datetime indicator-messages libnux-1.0-0 nuxtools gnome-control-center-signon gnome-control-center-signon-autopilot

To Install Gnome

To Install Cinnamon 1.4 in ubuntu

Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable
sudo apt-get update
sudo apt-get install cinnamon

Source: http://ubuntublog.org/how-to-remove-unity-desktop-in-ubuntu-12-04.htm


Right-click, curser interaction issues, Ubuntu 18.04

This sounds like it is a hardware problem - a loose connection on the touchpad?
Are you only running Ubuntu on this machine, or can you boot into another OS? Does the problem also exist on that other OS?
If you are not running another OS on the laptop, maybe try to make a USB/DVD "live CD" of a distribution that you can try without installing (Ubuntu 20.04 USB will allow this). Then see if your problem exists on the live distribution.
Good luck :)


installing 64 bit kernel on 32bit ubuntu

The following combinations will work:

32 bit CPU with 32 bit kernel and 32 bit software
64 bit CPU with 32 bit kernel and 32 bit software
64 bit CPU with 64 bit kernel and 32 bit software
64 bit CPU with 64 bit kernel and 64 bit software

In general running 32 bit software with a 64 bit kernel means having most of your system 64 bit and just running a few 32 bit applications - usually things like skype or steam for which we do not have source code and hence cannot recompile for a new processor.

In theory it should be possible to run an entirely 32-bit userland with only a 64 bit kernel. See, eg reports of people doing this successfully on Arch. But the package manager is unlikely to be happy with this, so it would involve quite a lot of DIY.

In the past this was an attractive option because running 32 bit applications in a 64 bit userland was fraught with problems. This is now largely solved, so running a mixed system in this way seems to have few advantages, and many disadvantages, compared to just running a pure 64 bit system.


pSX isn't broken for me.

If you already installed libgtkglext1 from package manager:

The problem that shows you have around pulseaudio was included.

The easier solution is runing pSX like root (sudo ./pSX), the emulator shows and run. Then you should change the audio conf at file/configuration and sound tab.

The device is setting like "Default" and need to be your device name (change this option with your dev). Now you can close the emulator.

Look for the psx.ini file in the root folder (/root/.pSX/psx.ini) and copy the sound device code, this would look like this:

[Sound]
Frequency=-1
Sync=1
Reverb=1
Interpolate=1
Latency=32
XALatency=20
Device=b7d317a4 (this is my dev, your could be different)

Now open the INI file, but the one of your user (for example: /home/yourusername/.pSX/psx.ini) and paste the device code that you copy before.

Your emulator should run fine now.

Don't know if the epsxe problem share the same solution.


Wine Security - Improvement by second user account?

Some ideas:

You can just change the owner of the wine executable to the second user and then give execute permission only to that user.

Another way would be to move the wine executable to some other place which is not in path of your user account and add it to the path of the other users account.

Third way is, to remove the link in nautilus to execute .exe with wine. But this does not prevent .exe files from ever being executed with this user account.

Fourth way would be to create a .wine directory in your home folder before installing wine and then remove privileges for your user name, such that wine could never access it with your user account.


Is it possible to turn trackpad on/off manually?

I think your touchpad just has an abstract name.

Try this command:

xinput disable 13

which disables the "AlpsPS/2 ALPS GlidePoint" device, then check if the touchpad works.

If it doesn't work, you can try disabling each of the pointers in turn (remember to enable the last one before disabling the next one!)

Note: You can re-enable a device with this command, replacing $ID wit the ID of the device:

xinput enable $ID


Creating floppy drive special devices under Quantal

It really seems that create_floppy_devices is not available in Ubuntu. To make this work you can try two things:

Download the source code and try to compile it manually. Here is the code of that utility (it is a fork of udev, but you can search in the internet for the original);
fdutils package provide a command called MAKEFLOPPIES that seem similar to create_floppy_devices. You can check if it suits your needs and adapt that script to use it.

Hope this helps.


How to install Waterfox browser on Ubuntu 12.04?

Waterfox 32 & 64 IS now available for Linux/Ubuntu at https://www.waterfoxproject.org/downloads .

It is available as a compressed archive. I installed it in Linux Mint 18.1 like this:

I d/l'd it to my home, then I right clicked on it and selected "extract here". After which, I opened a console and typed in "sudo tar -jxvf waterfox-50.1.0.en-US.linux-x86_64.tar.bz2 waterfox/" (without the parentheses) .

I then went to my "run an application" launcher and typed in waterfox. Joi`la, she worky. Then I created a desktop launcher for it and moved it to a panel.

Hopes this help ya'.

I had a file simply named "waterfox".


Maybe this will help you: https://lastplaceonthe.net/how-to-enable-php-7-opcache-on-ubuntu-16-04/
In my case it worked like this:
Do not edit  /etc/php/7.0/apache2/php.ini
Edit the file /etc/php/7.0/mods-available/opcache.ini
And enable opcache mode sudo phpenmod opcache
And restart apache sudo phpenmod opcache


VLC systematically opening in 2 separate windows in Ubuntu 16.04 LTS

Strange thing: I tried playing several video files since the vlc purge/reinstall, and they came up in the dreaded dual-window style, but now with no sound.

I checked that audio was enabled in vlc (it was), and that at the system level, audio hadn't been set at 0, or muted (it hadn't).

So I did a search, and tried a proposed solution: reset preferences in vlc. I did, and noticed that Allow only one instance was now unchecked. I exited vlc, clicked on a video file, and bingo: a single window opens, with sound! I of course tried opening a bunch of random audio and video files to make sure this wasn't just a one-time occurrence, and they all now open as expected.

Not sure what resetting preferences achieved over reinstalling vlc, or if Allow only one instance being unchecked is instrumental, but it worked! Thanks to Robert Riedl for his time!


The command for installing eclipse, as it is within the apt-get repositories, is as follows:

sudo apt-get install eclipse

Once you've done this, it prompts you for a password. The password is for the administrator account of your machine. Are you the administrator of your machine? If your account is the only account on your machine, then you would be the administrator, provided you set up your Ubuntu build.

If you're not, you may need to get your administrator to install Eclipse for you. If you are the administrator of your machine and you are still having problems, you should be able to follow the thread Eliah provided.


How to download and use any other kernel than the one which is installed by default

Backported kernels are available in 12.04, see these questions for instructions on how to enable them:

Will Ubuntu point releases include a new Linux kernel?
Quantal backported kernel in 12.04.2? What's going on there?
How to upgrade 12.04.2 kernel and HWE to raring?

Another alternative is to build your own kernel or use a vanilla kernel: How do I get and install an unmodified kernel?


As noted in man tar, when you extract an archive using tar as an unprivileged user, the default behavior is to apply the invoking user's umask to the extracted file permissions:
   --no-same-permissions
          Apply  the user's umask when extracting permissions from the ar‐
          chive (default for ordinary users).

In particular, a umask of 0027 removes all permissions for others, whereas 0022 removes only write permissions.


What version of Ubuntu and qbittorrent are you running ?

Here is a link for the latest stable release of qbittorrent if that helps any:

https://launchpad.net/~hydr0g3n/+archive/ppa?field.series_filter=precise


You can get around this by booting on your widows media and use and run bootrec. This will remove the part of grub that still lives on your MBR.


Increase virtual screen size past 4096 x 4096 on Ubuntu 14.04 LTS

xrandr --output VGA1 --rate 60 --mode 1440x900 --fb 5120x1920 --panning 5120x1920

where --rate xx and mode yyyyXyyy equal a valid mode for your monitor and  the -fb and panning switches specify the desktop size. You'll have to adjust these values to your hardware. I don't have 2 monitors to test this so in your case I think you'd leave off the --panning switch and adjust your situation according to information here. This does result in a desktop of the desired size however and I can pan around it.

I returned my desktop to normal (for me) with xrandr --output VGA1 --rate 60 --mode 1440x900 --fb 1440x900

Tested under Lubuntu 14.04.4 64-bit


Ubuntu 16.04 browser won't connect to proxy server

The Problem (from my point of view) might be Proxy Setting. It might have set to manual to make it work in College.
If your Hostel's Router is configured to some static IP and Port No. you will need to know it and configure it manually. This worked in my case as in College it required to proxy settings to be manually configured and at home none proxy settings worked just perfect.

To Change Proxy settings goto :-
System Settings -> Network -> Network proxy -> Change Method -> Apply System Wide

It Settings should be None or Automatic for Hostel

You Also Might need to change Proxy Settings in your browser (firefox)
goto:-

edit->Preferences->Advanced-> Network -> (Connection)Settings -> Auto Detect Proxy


For the record.
My scanner Epson Workforve WF-7610 was not recognized by iscan yet xsane recognized it.

sudo -u saned scanimage -L

returned

device `epson2:net:192.168.1.30' is a Epson PID 08B9 flatbed scanner

but it did not work.
It used to work flawlsssly with the same configuration BEFORE upgrading to 17.10.

My workaround:

Commented epson2 and epson in /etc/sane.d/dll.conf . I added epkowa.
epkowa.conf has the correct net ip.
I copied epkowa drivers to correct lib folder

cp /usr/lib/sane/libsane-epkowa.* /usr/lib/x86_64-linux-gnu/sane/


Kernel update gets stuck (Ubuntu 16.04, Kernel 4.4.0-22)

Apparently, I have found the culprit. I reinstalled Ubuntu. Updated everything including the kernel. No problems up to now. Next, I started installing the applications I needed. The first one was Eset Nod32 Antivirus. After installing it, restarting, and logging in, Ubuntu froze. After booting into the recovery mode (the graphic mode) and unistalling Eset Nod32 Antivirus and restarting again, everything returned to normal. It seems as if there is a clash between the Linux kernel 4.4.0-22 and this antivirus, for some reason.


Safe to remove downloaded .deb packages after install?

There is no matter you can delete .deb when you finish using it whatever the method of installation.

I'm giving you here an example how Ubuntu system really deal with .deb so it's just to know that it's not dangerous to delete them since Ubuntu itself gives you the way to do.
For example, the installation method of Ubuntu when you use software center or using apt-get is to download first the .deb to /var/cache/apt/archives then installing these .debs using dpkg.

So when finish installation there is no need for system to those .debs, unless you can use them if you delete some package and you want to install it again and there is no update then the system uses this .deb instead of downloading again.

Moreover Ubuntu offers a neat command to clean those .debs, you can use

sudo apt-get clean

This will remove all .deb that are being downloaded before in the /var/cache/apt/archives


Unity integration for updated Thunderbird profile

If anyone has the same problem - I found the extension in /usr/lib/thunderbird-7.0/extensions upon installing it message menu integration and Unity launcher badge work, but not the NotifyOSD upon receiving an email. Does anyone know how to remedy that?


Unable to make Skype videocall in Ubuntu 14.04?

Just start a normal call and then click on the video button on the skype call. (See image). It's the leftmost round blue icon. Skype for Linux isn't up to date as the other OS' so you'll need some time to get used to it I guess. Also I want to add that skype video conferences DON'T work on linux yet.


You can try something like:

Match Group group-name
    ForceCommand internal-sftp
    ChrootDirectory /var/www/mysitename.com

in /etc/ssh/sshd_config.

From the manpage:

ChrootDirectory
         Specifies the pathname of a directory to chroot(2) to after
         authentication.  All components of the pathname must be root-
         owned directories that are not writable by any other user or
         group.  After the chroot, sshd(8) changes the working directory
         to the user's home directory. [...]

 ForceCommand
         Forces the execution of the command specified by ForceCommand,
         ignoring any command supplied by the client and ~/.ssh/rc if
         present.  [...] Specifying a command of “internal-sftp” will
         force the use of an in-process sftp server that requires no
         support files when used with ChrootDirectory.

These conditions require that:

Every directory in the path /var/www/mysitename.com must be owned by root, and not writable by others or root.
All the users in this group have home directory / (root), or the chroot will fail.

Alternately, you can set ChrootDirectory to /var/www, and set the home directories of all these users to /mysitename.com.

Relevant reading:

the Arch Wiki entry.


How do I restore Grub after Windows has deleted it

There is quite a comprehensive guide on the Ubuntu wiki that should work for you. I suggest giving that a go.


How to convert a video from mp4/flv to mpeg/mpg

Use ffmpeg utility, it's awesome.

1. Install:
sudo apt-get install ffmpeg

2. Convert:
ffmpeg -i input.mp4 output.mpeg

PS: For available formats supported by ffmpeg:
ffmpeg -formats


Graphical way to install .flatpakref (Flatpak) files?

Ubuntu 14.04
Based on burhanuddin abbas  comment there's a problem on Ubuntu 14.04.

Unable to locate package flatpak , because it is not supported for ubuntu 14.04 . Visit here for more details

Newer Ubuntu versions (tested on 16.04)
1. Installation of flatpak

sudo add-apt-repository ppa:alexlarsson/flatpak.
sudo apt update.
sudo apt install flatpak.

*1.1. Adding the flathub repository
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo.
2. Installation of MonoDevelop with flatpakref file
flatpak install monodevelop.flatpakref.
3. Running the application
flatpak run com.xamarin.MonoDevelop (probably, not tested, based on @purlantov answer).

Source: http://www.omgubuntu.co.uk/2017/07/7-flatpak-apps-can-install-right-now-flathub .


phpmyadmin not longer working after updating ubuntu LTS12.04 to ubuntu LTS14.04

The default path to served files in Ubuntu 14.04 has changed from /var/www to /var/www/html, mainly for security reasons.

The packaging has been overhauled quite significantly. /etc/apache2/conf.d/ is now /etc/apache2/conf-available/ and /etc/apache2/conf-enabled/, to match the existing sites-enabled/ and mods-enabled/ mechanisms.

The simplest way to enable phpmyadmin is to create symlink of phpmyadmin.conf and place it in /etc/apache2/conf-enabled/ folder and then restart the server. It did work for me.

sudo ln -s /etc/apache2/conf.d/phpmyadmin.conf /etc/apache2/conf-enabled/phpmyadmin.conf
sudo service apache2 restart

(ref: http://www.justgohome.co.uk/blog/2014/04/new-in-14-04-apache.html)


How to disable the button next to Activities in GNOME?

The button next to "Activities" is called "App Menu".

App Menu can be designed to contain not just "close" option, but other options related to the corresponding application, e.g. Preferences/Settings, Help, About etc. But almost all the third-party applications (if not all) are not  yet designed to contain any options other than close. If you run native GNOME applications like Files (aka Nautilus), Text Editor (aka Gedit) etc. you'll find there are options other than close.

To remove App Menu from the top-bar you may use (GNOME) Tweaks. First install it by running

sudo apt install gnome-tweak-tool

Then launch Tweaks, go to "Top Bar" section and toggle off the "Application Menu" option.


Gmail notifications without browser open?

It depends what you're using.  If you are using gnome 3 for example, something along these lines would work:

https://extensions.gnome.org/extension/154/gmail-notify/

There's also the Unity webapps that's an option.

http://blog.canonical.com/2012/07/19/introducing-ubuntu-web-apps-setting-the-web-free-of-the-browser/

Just a few ideas you could look into.


How to configure tracker-extract so it has a higher nice value?

Tracker's settings are now on dconf database, Managed through dconf-editor (GUI) or gsettings (CLI) under the org.freedesktop.Tracker.* tree:

For Ubuntu 16.04, you could set indexing to run in the background with  tracker-preferences. If that command wasn't already installed, you could install it with sudo apt install tracker-gui

After its initial complete index run, tracker — at least on a machine with SSD storage that isn't receiving huge dumps of new files — shouldn't take a significant time to run. If you find that tracker has locked up, I have suggested a solution here.


Can I safely store and display a master password file with AES-encrypted file plus a few simple bash scripts?

First of all: be aware that anyone with root and / or physical access to your system will be able to intercept any passwords that you type. And there is hardly anything you can do about it. Physical access means root, and root means low level access to hardware.

Also, if someone is a user on your system, then he or she is already in your "inner circle", since it is much easier to escalate privileges (gain root permissions) than to log in to a random system.

Personally, I use a similar system, but I don't keep there any information that would cost me my life's savings or professional reputation -- rather something like my askubuntu password. Also, I implement a bit of primitive, but not obvious encryption (like, omitting a common suffix of all the passwords, replacing certain words or numbers by other words or numbers, or not storing the information that I'm sure I remember and which is crucial, like the name of the service that a certain password refers to etc.).

As for shreeding in case of the mypasswd.display command -- why are you creating a temporary file? Why not omit the "-out" option and just send it directly to stdout?

Finally, I have a comic for you: brought to you by XKCD


Most likely, you have the snap version installed. A search should return a result like this:
sudo snap list | grep -i google | grep -i music

As you can see, sudo snap list is similar to dpkg -l. However, this command lists installed snap packages whereas dpkg -l lists installed deb packages.
Use grep to narrow the results and use the -i option for grep to disable case sensitivity for your search.
If the package is listed, you can use the sudo snap remove command followed by the package name you wish to uninstall. For example, if the package name is google-play-music-desktop-player you would use the following command:
sudo snap remove google-play-music-desktop-player

In the same fashion, you can list and search for installed flatpak packages like this (if you use flatpak):
flatpak list -a | grep -i google | grep -i music

The -a option for flatpak specifies all packages.
To remove a flatpak package, use the flatpak uninstall command followed by the package name.
more info about flatpak here and here

Alternatively, there is a slim chance that you may have the old deb package installed. If this is the case, then
dpkg -l | grep -i google | grep -i music

should return a result.
If the google-play-music-desktop-player package is listed, you can use the following command to remove the package:
sudo apt purge google-play-music-desktop-player


Run Android Studio on reboot using shell script

Did you try "@reboot root su -l ziko sh (script.sh)" from system crontab?

You may not get @reboot to work as non-root.

-

In system /etc/crontab:

@reboot root su -l (user_to_run_as) (your_sh_script)

or non-root 'crontab -e' user:

@reboot sh (your sh script)

( per : https://askubuntu.com/a/549646/169878 )

-

Note: I am not entirely sure if you need to be root to execute @reboot properly via crond under Ubuntu or Debian (or for that matter if it needs to be in the system wide crontab). Try the "@reboot sh " first and see if that works as non-root user.. Also consult https://unix.stackexchange.com/q/109804

EDIT:

Unless you really need this executed via crond, it might be a better idea to set this up as an init script (based on runlevel) or rc.local entry.. either one can be executed on a normal startup. Your script will execute after system is completely up. Since you do not need much more control over the script other than having it execute at startup (once), rc.local should be fine.

Example for "rc.local":

sudo nano /etc/rc.local

add this line before 'exit 0':

su -l ziko /opt/android-studio/bin/studio.sh

save.

sudo chmod 755 /etc/rc.local

(Reboot.) 'studio.sh' should have executed/started as the ziko user on startup


Intel graphics drivers on Ubuntu 16.04.02 LTS affect vnc client: does not start Unity desktop

Found this link which seems to work ok when I upgraded to 17.04. Some problems (noted in link). Also several options missing from desktop (e.g. certain settings)

https://www.hiroom2.com/2016/08/28/ubuntu-16-04-remote-connect-to-unity-with-vnc-xrdp/


What format is used in the LXC config file to specify control group settings?

Between these two pages of documentation I have what I need:

http://manpages.ubuntu.com/manpages/natty/man5/lxc.conf.5.html

https://access.redhat.com/knowledge/docs/en-US/Red_Hat_Enterprise_Linux/6/html/Resource_Management_Guide/sec-cpu.html


Deleted Items not appearing in Trash folder. Stuck in .TRASH-1000

It is not a permissions problem.  This is a known bug which has been reported at https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1442649 (it affects more than just Nautilus).

Except for the home filesystem which is a special case (see here for full details), any trashed files are stored in a directory within the root directory of the filesystem they were deleted from, to avoid copying between filesystems.

The Trash folder is a virtual folder that should be a combination of those directories from every filesystem.

A subvolume is a separate filesystem. However, only mount points (e.g. those in /etc/mtab) are actually checked for trash directories.  A subvolume which is not mounted separately isn't searched.

As for workarounds, for a given subvolume SUBVOL, trying:

ln -s /mnt/btrfs/.Trash /mnt/btrfs/SUBVOL/.Trash
ln -s /mnt/btrfs/.Trash-1000 /mnt/btrfs/SUBVOL/.Trash-1000

to store the trash on the parent volume does not work.

But the existence of both symlinks (or just empty files of the same name) prevents the creation of the trash directories, so preventing trashing on that subvolume.