Ubuntu mount cifs from terminal, error: mount: can't find /home/socio/spc in /etc/fstab

Instead of sudo mount -t cifs //<server>/<share> -o username=user@domain,unc=\\\\<server>\\<share> /home/<user>/spc

try

sudo -S mount -t cifs //<server>/<share> /home/<user>/spc -o username=user@domain,unc=\\\\<server>\\<share>

I don't know the unc option though.  I use for options username, password, iocharset, sec, file_mode, and dir_mode.


Ubuntu 16.04 Error this plugin is not supported. Flash Player

Install ubuntu-restricted-extras package
Or alternatively flashplugin-installer package.


sudo apt install build-essential
Will install kernel headers and such


Black screen and flashing underscore while installing off a usb (10.10) and all other higher versions

This link can probably help you:
My computer boots to a black screen, what options do I have to fix it?

Try with nomodeset and if that don't work add acpi=off and noapic


Is it possible to use the Backspace key in Files 3.6 to return to the previous directory like in Nautilus?

BackSpace was used to go to the parent dir. Anyway, in order to restore the Backspace functionality, replace the following line

; (gtk_accel_path "<Actions>/ShellActions/Up" "<Alt>Up")

with

(gtk_accel_path "<Actions>/ShellActions/Up" "BackSpace")

in ~/.config/nautilus/accels


Error while installing pcl 1.8.0 for Ubuntu 16.04.6 LTS. #error Your compiler does not support C++11

This solved the problem for me. Sorry for late post of answer.
Enable cpp 11 for gcc5 manually.
Use
cmake -D CMAKE_CXX_STANDARD 11 ..

instead of
cmake ..


Ubuntu IDE tries to run CMake-based ARM projects on desktop instead of device: bug or what?

Ok, so if you are using the desktop Kit and cmake complains about that it cannot find armhf tools, you probably did not have cmake installed on the desktop in the first place (there is a problem with dependencies that we are trying to solve atm) and QtCreator is using a cmake installation from one of the click chroots you have created for device support.

So what to do:

Close Ubuntu SDK IDE
Install cmake "apt install cmake"
Start Ubuntu SDK IDE
go to: Options -> Build & Run and click the CMake tab
make sure /usr/bin/cmake is selected as the default
Open the Kits tab, there select your Desktop Kit and make sure that /usr/bin/cmake is used as the cmake tool.
Delete the buildfolders for your projects and build again

There is no need to change the Kits for the devices since these are automatically checked on each start.

If you want to package your own cmake project you need to make sure that it is packaged correctly for the phone. Your best bet is to check out one of the original ubuntu SDK templates to see how it is done.


Wireless internet problems with Macbook Pro 11,1

Turns out this has to do with power management.  I came across this note in the ArchWiki:

https://wiki.archlinux.org/index.php/broadcom_wireless#Miscellaneous_user_notes

  If you notice slow wireless speeds when your laptop/netbook is not
  connected to AC power, you may need to disable Wi-Fi power management
  by adding the following line (assuming wlan0 is your wireless device)
  iwconfig wlan0 power off to /etc/rc.local and create an empty file
  /etc/pm/power.d/wireless. In case you also experience interface
  swapping (discussed above), you might want to add another line for the
  second interface name as well. The command will have no effect on the
  wired interface.
  --Tom.yan, 16 August 2011

And I did notice the wireless problems only came when I was running on battery.  I ran:

sudo iwconfig eth0 power off

and my problems stopped instantly.


My minimise, maximise and close buttons have dissapeared!

Open a terminal and type:

gconftool-2 --set /desktop/gnome/shell/windows/button_layout --type string :minimize,maximize,close


What is SSH-Add and why is it installed in my Kubuntu?

Unlike Fedora, ssh server is not installed by default with K/ubuntu.

You can check the default packages by checking the manifest list - see check if all default packages are installed from the Ubuntu manifest

Or here - http://releases.ubuntu.com/

Go to a release / version http://cdimage.ubuntu.com/kubuntu/releases/17.04/release/

click the manifest http://cdimage.ubuntu.com/kubuntu/releases/17.04/release/kubuntu-17.04-desktop-amd64.manifest

ssh-add is part of (open)ssh client and manages keys

https://packages.ubuntu.com/zesty/openssh-client

openssh-clinet is installed by default on all versions of ubuntu as far as I know

See https://packages.ubuntu.com/zesty/openssh-client


Testing OS, external installation or virtualbox?

I must disagree with all the other answers. To test a new OS the best way is a external HD, there are a couple of reasons:

Most important, this is the only way to test your real hardware. VM installs are not running on your computer and you can fall in love with Fedora but when you install it in your real hardware making your wifi card (or something else) work could be difficult.
Your read/write throughput to the external disk will be worse, but everything else (graphics, sound, processor) will run at real speed. If you try Ubuntu (with unity) on a VM the GUI will be slower (due to worse 3D access) than an external HD.
Easy wipe, just delete the external HD.
Easier data sharing that a VM. You can just mount your internal HD, no need to shared folders or things like that. You can even symlink your real program configuration or document folders for a seamless experience.

The only real advantage of VMs, to me, in this situation, are snapshots.


RAW image viewer with rating capability?

Geeqie can handle RAW files correctly.  If you want to see thumbnails in nautilus you can use ufraw and create a thumb-nailer.  It uses the raw embedded image and is the faster thumb-nailer I've seen. To do this, first install ufraw-batch. Then create a text file called /usr/share/thumbnailers/raw.thumbnailer and copy this:

[Thumbnailer Entry]
TryExec=ufraw-batch
Exec=ufraw-batch --silent --size %s --out-type=png --noexif --output=%o --overwrite --embedded-image %i
MimeType=image/x-adobe-dng;image/x-canon-cr2;image/x-canon-crw;image/x-dcraw;image/x-fuji-raf;image/x-kodak-dcr;image/x-kodak-k25;image/x-kodak-kdc;image/x-minolta-mrw;image/x-nikon-nef;image/x-olympus-orf;image/x-panasonic-raw;image/x-pentax-pef;image/x-sigma-x3f;image/x-sony-arw;image/x-sony-sr2;image/x-sony-srf;

Probably is not exactly what you are looking for, but I use Geeqie and use the keywords to rate them (you can add new keywords if needed).
To select the images you right-clik on the keyword and connect the keyword to a mark.

And you can also batch copy or move the files. Select the images, right-click on the keyword and connect to a mark, the select the mark and on the icon panel now you only see the selected images.  Then you can click on an icon and then Ctrl-A to select all images, righ-click and press copy.
Geeqie doesn't need to import images.


13.10 black screen after wake from suspend

Press Ctrl+F1 to go to shell login "tty1" and enter your username and password
Then typesudo service lightdm restartand then enter your password again.
It'll do the trick.


Is there a special reason why you want to do this in Ubuntu and not on your router? If you're using a router that you can manage yourself, you should be able to login to its interface via your browser and set a static IP address as well as port-forwards there.


new bridge setup for lxd on fresh host 16.04 and fresh guest 16.04

Before using LXD, you have to configure a custom bridge by following these instructions. You may also want to set the dns-search and dns-nameserversoptions in the interfaces file.

Then run sudo lxd init. Configure storage, network and password settings according to your needs. At the end answer "yes" to the question "Do you want to configure the LXD bridge (yes/no)?". In the following dialog answer "No" when asked to configure the default LXD bridge. Then answer "Yes" when asked to use an existing bridge. As "Bridge interface name" enter br0 or whatever you called it in /etc/network/interface. Then lxc launch your container and it will obtain an IP address from your DHCP server.


Foreword

I still have to install my LAMP stack on Ubuntu 16.04, so I'll write a tutorial as I install it on my machine and make sure that it works.
Like others have already pointed out, the W in WAMP stands for Windows, so you can't install it on a Linux OS like Ubuntu, we need to install the LAMP stack, where of course L stands for Linux and AMP for the Apache web server, MySQL database server and the PHP back-end programming language that sticks them all together to create web apps.

So that's exactly what we'll have to install and configure, together with phpMyAdmin that will make the job of dealing with MySQL databases simpler via a local web app to handle data.

On Linux it's more of an involved process than in Windows but it's worth it, you get to learn how servers in the wild actually work by putting together every piece of the puzzle. On Windows you only need to install an executable, on Linux you'll be a step closer to being a system administrator by the end of the installation process.

If you haven't done so yet, update and upgrade your distro:

sudo apt-get update
sudo apt-get upgrade

Let's get started.

Install LAMP on Ubuntu 16.04

Install the Apache web server

sudo apt-get install apache2

Point your browser to http://localhost:80 or http://127.0.0.1:80 or just http://localhost, Apache listens on port 80 by default, you should be welcomed with the following web page if the installation is successful:

This particular web page, and all other pages that Apache will serve are by default located in the /var/www/html directory on your system.

To be able to modify files as the current logged in user in that directory run this command:

sudo chown $USER /var/www/html -R

Install PHP and PHP Apache libraries

sudo apt-get install php
sudo apt-get install libapache2-mod-php

Restart the server:

sudo service apache2 restart

Create a file called test.php in /var/www/html/test.php

Type into the file the PHP utility method phpinfo(); like so:

<?php phpinfo(); ?>

Save and point your browser to it by typing in http://localhost/test.php

You should be welcomed by this screen:

Yay, it's working.

Install the MySQL server

sudo apt-get install mysql-server

Insert a password for root when prompted, note that this root is the super user of the MySQL server, not of your OS:

Access the MySQL console:

mysql -u root -p

Enter the password when prompted, type in the command:

SHOW DATABASES;

You'll see a list of default databases, it looks like everything's fine, type exit to exit from the MySQL console.

Install the php-mysql libraries and phpmyadmin

sudo apt-get install php-mysql phpmyadmin

When prompted by the phpadmin installation choose of course Apache as the web server:

Choose then yes to let phpmyadmin configure with your MySQL server automatically:

Type the same password you previously used in your MySQL server installation:

Try visiting http://localhost/phpmyadmin to access the service. You'll likely get a 404 error.

We're not quite done yet, we still have to configure Apache to work with phpmyadmin, then everything will work smoothly.

Configuring Apache to work with phpmyadmin

To make Apache work with phpmyadmin you'll have to configure the apache2.conf file.
First open it:

gksu gedit /etc/apache2/apache2.conf

Then type (or paste) the following line(s) at the bottom of the document:

# Include phpmyadmin
Include /etc/phpmyadmin/apache.conf

Restart the Apache server:

sudo service apache2 restart

Point to http://localhost/phpmyadmin, it works!

Log in as root by typing the password you've previously chosen for MySQL and phpmyadmin. Here's a screenshot of what you'll see once you log in:

Final words

That's it, now you're ready for development. error_reporting and display_errors should be automatically set to E_ALL in /etc/php/7.0/apache2/php.ini for development purposes so if something breaks you'll be able to debug it easily. At the moment there's no need for further configuration.

I enjoyed writing this down, have fun!

L Ubuntu 16.04 xenial, x86_64 Linux 4.4.0-34-generic

A Apache/2.4.18 (Ubuntu)

M MySQL Ver 14.14 Distrib 5.7.13, for Linux (x86_64)

P PHP 7.0.8-0ubuntu0.16.04.2

-  Phpmyadmin version 4.5.4.1deb2ubuntu2


How can foreground and background colors be changed for Software Center?

Try using Ubuntu Tweak. You can find it in the repository, and you may find other tweak software.

Another approach would be to can change the theme you are working in.


Any time you have a system that doesn't want to load kernel extensions, or load /boot/grub files, it's a sure bet that secure boot needs to be disabled in your BIOS.

Secure boot was designed to only allow "signed" software to load, thereby stopping the loading of "unsigned" software, and theoretically potentially harmful software.

It's common in Ubuntu-land to add kernel drivers for wireless cards, and these are typically unsigned also.


How do I recover my applets / settings in the GNOME fallback session after a 11.10 upgrade?

You have to press alt (or super+alt) to access the right-click menu and to move applets. Otherwise, Gnome Panel 3 is mostly identical, but it has been upgraded to GTK3 and other Gnome 3 technologies. This means that applets also have to be upgraded, and there might be some that haven't been upgraded yet.

You'll probably want to get the indicator-applet-complete package from https://launchpad.net/indicator-applet.


Running multiple services on one Ubuntu Server

There are dedicated Linux Distributions for Virtualization. For example Proxmox which is Debian based and it includes an Web Interface for easy management.

I am using it for running and Owncloud and a lot of other different services at home and also in production: https://www.proxmox.com/en/


Try this:

#!/bin/bash
case "$1" in
    hibernate|suspend|thaw|resume)
        export DISPLAY=:0.0
        sudo -u giorgio synclient TapButton2=0
        sudo -u giorgio modprobe iwlagn 11n_disable=1
        ;;
esac

A few things.

You had two branches to your case statement, but they both did the same thing, so I shortened it to a single branch. I don't think that you can have anything other than hibernate|suspend|thaw|resume, but just in case, I left it there.
As per my comments, you don't need exit.
I'm not 100% sure what env DISPLAY=:0 does, but I replaced it with something that I know works (and is more concise).
As per my comments, zenity is for creating dialogue boxes, so I think you must have gotten a bit confused somewhere.


Ubuntu constantly switching between 2.4 and 5Ghz access points

Your wireless may be dropping because of power management; that is, the feature where the card partially powers down to save battery power during periods of inactivity and then, ideally, powers back up seamlessly when activity resumes. Let's disable power saving to see if it helps. From the terminal:
sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/*

Your wireless may be dropping because the channel to which it was connected has suddenly changed.
Please check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I recommend a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred.
Your wireless may be dropping because there are two wireless access points with the same name and password. This is typical when you have a 2.4 gHz segment and a 5 gHz segment of the same router. Your wireless may be roaming, looking for a better connection. If this is the case, I suggest that you rename the access points; something like myrouter2.4 and myrouter5.
After making these changes, reboot the router.
Next, I recommend that your regulatory domain be set explicitly. Check yours:
sudo iw reg get

If you get 00, that is a one-size-maybe-fits-all setting. Find yours here: http://en.wikipedia.org/wiki/ISO_3166-1_alpha-2 Then set it temporarily:
sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:
sudo nano /etc/default/crda

Change the last line to read:
REGDOMAIN=IS

Proofread carefully, save and close the text editor.
Is there any improvement?


On my fresh install of Ubuntu 11.10 64bits, this worked for command line with apt and Ubuntu Software Center.

Create the file /etc/apt/apt.conf and put this line with your proxy settings :

Acquire::http::Proxy "http://login:password@yourproxyaddress:port";

example :

Acquire::http::Proxy "http://bob:123bob@bobproxy:8070";


How can I get a messaging menu indicator with unread count of my new Gmail emails?

Lots of mail-notifiers (Popper, GmailWatcher, Gmail-Notify) stopped working from 12.10 because of change in messaging-menu api. You can always file a bug on their respective launchpad page.
However there are few which works with new api ( Unity-Mail, Thunderbird, Evolution).
Unity Mail
Launchpad: https://launchpad.net/unity-mail
With Unity Mail we can handle multiple gmail accounts. You will get an OSD notification whenever you receive a new mail showing the sender, and the subject of a mail.

In addition it adds a launcher icon to display the count of unread messages, integrates with the mail indicator to turn it blue, and displays a list of mails in the drop down menu there.

PPA: ppa:mitya57/ppa

Source: askubuntu


How to remove website shortcut icon from all applications

To remove a Google application shortcut:

Go to Chrome browser.
Click on the Apps icon on the  bookmarks bar.
Find the application shortcut there.
Right click and click the Remove option in menu.

Et voilà, gone!
All web shortcuts are there.

Now you can go crazy making little web applets and remove them:


How can I see images from my ftp server on Ubuntu, directly from browser in the form of a gallery?

You could try to install a web application on the server.

Try: node-gallery.


Public key authentication unsupported by web host. Method to avoid entering password?

If you need to enter your password, you'll have to do it through expect, because ssh insists on passwords coming from a terminal. Here's an example expect script.

It's possible that the host has disabled public key authentication, but that would require that they deliberately turn it off (with PubkeyAuthentication No in /etc/sshd/sshd_config). There's no technical reason why they'd do it, it would be purely for market segmentation.

I recommend that you first try to make public key authentication work. Follow this procedure to generate and upload a key. Don't hesitate to ask here if something doesn't work; if you tell us what you tried and what error messages you got, we might be able to propose a workaround. If you run into problems, post the sshd configuration (/etc/sshd/sshd_config if the web host is running Ubuntu, maybe another location like /etc/sshd_config if the host is running some other distribution), and the output of ls -ld ~ ~/.ssh; ls -l ~/.ssh.


By default, System Monitor will only display your own processes. You can show system processes by selecting Show -> All processes from the menu bar. Unity itself would never show up in the process list since it's just a plugin for Compiz. So if Unity was the problem, then Compiz would show a high CPU usage. Compiz 0.9 is slower than 0.8, this is confirmed. However, I see no reason why Unity itself should be very demanding, or why you would think so.

11.04 and 11.10 were two very special versions in that there were large amounts of changes in the underlying system. As an example, my laptop had a battery life of about 5.5 hours on 10.04, 4.5 hours on 11.04 and 4 hours on 11.10. I've upgraded it to the development version of 12.04 (Precise Pangolin) and now it's back at about 5.5 hours.

All this is to say that you're not imagining it. Specially 11.10 has been very power hungry, and there is no single piece of software to blame. The Linux kernel has had some power issues as well, for instance. My desktop sounded like a Harley Davidson in 11.10, but not it's completely silent again. So it's a problem with 11.10 in general, and 12.04 fixes it on all my computers. While I don't want to recommend that you upgrade to it yet, at least it should be comforting to know that it'll most likely fix all those issues, and that it'll be available in the not so distant future.


How to prevent shutdown when one of two batteries is empty?

My laptop has a single battery so I can't test this. I found on Lenovo support forum someone who has a problem like yours.

Basically the problem was UPower causing the laptop to shut down. One user solved the problem by removing upower:

sudo apt remove upower

If this doesn't solve the problem and/or you suffer adverse side-effects you can reinstall using:

sudo apt install upower


Purchase apps through Terminal instead of GUI Software Center

You cannot purchase apps via terminal rather than Software Center.

You can install apps which you've previously purchased, via terminal. You will just need to add the PPA with your authentication token, and know the package name, to be able to install the packages for previously purchased apps.

You can see your list of subscriptions, from where you can get all the PPA info. You'll need to manually add the PPAs to a new file in /etc/apt/sources.list.d/ and import the GPG keys for each PPA using gpg and apt-key:

gpg --keyserver keyserver.ubuntu.com --recv-key XXXXXXXX
gpg --export XXXXXXXX | sudo apt-key add -

Then you can update and install the package for the app you bought:

sudo apt-get update
sudo apt-get install purchased-app


i am having a simmilar Problem.
i am not sure this will work out. and i dont know what compizconfig is.

But i want to try this myself in the next days:

try oem-config-prepare
http://manpages.ubuntu.com/manpages/trusty/man8/oem-config-prepare.8.html

you might need to install the package
sudo apt-get install oem-config

access you pc via one of the text consoles CRTL-ALT+F1 etc.
or boot into text mode

http://ubuntuhandbook.org/index.php/2014/01/boot-into-text-console-ubuntu-linux-14-04/

good luck :-)


Ubuntu GUI only works in Safe Mode (Hybrid Graphic Driver : AMD 8650G with HD 8970M)

Well I loaded my laptop with an unlocked bios, playing around with every setting. What I did found was when you enabled _ohc to pci0 the laptop would take forever to boot, unless you took the battery out pressed on the power button for 30secs. Additionally it would disable all i/o including wifi.
Not sure why, but after I logged out, and got it booting quick again this is what I found.
   product: Richland [Radeon HD 8650G]
   vendor: Advanced Micro Devices, Inc. [AMD/ATI]
   physical id: 1
   bus info: pci@0000:00:01.0
   version: 00
   width: 32 bits
   clock: 33MHz
   capabilities: vga_controller bus_master cap_list
   configuration: latency=0
   resources: memory:c0000000-cfffffff ioport:f000(size=256) memory:feb00000-

feb3ffff memory:c0000-dffff
  *-display UNCLAIMED
       description: VGA compatible controller
       product: Neptune XT [Radeon HD 8970M]
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:01:00.0
       version: 00
       width: 64 bits
       clock: 33MHz
       capabilities: vga_controller cap_list
       configuration: latency=0
       resources: memory:d0000000-dfffffff
memory:fea00000-fea3ffff ioport:e000(size=256) memory:fea40000-fea5ffff

Under capabilities and configuration, it used to be disabled


SSH local STDOUT to file on remote server

The scp, Secure CoPy using ssh should be used to transfer files.
For stream saving, ssh will do the job.
To save an output to a remote file via ssh, simply use ssh and redirection.

$ ls | ssh user@remotehost 'cat > /user/remotefile'

Can be used to unpack selected file from an compressed archive:

$ unrar p -inul rarFile.rar inPath/afile.txt | ssh user@host 'cat > /destination/file.txt'


How do I disable powerline-shell only for the VSCode terminal?

I added a few lines of code in my .bashrc to detect if the terminal was called from VSCode or not and only start powerline if it was not as follows:
if [[ "$TERM_PROGRAM" != "vscode" ]]; then
   # use powerline
fi


Unable to get error stack trace or error log while using php-fpm + nginx on Ubuntu 14.04

Try to put in your site's configuration inside the server directive the following:

access_log  /var/log/nginx/your_site.log;

error_log   /var/log/nginx/your_site.log;

replace the your_site.log with the name of your virtualhost - domain name.

Full example:

php-fpm

/etc/php5/fpm/php-fpm.conf

[global]
pid = /var/run/php5-fpm.pid
error_log = /var/log/php5-fpm.log
include=/etc/php5/fpm/pool.d/*.conf

/etc/php5/fpm/pool.d

[www]
user = www-data
group = www-data
pm = dynamic
pm.max_children = 10
pm.start_servers = 4
pm.min_spare_servers = 2
pm.max_spare_servers = 6

Virtual host

upstream php {
        server unix:/tmp/php-cgi.socket;
        server 127.0.0.1:9000;
}

server {
    listen   80; ## listen for ipv4; this line is default and implied

    root /srv/www/mysite;
    index index.php;

    server_name mysite.com www.mysite.com;

    access_log  /var/log/nginx/mysite_access.log;
    error_log   /var/log/nginx/mysite_error.log;

    location / {
         try_files $uri $uri/ /index.php?$args;
    }

    error_page 404 /404.html;

    error_page 500 502 503 504 /50x.html;

    location = /50x.html {
              root /usr/share/nginx/www;
        }

        location = /favicon.ico {
                log_not_found off;
                access_log off;
        }

        location = /robots.txt {
                allow all;
                log_not_found off;
                access_log off;
        }

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9$
        location ~ \.php$ {
                #fastcgi_pass 127.0.0.1:9000;
                # With php5-fpm:
                fastcgi_pass unix:/var/run/php5-fpm.sock;
                fastcgi_index index.php;
                include fastcgi_params;
                 }
        location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                expires max;
        access_log off;
                log_not_found off;
        }
}


How to find *why* I can't bind some keyboard shortcut (or which app took it)?

Between 12.10 and 17.04 the Ubuntu desktop is actually Compiz and Unity itself is just a Compiz plugin.

If you, instead, set and enable the Compiz "commands" plugin and set keyboard shortcuts using CCSS where there is a conflict, CCSM should alert you to what plugin is causing the conflict and should also provide options to disable the conflicting plugin or conflicting keybinding before applying your settings.

Personally, I've also experienced difficulty setting keyboard shortcuts in 14.04+ but ever since I decided to start using the CCSM plugin instead of the keyboard shortcut settings in Unity, I have not experienced any issues whatsoever and all my shortcuts work just fine and so strongly suggest you at least check it out as an option.


Is there an SSH client which duplicates commands to multiple terminals?

Cluster SSH

Cluster SSH is used to start multiple SSH connections in separate terminal windows, with a common input box. You type in the input box and the keystrokes are sent to all the connected terminals.

sudo apt-get install clusterssh

Then run cssh:

cssh host1 host2 ...

Use a terminal emulator with broadcasting

Terminator, for example, is a terminal emulator in which you can broadcast keystrokes to a group of terminals.:

Depending on how many connections you make, Cluster SSH might be the better option. However, it uses xterm for the terminal emulator, which may not be what you are used to. It is, however, much more easy to get started with a number of connections using cssh, than to create a lot of splits and group them in Terminator. For example, this is what cssh osl-{01..95} gets me:

The terminal windows were are all resized and tiled nicely. The gaps are for windows that were closed because the connection failed.


is there a text editor which does not change the list of recent files?

To look into this, I tested a

a combination ofmousepad (the default editor in Xubuntu) and gedit, and also
a combination of featherpad (a qt-based text editor) and gedit.

I found that text files opened and edited and then closed in featherpad did not affect the recent files list of gedit. However, performing a similar exercise with mousepad directly affected the recent files list of gedit.

You can see this by running

watch ls -l ~/.local/share/recently-used.xbel

and looking for a change in file size. Merely opening a text file with gedit or mousepad affects the file size of recently-used.xbel. Doing the same with featherpad has no effect; recently-used.xbel is not altered in any way.

Just to be clear, both gedit and mousepad access recently-used.xbel to build their respective (but same) recent files list. featherpad does not. So you can safely use a combination of gedit and featherpad

One fear among some users is the number of dependencies pulled in by installing a qt-based application. You can gauge that for yourself with a simulation, no sudo required because nothing is actually done:

apt install -s featherpad

In a relatively vanilla Ubuntu 20.04 VM, a total of 16 packages (10.9 MB archives) would be installed, and 47.1 MB disk space would be utilized.

There is also the concern, expressed by some, of the RAM "consumption" by having two toolkits loaded.

Obviously, if these concerns are matter, the use of featherpad
 is out of the question. Maybe nano could be the secondary editor.

If the use of nano is acceptable, then also consider the terminal-based file manager ranger which makes it very, very easy to move around (Miller columns!), preview a variety of file types, and to easily access text files with nano.


How do I install a subversion client on Ubuntu 16.04?

sudo add-apt-repository universe
sudo apt update
sudo apt install subversion

Works on Ubuntu Server 18.04.


The application Keyboard input Methods has closed unexpectedly

If you open up System Settings > Language Support and check the settings there. Then click the "Apply System-Wide" button (even if you did not change anything). I did this in both the "Language" and "Regional Formats" tabs and it fixed this issue for me (at least it has been fine for the past 24hrs since I did this).


For Thunderbird, right-click at the top of the screen (where the menubar would be) and check “Menu Bar”.

The answer for LibreOffice seems to be disabling OpenGL rendering, go to Tools > Options > View > uncheck “Use OpenGL for all rendering”. It is probably this bug

Hope this helps!


Delaying or disabling the marking of messages as read when opened in Thunderbird 60+

Open Preferences and navigate to the Display section.
Go to the Advanced tab.
You should find the option under Reading:

(screenshot from Thunderbird version 60.2.1)


How to restore/recreate etc/resolv.conf files

You could reinstall resolvconf to restore the default configuration:

sudo apt-get install --reinstall resolvconf

Another idea would be remove "resolvconf" and then install:

sudo apt-get remove --purge resolvconf && sudo apt-get install resolvconf


This is a duplicate, please see the link I gave you. You could try the netinstall iso.

https://help.ubuntu.com/community/Installation/MinimalCD

After the install you would install ubuntu-desktop

sudo apt-get install ubuntu-desktop

You would otherwise need to build a custom iso.

https://help.ubuntu.com/community/LiveCDCustomization


ubuntuphone does not sync radicale calendar anymore since OTA-13

SOLVED!
I just had to delete all the calendars databases on my ubuntuphone, recreate them as I did in the beginning and relaunch synchronisation. The script works again. I don't know what happened exactly during the last upgrade, but rebuilding my databases corrected the problem.

If this can help someone else.

Thanks to all the people contributing to the ubuntuphone!
Ciao

Jean Pierre


Open Files file manager and browse to /usr/share/applications
Find the Qt Creator icon in the /usr/share/applications directory, copy the Qt Creator icon, and paste it to your Desktop.


Samsung laptop Ubuntu sees the wifi but does not connect

Not an all-encompassing answer, but in my case I was able to somehow resolve the issue while checking stuff for AzkerM's questions in the comments:

I tried running sudo apt-get install g++ to check if I could install something.
The result was E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.
I did it and tried running the g++ install again.
??? (magic happened as far as I am concerned, no idea what did it)
Profit! (there was internet all of a sudden.)

Pretty sure that running sudo dpkg --configure -a did the trick here.


How to repare corrupt ubuntu12.04 without loss any data?

Make a bootoble Ubuntu cd using another computer, plug it in, start your system from USB and select "Try Ubuntu without Installing" from bootloader menu. From there, you can use Ubuntu to recover your files using Ubuntu's file manager.

Plug another USB or hard disk or a usb and copy your files there perhaps.

Or if you've unmounted your sda1 partition (you said you removed it from /media folder, partitions are usually mounted there, you can use)

sudo mkdir -p /media/sda1
sudo mount /dev/sda1 /media/sda1

And then browse your files there.


Installing libldap just allows to access data from an ldap server related to the LibreOffice user. This isn't the same as an ldap server as data source. It may work using an LDAP JDBC driver, but i wasn't able to find a working example for this.

EDIT: built-in LDAP support is a os-dependent feature, at least since LO 4.0; see LO bug 57417. It may be possible to access ldap data using a evolution / thunderbird address book as "proxy" (since Evolution / Thunderbird are able to access an ldap server as address source), but sadly i can't give further advice on this.


GnomeGmail for Google Inbox (attachments)?

Hello here is great project for that:
https://github.com/Thomas101/wmail/releases


I have installed LAMP SERVER IN UBUNTU 13,04 .But could not login to phpmyadmin

Try this.  Just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo mysql -u root -p

This will prompt you for a new password.  If that doesn't work try:

sudo /etc/init.d/mysql stop
sudo mysqld --skip-grant-tables &
mysql -u root mysql
UPDATE user SET Password=PASSWORD('New_Password') WHERE User='root'; FLUSH PRIVILEGES; exit;

Source:MySQL RM


Based on the MD5 lookup in Oli's script (thanks!), I've written a Python script that uses the eyeD3 module to find MP3s, look up the album artwork from Banshee's cache, and embed the artwork inside the MP3s. It skips any files that already have artwork embedded.

It's not perfect, but it worked on about 90% of my MP3s, and you can manually handle any exceptions using EasyTag. As it stands the script expects the MP3s to be two directory levels deep from the target directory (music root/artist/album). The script prints a report once it's done highlighting any files it couldn't process or for which it couldn't find artwork.

Obviously you need to install Python and the eyeD3 module to use it:

#! /usr/bin/env python

import os, sys, glob, eyeD3, hashlib

CACHE_FILE_PREFIX = os.getenv("HOME") + "/.cache/media-art/album-"

def embedAlbumArt(dir = "."):
    artworkNotFoundFiles = []
    errorEmbeddingFiles = []
    noMetadataFiles = []
    mp3s = findMP3Files(dir)

    for mp3 in mp3s:
        print "Processing %s" % mp3

        tag = eyeD3.Tag()
        hasMetadata = tag.link(mp3)

        if not hasMetadata:
            print "No Metadata - skipping."
            noMetadataFiles.append(mp3)
            continue

        if hasEmbeddedArtwork(tag):
            print "Artwork already embedded - skipping."
            continue

        artworkFilename = findAlbumArtworkFile(tag)

        if not artworkFilename:
            print "Couldn't find artwork file - skipping."
            artworkNotFoundFiles.append(mp3)
            continue

        print "Found artwork file: %s" % (artworkFilename)

        wasEmbedded = embedArtwork(tag, artworkFilename)

        if wasEmbedded:
            print "Done.\n"
        else:
            print "Failed to embed.\n"
            errorEmbeddingFiles.append(mp3)

    if artworkNotFoundFiles:
        print "\nArtwork not found for:\n"
        print "\n".join(artworkNotFoundFiles)

    if errorEmbeddingFiles:
        print "\nError embedding artwork in:\n"
        print "\n".join(errorEmbeddingFiles)

    if noMetadataFiles:
        print "\nNo Metadata found for files:\n"
        print "\n".join(noMetadataFiles)

def findMP3Files(dir = "."):
    pattern = "/".join([dir, "*/*", "*.mp3"])
    mp3s = glob.glob(pattern)
    mp3s.sort()
    return mp3s

def hasEmbeddedArtwork(tag):
    return len(tag.getImages())

def findAlbumArtworkFile(tag):
    key = "%s\t%s" % (tag.getArtist(), tag.getAlbum())
    md5 = getMD5Hash(key)
    filename = CACHE_FILE_PREFIX + md5 + ".jpg"
    if os.path.exists(filename):
        return filename
    else:
        return 0

def getMD5Hash(string):
    string = string.encode("utf-8")
    md5 = hashlib.md5()
    md5.update(string)
    return md5.hexdigest()

def embedArtwork(tag, artworkFilename):
    tag.addImage(eyeD3.ImageFrame.FRONT_COVER, artworkFilename)
    success = 0
    try:
        success = tag.update()
    except:
        success = 0
    return success

if __name__ == "__main__":
    if len(sys.argv) == 1:
        print "Usage: %s path" % (sys.argv[0])
    else:
        embedAlbumArt(sys.argv[1])


Does `CD/DVD Creator` verify an optical disk after writing to it?

To provide an answer to the question "Does CD/DVD Creator verify an optical disk after writing to it?"

Yes it does, I have just verified this myself.
In Ubuntu 12.04 and newer it is a Brasero plugin called "CD/DVD Creator Folder" that is providing this functionality to Nautilus.
When you click the "Write to disc" button in Nautilus (as in the first screenshot) it launches a Brasero dialog.
During the burn you should see a finalising write message, then afterwards verifying checksum message (under the progress bar).

Brasero by default verifies file an disk integrity.


How can I bind a key to cycle between workspaces?

Here's a script that switches to the next workspace, wrapping back to the first after the last. Note that workspaces are numbered from 0, maybe this is what threw you when you tried writing a script.

#!/bin/sh
total=$(wmctrl -d | wc -l)
current=$(wmctrl -d | sed -n 's/^\([0-9]\+\) *\*.*/\1/p')
if [ -z "$total" ] || [ -z "$current" ]; then
  echo 1>&2 "$0: Could not obtain workspace information!"
  exit 2
fi
target=$(($current+1))
if [ $target = $total ]; then
  target=0
fi
wmctrl -s $target


Customized page cannot print in ubuntu 12.04

I think the issue is with Ubuntu, rather than with the printer, as I cannot print anything from Firefox, or any image printing program, from Ubuntu 12.04, on my Ubuntu compatible Samsung ML-2162; and it was the same with my old Lexmark.

Ubuntu simply seems to lack any decent image printing program, and there seems to be no interest in developing one. I have tried all of them, and none of them work. Ubuntu seems to be focused purely on cloud storage and sharing/publishing over the ether.

One solution is to save the page/image as a PDF document, or print to file as a PDF, and then print from that. It's a bit of a long work around, but it usually works.


VirtualBox 5.2.4 Shared clipboard not working in Ubuntu 16.04.3 LTS

virtualbox-guest-dkms's version in Ubuntu 16.04.3 is 5.0.40-dfsg-0ubuntu1.16.04.2, which is the version of VirtualBox in Ubuntu's repository rather than 5.2.4. This might be causing your issue.

Try the following to install the proper version of Guest Additions:

Start the virtual machine
In the VirtualBox Devices menu, choose Insert Guest Additions CD image...
Open a terminal by pressing Ctrl+Alt+T
Run sudo apt purge virtualbox-guest-dkms
Run sudo /media/$USER/VBox_GAs_5.2.4/VBoxLinuxAdditions.run
Reboot

Except for step 4, it's a good idea to do this every time there's a new version of VirtualBox (step 5 should be changed to the proper path, of course).


What RDP clients support NAP to a Windows Server 2008 machine?

The NAP capabilities of Windows Server 2008 will only allow connection of computers that fully meet the security requirements set by the administrator.

Remmina may fail to meet a security requirement. Try another rdp program:

itap mobile rdp (require license, try the trial edition)

http://itap-mobile.com/desktop/rdp


How can .mp3, .mp4 files be transfered from a computer to a Windows 10 phone?

Qlix handles this, and handles it well.

apt-get install qlix


Removing Windows XP and installing Ubuntu 12.04

You can install Ubuntu over Windows. Ubuntu provides an easy-to-use interface for installing, so there are no terminal commands involved.

You will need a blank CD/DVD and an Ubuntu ISO that you can find at in here

First, extract the ISO using a live CD creator or extracting it with WinRAR to the CD/DVD and burn the files to it. Restart your computer and boot into the CD/DVD. You have the option to install Ubuntu on the desktop.

Keep in mind that installing Ubuntu over Windows will delete ALL files you have so make sure to back them up.


restoring .desktop shortcut functionality broken by 18 > 20 upgrade

The support for link-type desktop files was removed in May 2018 from Nautilus version 3.27.4 and later. The Nautilus developers have been pretty clear this removal is permanent (read this bug report for details) so at this point your options are

maintain your own fork of Nautilus,

use a version of Nautilus prior to 3.27.4, or

use a different file manager.

I would recommend option #3, since you can just install the file manager and keep using the same desktop as before.
The following graphical file managers
all support link-type desktop files,
can be installed in Ubuntu 20.04,
and can be used with the GNOME 3 desktop:

Caja (Launchpad)
Dolphin (Launchpad)
Nemo (Launchpad)
PCManFM (Launchpad)
PCManFM-Qt (Launchpad)
Thunar (Launchpad)

Note that Caja and Nemo are both Nautilus forks.
All but Thunar follow the link to the new folder;
Thunar opens a new window.
I've tested these with a stripped-down version of the desktop file from the example-content package.
[Desktop Entry]
Type=Link
Name=Examples
URL=file:///usr/share/example-content/
Icon=folder


KDE plasma 5 multiple displays, launcher not displayed properly

It was probably resolution related thing. My monitors had different resolutions. Once I changed them with new monitors that are same, this issue never appeared again.


Kompozer is a complete web authoring system that combines web file management and easy-to-use WYSIWYG web page editing.

KompoZer is designed to be extremely easy to use, making it ideal for non-technical computer users who want to create an attractive, professional-looking web site without needing to know HTML or web coding.

Download and installing:

Ubuntu help for downloading (official)
Find it in the Ubuntu Software Center > Kompozer directly.

Screenshots:


Seems that you don't have Synaptic Package Manager either.

Download aptitude from here
and install with dpkg or gdebi

then

sudo aptitude purge apt

sudo aptitude install apt

also install synaptic for future use.

sudo apt install synaptic


Is tilde '~' normal before dollar '$' sign in terminal prompt?

Yep. Absolutely. The ~ is saying that you're in your home directory. When you navigate to other directories, the ~ will change to reflect the path you're in.
Examples of what I see with my machine:

Location
What I See

Home Directory
jason@carbon:~$

Apache Root
jason@carbon:/var/www$

Downloads
jason@carbon:~/Downloads$


Are Drivers Available for Ubuntu Kodak 7.1 Hero Printer?

SourceForge has an interesting project which could be just your saviour...

  cups filters and ppd files, and sane backend, for the kodak ESP and
  Hero all in one printers on linux. Likely to work on all ESP and Hero
  printers

There is a report here for the v9.1 version of your printer.

The dev's are asking for testers and to report issues - so hopefully they can help if you run into issues.

to install

Download the deb package and install via the syntax

sudo dpkg -i [deb-package-name].deb


what is the difference between amd64 and x64; what is 'alternate' version in ubuntu download page

x86, i386, i686 are architectures which refer to 32-bit machines. x64, ia64 and amd64 refer to 64-bit machines. See. also My processor is 64-bit - does that mean I need the amd64 image?

For the difference between the alternate, desktop and server versions, see What are the differences between Desktop, Server, and Alternate Installs?


how to configure opendkim on ubuntu 14.04 mail server ( Postfix – dovecot )

First install the necessary packages:

sudo apt-get install opendkim opendkim-tools

Add the following to /etc/opendkim.conf:

Domain    example.com
KeyFile    /etc/postfix/dkim.key
Selector    dkim
SOCKET    inet:8891@localhost

Add the following to /etc/default/opendkim:

SOCKET="inet:8891@localhost"

Append a suitable DKIM configuration to /etc/postfix/main.cf:

# DKIM
# --------------------------------------
milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891

You must append no_milters to the receive_override_options line in /etc/postfix/master.cf. This prevents multiple signatures being placed on the same outgoing mail item

-o receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_milters

Now you can generate a private key for signing outgoing mail. Note that in the following command, dkim is the value given to Selector in /etc/opendkim.conf.

opendkim-genkey -t -s dkim -d example.com

Move the key into place, but don't forget to take a copy and keep that copy backed up somewhere safe:

mv dkim.private /etc/postfix/dkim.key

You'll need to restart Postfix and OpenDKIM services to pick up the configuration changes so that outgoing mail is signed using DKIM:

service opendkim start
service postfix restart

Next up is the DNS record setup. How you do this is again completely dependent on how you manage DNS or how it is managed for you - everyone's tools are different.

The file dkim.txt contains the following content, the full TXT record that must be created. It has the subdomain dkim._domainkey and a long set of encoded content as the value. Again "dkim" is the value given to Selector in /etc/opendkim.conf.

dkim._domainkey IN  TXT ( "v=DKIM1; k=rsa; t=y; "
"p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC9rulKo58JIb5h+3MMEnYhlnbuVgRoA4w68R/X7qA2Lfv3RpdrrUb+r7KxemIo6PUIOm6uZ5OymhBgpJ0LAWBHBSJjnFmDXNajSgxMOcvkpgmVCW1/k1kxK864WVVSyFVQPyUImqklY+ws4u+mog3PSbuq2J8NFAnvSwzMg3vT1QIDAQAB" ; ----- DKIM key mail for example.com

When setting this up you should omit the k=rsa; t=y; portion of the value. The first item there refers to the key format and that defaults to RSA. They second denotes that this is a test entry, and should not be included. So the value looks like this:

"v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC9rulKo58JIb5h+3MMEnYhlnbuVgRoA4w68R/X7qA2Lfv3RpdrrUb+r7KxemIo6PUIOm6uZ5OymhBgpJ0LAWBHBSJjnFmDXNajSgxMOcvkpgmVCW1/k1kxK864WVVSyFVQPyUImqklY+ws4u+mog3PSbuq2J8NFAnvSwzMg3vT1QIDAQAB"

It is helpful to view examples in the wild for the purposes of comparison, so that you can see how you should enter the value into your records. You can use the DKIM key checker or other tools such as dig. Note that the dkim._domainkey is the subdomain in the following command:

dig dkim._domainkey.twitter.com txt

EDIT 1

Change in /etc/postfix/main.cf form

# DKIM
# --------------------------------------
milter_default_action = accept
milter_protocol = 2
smtpd_milters = inet:localhost:8891
non_smtpd_milters = inet:localhost:8891

to

smtpd_milters           = inet:127.0.0.1:8891
non_smtpd_milters       = $smtpd_milters
milter_default_action   = accept
milter_protocol         = 2

Restart postfix. Check status for service opendkim and postfix. Check mail singing again.


netflix wont go full screen when using other programs

Right click it and check "Stay in fullscreen"


How do I find out which application plays sound?

To find out which application plays this sound please open the Sound Settings... menu and watch the Applications tab while the sound plays:

On the command line we may also issue the following command to list various informations on a current audio stream through Pulse Audio:

pacmd list-sink-inputs

This will display not only the application streaming audio (application.name) but also the PID of this application (application.process.id) and information on the media content.

If we do not wish system sounds to play we can disable these in the Sound Effects tab from the Sound Settings... and see if the annoyance stops.


What you need to do is, first, install dkms:

sudo apt-get update
sudo apt-get install dkms

Then, build and install the nvidia driver.

You must either install dkms before you compile and install the nvidia driver or compile and install the nvidia driver each time there is a kernel update.

Of course, the easiest thing to do is install dkms so that the driver will update when the kernel updates.

Additionally, you could use the proprietary nvidia driver available through apt-get and you would also not have to worry about it.

For nvidia-304

sudo apt-get install nvidia-304

For nvidia 310:

sudo apt-get install nvidia-310

For nvidia 340:

sudo apt-get install nvidia-340

Finally, whenever you have a problem after a kernel upgrade, you can always boot the old kernel by selecting additional options from the grub menu where you can select the kernel to boot from and don't forget that you can usually press CTRL + ALT + F2 and sign in with your user name and password.


Can I run apt apt-mark in .profile script?

When you login to Gnome, /etc/profile is run followed by ~/.profile.
I am unsure why gnome would be unresponsive when you run apt-mark. Perhaps you can check the logs.
You can view the logs using
journalctl _UID=<your user id>
Also, can you see if this happens if you try to write the output of apt-mark in /tmp?


Empty black screen after on virtual machine

Um well there a quite a few things that could be going wrong here.
I have had this issue before a few times and never caused by the
same thing.

First try turning on the box, in the menu, Machine > Reset.
I have had luck with this before.

What is your host os, Ubuntu.. Windows?
If ubuntu, you may need to reinstall kernel drivers.

Lastly check if the boot medium is still attached:
Goto Settings > Storage Look if "Controller:SATA" is Empty.


Well they finally did release 3.1.4 for 12.04 but nothing yet for 11.10 so it's
 easy to build. Make sure you have the build-deps installed, this should suffice  -

1 complete command

sudo apt-get install libglib2.0-dev libgtk-3-dev libnautilus-extension-dev \
libunique-3.0-dev libxml2-dev libdbus-glib-1-dev libgtop2-dev uuid-dev \
intltool dpkg-dev checkinstall gnome-doc-utils

After installing deps extract & cd to your nautilus-actions-3.1.5 source folder, ie. your terminal prompt ends at nautilus-actions-3.1.5$, Example I have extracted in Downloads & cd'ed to it

doug@doug-XPS-M1330:~/Downloads/nautilus-actions-3.1.5$

Then at the terminal prompt copy & paste this, press enter

./configure --with-gtk=3 --with-default-io-provider=na-desktop --disable-gconf

If the configure goes well then follow with this  (see at end of post for my current configure summary

make

When that's done install with this, make sure that synaptic or software-center are not open

sudo checkinstall --backup=no --deldoc=yes --fstrans=no \
--deldesc=yes --delspec=yes --default

That sould do it, you can move the nautilus-actions_3.1.5-1 deb package somewhere to keep if you wish & delete the source folder. Even though not really needed here I always run this after any checkinstall or make install, never hurts

sudo ldconfig

Ex. summary

Nautilus-Actions 3.1.5 configuration summary:

Installation prefix             /usr/local
Build system type               i686-pc-linux-gnu
Nautilus extensions directory   /usr/lib/nautilus/extensions-3.0
Gtk+ version                    Gtk+ 3.0
Default I/O provider            na-desktop
Enable deprecated functions     no
GConf enabled                   no
GConf schemas installation      disabled
Maintainer mode                 disabled
API Reference generation        disabled
HTML User's Manuals generation  disabled
PDF User's Manuals generation   disabled


Your internet connection is being intercepted by a proxy server that acts as a man-in-the-middle even on connections that are supposed to be private and authentic. This has nothing to do with Ubuntu or applications running on your computer. The error message from your browser is meant to alert you that you're not actually talking to the server at gog.com but to someone else.

The certificate presented to your web browser declares that it has been issued by “Digital Reflection”. As far as I can tell they supply appliances to internet providers that allows the latter to collect data on their customers for marketing research which apparently includes the interception of supposedly secure connections.

You basically have two options here:

Trust your internet provider and digital reflection to snoop on you “responsibly” without exposing you to security risks. In that case you can ask Firefox to trust their certificate authority for all secured connections. It's possible to apply this trust system-wide.
Don't trust them and ask them to stop snooping on you or find a way around their connection interception with a VPN or equivalent.

If you need help with either of the two, please ask a new question because it would lead to far away from the original question.


Autopilot - OpenStack - Reboot of cloud fails

As of this writing, there is no more graceful way to do this.  If services have stopped, get access to your environment then clean up the services manually -- usually by doing juju resolved --retry <unit> on everything that has failed.


Delete Ubuntu from dual boot Windows 8.1 in GPT disk

Press Win + R to get the run box, type diskmgmt.msc and press enter.

Just click with right mouse button on the Ubuntu partition, and
choose to Delete Volume.
If Windows 8.1 was preinstalled on your computer, please ensure you
don't remove recovery partitions, etc.
The space formerly occupied by Linux should now say "Unallocated".
And Now Right-click on C: and "Extend Volume" to increase the size of
drive C using the unallocated space.(NOTE: You can replace any drive letter instead of C: that you shrink it before for installing Ubuntu)
If you were using grub to dual-boot (most probably), then you may
need the windows 8.1 CD to fix the boot manager and make Windows 8.1
bootable again.

How to fix your boot manager :

boot your system using windows 8.1 installation CD or flash drive
go to "repair your system"
use command prompt (Troubleshoot ► Advanced Options ► Command Prompt)
type bootrec /fixboot then hit enter
type bootrec /fixmbr then hit enter
exit

This time your system will boot directly into windows.

This is the safe way to uninstall Ubuntu.


How to replace bottom-right-zone click with two-finger touch/click on clickpad?

Run the following command as a regular user:

gsettings set org.gnome.desktop.peripherals.touchpad click-method 'fingers'


How to solve Fatal error: Call to undefined function readline()? readline library not found?

The default php builds on ubuntu use libedit and instead of readline. (Due to some licensing issue)

To get the readline support you can download the source and build it


Files missing in ZFS pool after power outage, only newly written files appear

If you don't see the ZFS pool with df it isn't mounted and Plex is writing your new episodes to your root filesystem instead.

Try: zfs mount -a

..and check df again.

If this works your recently added files will seem to disappear because your mounted ZFS pool will mask the files on the root filesystem.   You can move them to a temporary directory before mounting your pool, then copy them back to your ZFS pool.


Redirect iptables logging to another logfile

The problem was that rsyslog was loading the 50-default.conf preferences before the custom preferences set in my_iptables.conf.

The solution was to add a number prefix to the conf filename, one that was lower than 50. So I renamed it to 10-my_iptables.conf.

File /etc/rsyslog.d/10-my_iptables.conf

# Log kernel generated iptables log messages to file
:msg,contains,"[ipT" /var/log/iptables.log
& ~

iptables logging prefix:

... -j LOG --log-prefix "[ipT4] ...

ip6tables logging prefix:

... -j LOG --log-prefix "[ipT6] ...

Then I restarted rsyslog:

# sudo service rsyslog restart

This had the desired effect -- all iptables logging was now directed to '/var/log/iptables.log'.


How to stop Ubuntu from shutting down my screen when I close the lid

You can easily disable this by clicking the System Settings icon in the Launcher/Task bar, and then clicking on Brightness & Lock.

From there, you flip the Lock switch to the off position, and un-check the "Require my password when wakening from suspend." check-box.

The other thing you have to watch for is whether or not your system has a large enough swap partition to actually go into suspend, if the system is set up to go into suspend, when the lid is closed.  Your swap partition needs to be at least the size of your RAM, preferably a few Gig larger.  If your swap partition isn't large enough, your system will hang when it tries to suspend.

If you aren't set up to Suspend properly, then you will also need to go over your Power settings, so they don't shut down the system when the lid is close.  You can do this in System Setting -> Power.


how do I get dhclient to start when I login and start as root?

add this line to the end of /etc/profile

dhclient eth0


The same problem happens with Scilab 6.0.2 installed from apt. In order to make plots visible, I had to install an older version of libjogl2-java. Example working version: 2.3.2+dfsg-5.

On Ubuntu 18 I installed libjogl2-java from Debian stretch sources:

apt-get install -y --no-install-recommends  debian-archive-keyring &&\
  sudo ln -s /usr/share/keyrings/debian-archive*.gpg /etc/apt/trusted.gpg.d/ &&\
  echo "deb http://deb.debian.org/debian stretch main" > /etc/apt/sources.list.d/libjogl2-java.list &&\
  apt-get update && apt-get install -y --no-install-recommends --allow-downgrades \
  libjogl2-java=2.3.2+dfsg-5

I was inspired by: https://bugzilla.redhat.com/show_bug.cgi?id=1650958 .
Also, I created a docker image with Scilab: https://github.com/kudulab/docker-scilab-gdojo .


This is a clear sign of a failing hard drive, the fact that the computer keeps on trying to access the hard drive is because failures in reading and writing are causing heavy load.

Backup all your files as soon as possible and prepare to buy a new hard drive to replace the current one.


You need to remove all the current fglrx packages from your system

if any of these returns errors ie: file not found, package not found ignore it

Type in terminal Ctrl-Alt-T

sudo sh /usr/share/ati/fglrx-uninstall.sh

sudo apt-get remove --purge fglrx fglrx_* fglrx-amdcccle* fglrx-dev*

Once this is done follow these instructions to install the correct driver from the officical AMD site

OR

If you want to install the Official ubuntu binarys go-to System Settings >> Additional Drivers and select the Driver thats recommended


Safely remove linux partition and grub from windows

            you may try to reinstall the unity it will             bring back the launchbar and sidebar.

  sudo apt-get update
  sudo apt-get install --reinstall ubuntu-desktop
  sudo apt-get install unity


Ethernet interface gets disabled when GPU is removed

After doing some more digging around online and finding out most problems like this are resolved by editing /etc/network/interfaces for the appropriate interface, that wasn't exactly correct for me. In my case I had to edit /etc/netplan/*.yaml since I didn't have ifupdown. Inside the interface enp2s0 was listed, so I changed it to enp1s0 and that solved the issue of it always being disabled at boot.

Seems like the .yaml file doesn't get automatically updated on for what network interfaces get added or removed and has to be done manually.


Aircrack disables your WiFi card for normal usage. To reenable it, have a look at this question asked on ubuntuforums.org


What is the difference between snap/beta and snap/edge in ubuntu softwares?

These relate to snap channels, which are broken into tracks, risks, and branches (the latter is optional). There are four risks in each track, in order of increasing stability:

edge
beta
candidate
stable

By default there is only one track ("latest"), although more can be created. For example, check out Nextcloud in the software center-- you'll see tons of options, all relating to the major version of Nextcloud.
In theory the difference between the beta and edge risks is that edge would be "riskier", less stable. For example, oftentimes the edge channel represents the trunk of development (e.g. every commit that lands on master ends up as a snap build in edge). In reality, this is going to vary between snaps because it all depends on how the snap developer decides to use the channels.


Keep getting message `404:: command not found` everytime opening terminal

This part of your bash -lxe output:

///usr/share/bash-completion/bash_completion:1981 . /etc/bash_completion.d/docker-compose
////etc/bash_completion.d/docker-compose:1 404: Not Found
////etc/bash.bashrc:57 '[' -x /usr/lib/command-not-found ']'
////etc/bash.bashrc:58 /usr/lib/command-not-found -- 404:
404:: command not found
////etc/bash.bashrc:59 return 127

reads to me that you have a /etc/bash_completion.d/docker-compose that starts off with 404:. I'm guessing at some point you tried to download that configuration file from somewhere and instead wound up saving an HTTP error message.

That file should be plain text; you can use your preferred text editor on it (you should need to use sudo/sudoedit/etc. to modify it).

PS: I suggest in the future you review downloaded files before installing them—not only to notice error messages, but also to see what they do (especially important if you don't fully trust the site its coming from, or if its served over HTTP instead of HTTPS), and if there is any customization needed for your particular setup.


Error while matching End of line with $ in Sed command

You must quote the character $ when it is to stand for itself inside a string in doublequotes; otherwise the shell will think that it introduces a variable expansion, and will be unhappy if the character after it is not alphabetic or one of the special variables.

sed -i "s/cb $i\$/cb $i $cb/" */callback_events

There are two levels of character interpretation here.

First the shell reads the command and applies its rules. One of the rules is that inside doublequotes $ introduces variable expansion unless quoted.
After the shell has finished the command looks like this:

sed -i s/cd <value-of-i>$/cd <value-of-i> <value-of-cb/ dir1/callback_events dir2/callback_events...

Note that the quotes are gone, $i and $cb are replaced with their values, and \$ became just $. Also */callback_events got replaced with a list of files.
This is then passed to sed, which applies its rules. One of those rules is that an $ at the end of the search pattern means end-of-line.


Adjusting software management apps in Ubuntu 20.04

Open the Software app desktop icon file for editing in nano text editor.
sudo nano /usr/share/applications/org.gnome.Software.desktop

Edit the file in nano text editor so that it looks like this. The required changes to /usr/share/applications/org.gnome.Software.desktop are highlighted in bold text.
[Desktop Entry]
Name=Software
Comment=Add, remove or update software on this computer
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=org.gnome.Software
Exec=gnome-software %U
Terminal=false
Type=Application
Categories=GNOME;GTK;System;PackageManager;
# Translators: Search terms to find this application. Do NOT translate or localize the semicolons! The list MUST also end with a semicolon!
Keywords=Updates;Upgrade;Sources;Repositories;Preferences;Install;Uninstall;Program;Software;App;Store;
StartupNotify=true
MimeType=x-scheme-handler/appstream;x-scheme-handler/apt;x-scheme-handler/snap;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-software
X-GNOME-Bugzilla-Component=gnome-software
X-GNOME-UsesNotifications=true
DBusActivatable=true
X-Ubuntu-Gettext-Domain=gnome-software
Nano text editor keyboard shortcuts
Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location.
Use the keyboard combination Ctrl + X to exit nano.
Logout and log back in again. If that doesn't work open the terminal and type: sudo apt-get install --reinstall gnome-software && sudo reboot
If the categories in the Software app aren't loading read the answers to Ubuntu Software not loading properly.


From what I've seen, it's my understanding that the difference between 7.1 and stereo is made in your sound card, and that any stereo headset can be made into a virtual 7.1 headset by changing some sound options under All Settings > Sound > Output **
change the **Mode to Analog Surround 7.1 Output

However, a USB headset is preferred as it comes with its own built-in sound card (especially if your computer's sound card doesn't support anything higher than stereo).
I bought the 7.1 pro & haven't looked back. It's great.

Bottom line is, both the Kraken Pro and the Kraken 7.1 get their 7.1 audio from your sound card, and so both will have the same 7.1 audio. The Kraken 7.1 just gets more customization with the Razer software, and whatever differences there are in the specs. I don't think that Ubuntu has any of the fine-tuning that Razer's software has, but both headsets should have 7.1 surround once you set them to be that way.

Before you go off and buy one of these, take note that I'm not 100% sure that this is correct - this information is just from what I've seen whilst browsing for a new headset and personal experience with the audio options for my current pair of headphones. It'd be a good idea to go find some other sources, or wait for someone more knowledgeable to answer this question.


Ubuntu 14.04.1 not detecting windows 7 or partitions

If your Windows partition is encrypted for example then it will not see it most likely. Open a terminal by pressing ctrl+alt+t and type sudo os-prober This will try to detect installed operating systems on the hard drive. Next you could open GParted from the menu and see if it detects Windows, It should be a NTFS partition, take note of the name, should be something like sda. Go back to a Terminal and type sudo mount /dev/"name of Windows partition here" EX: sudo mount/dev/sda1.

Hopefully this will mount your Windows partition. If it still does not detect windows for the install along side option but Gparted does, Then you can choose the "something else option and manually partition Ubuntu then install. Please note that you may have to reduce or split the Windows partition to make free space to play with.


dpkg: error: parsing file '/var/lib/dpkg/updates/0045' near line 0:

Ok I have solved the issue myself.

I ran these two commands in terminal (CTRL+ALT+T):

cd /var/lib/dpkg/updates && rm -rf 0045
sudo dpkg --configure -a

And my issue was solved.


PlayOnLinux does a terrible job with Starcraft II at the time of this writing. If your end goal is playing Starcraft II on Linux, here's what worked for me, on Ubuntu 17.04

Remove PlayOnLinux entirely.

sudo apt-get remove playonlinux

Tear out the wine that ships with the OS.

sudo apt-get remove wine
sudo apt autoremove

Enable 32 bit architecture

sudo dpkg --add-architecture i386

Add the repo for wine staging.

wget -nc https://dl.winehq.org/wine-builds/winehq.key
sudo apt-key add winehq.key
sudo apt-add-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ ubuntu_version main'

Where 'ubuntu_version' is version like bionic or eoan etc.

Update and install

sudo apt-get update
sudo apt-get install winehq-staging

Grab battle.net installer

wget -O Battle.net-Setup.exe https://www.battle.net/download/getInstallerForGame?os=win&locale=enUS&version=LIVE&gameProgram=BATTLENET_APP

Configure wine by running winecfg and then adjust settings according to the screenshot below. Change out the resolution with your native resolution.

winecfg

Wine Configuration Screenshot
Run it with wine

wine Battle.net-Setup.exe

From there you can pretty much kick off any Blizzard game such as Starcraft II, Diablo 3, or Heros of the Storm on Ubuntu but I've only tested this with Starcraft II.

Furthermore, I had to jump through some extra hoops to get my gaming laptop here to actually use the better of the two graphics card it has inside it. If you're in this boat too, you'll need to keep reading to get Starcraft II just right.

Launch "System Settings"
Open "Software and Drivers"
Access the tab, "Additional Drivers"
Switch to the latest binary drivers from the vendor. (Sorry Open Source community - I like Starcraft)

Binary Drivers selected
Then tell Linux to always use your beefy card

nvidia-settings

And set the Prime Profile to NVIDIA

--- This gets you running, but not stable. If I was playing in game more than a couple minutes I got an unhelpful blizzard error. So did some additional changes that have stabilized me.

    sudo apt-get install winetricks winbind

    winetricks corefonts vcrun2005 vcrun2008 vcrun2015

    cd "/home/rakaim/.wine/drive_c/Program Files (x86)/Blizzard App/Battle.net.8394"

    mv "Battle.net Helper.exe" "Battle.net Helper.exe.old"

Installed winetricks and some supporting software.
Then I had to rename the Battle.net Helper.exe to old.

Edit: I noticed that this directory "Battle.net.8394" changes its numbers on each Battle.net update. Take care to make the changes you need in the latest installed version.

Edit: New errors suggested that I needed to install winbind. It appears to have helped.

Edit: Upgraded to Ubuntu 17.04


TP-LINK Archer T3U not working in Ubuntu 18.04

I have just recently updated https://github.com/jeremyb31/rtl8822bu to support this device
Make sure the other dkms modules are gone
sudo dkms remove rtl88x2bu/5.3.1 --all
sudo dkms remove 8822bu/1.1 --all

Remove any possible manual installs using make
cd rtl8822bu && sudo make uninstall
Update the git
git pull

Remove cilynx
 cd ~/rtl88x2BU_WiFi_linux_v5.3.1_27678.20180430_COEX20180427-5959
sudo make uninstall

Install updated version from https://github.com/jeremyb31/rtl8822bu
cd ~
sudo dkms add ./rtl8822bu
sudo dkms install 8822bu/1.1
Reboot


Ubuntu doesn't find installed drivers for Brother MFC-255CW printer

Here is a link for the drivers for the Brother MFC-255CW printer for Linux. I was taking a look at this AskUbuntu question and, although this refers to 11.04, it seems like following the answers mentioned in this question should get your printer working. You need to install both the LPR and Cupswrapper drivers in the link.
Additionally, there is an UbuntuForums thread that details how to do this. I would check this out if you want step by step instructions.
Wireless Setup
You have to go to http://localhost:631/printers in your browser to set up the printer for wireless because CUPS comes with this web interface to add the printer. Here are some general instructions for this:

Click on your printer name, Administration and then Modify Printer.
Select your printer under Networked Printers, click Continue.
Enter the IP address for your printer, click Continue.
Select your printer name with "Cups" version.
Click Modify Printer and that should be it.

Edit:
This will install only the LPR driver. While following instructions from the Brother website to install the CUPSwrapper driver, you will get an error. To fix this, copy the mfc255cwcupswrapper-1.1.3-1.i386.deb to another directory location and name it mfc255cwcupswrapper.deb(in other words, delete the version number). Going back to the instructions, change the terminal input from
dpkg -i --force-all mfc255cwcupswrapper-1.1.3-1.i386.deb
to
dpkg -i --force-all mfc255cwcupswrapper.deb
in order to reflect the new name of the driver file and Ubuntu was able to find the MRC255CW driver.


How to put unity launcher on in different positions on different monitors

Automatically move the launcher, depending on the active screen

A possible solution is to automatically change the position of the launcher, depending on the current mouse-position:

if it is on the left screen, move the launcher to left
if it is on the right screen, move it to the bottom

In the test I ran, it worked surprisingly smooth, and windows adapt well to the change.

The script

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

scr_data = subprocess.check_output(["xrandr"]).decode("utf-8")
border = int([s.split("x")[0] for s in scr_data.split() if "+0+0" in s][0])
left_scr = [l.split()[0] for l in scr_data.splitlines() if "+0+0" in l][0]

key = "com.canonical.Unity.Launcher"
item = "launcher-position"

def catch_mouse():
    return int(subprocess.check_output([
        "xdotool", "getmouselocation"
        ]).decode("utf-8").split()[0].split(":")[1])

test1 = ""

while True:
    time.sleep(1)
    test2 = catch_mouse() <= border
    if test2 != test1:
        if test2 == True:
            cmd = ["gsettings", "set", key, item, "Left"]
        else:
            cmd = ["gsettings", "set", key, item, "Bottom"]
        subprocess.Popen(cmd)
    test1 = test2

How to use

The script needs xdotool:

sudo apt-get install xdotool

Copy the script into an empty file, save it as move_launcher.py
Test- run it by the command (from a terminal)

python3 /path/to/move_launcher.py

If all works fine, add to Startup Applications: Dash > Startup Applications > Add. Add tghe command:

/binh/bash -c "sleep 15 && python3 && /path/to/move_launcher.py

EDIT

...Or more advanced, only a launcher on the active screen on an arbitrary position.

...a script that will set only one launcher (on the left screen, on the left side):

...while you are working on the left screen. This will give you full size view on the right screen...

...and one launcher at the bottom of the second screen:

...If you move to the right screen, giving you the launcher you need on the desired position on the right screen.

As mentioned, in the test(s), the windows adapted smoothly without an error.

The script

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

scr_data = subprocess.check_output(["xrandr"]).decode("utf-8")
border = int([s.split("x")[0] for s in scr_data.split() if "+0+0" in s][0])
left_scr = [l.split()[0] for l in scr_data.splitlines() if "+0+0" in l][0]
right_scr = [l.split()[0] for l in scr_data.splitlines() if all([
    not "+0+0" in l, l.count("+") == 2])][0]

key = "com.canonical.Unity.Launcher"
item = "launcher-position"

subprocess.call(["dconf", "write",
        "/org/compiz/profiles/unity/plugins/unityshell/num-launchers", "1"])

def catch_mouse():
    return int(subprocess.check_output([
        "xdotool", "getmouselocation"
        ]).decode("utf-8").split()[0].split(":")[1])

test1 = ""

while True:
    time.sleep(1)
    test2 = catch_mouse() <= border
    if test2 != test1:
        if test2 == True:
            cmd1 = ["xrandr", "--output", left_scr, "--primary"]
            cmd2 = ["gsettings", "set", key, item, "Left"]
        else:
            cmd1 = ["xrandr", "--output", right_scr, "--primary"]
            cmd2 = ["gsettings", "set", key, item, "Bottom"]
        subprocess.Popen(cmd1)
        subprocess.call(cmd2)
    test1 = test2

To use

This version runs exactly like the first one.

Note

These are just two examples. Many things are possible.

Two launchers, at the same time on a different position per screen, is currently impossible however, untill someone creates the option...


Unity launcher & Transmission have strange behaviour

Unlock both icons while they are showing. Then search for Transmission in the Dash and drag the icon on the Launcher.


way to call through Huawei Modem in 14.04 E303

This is how i made phone call from my Huawei modem K3772 on Ubuntu zesty using AT commands.Voice is working and i can also recieve call. I assume that your modem has voice capabilities and could make call  on Mobile Partner in Windows

insert your dongle into pc and should be detected by Network manager applet

2.Find out the various ports of the modem:

ls /dev/ttyU*

usually, the dialogue port (ie 1st port) is /dev/ttyUSB0, audio port (ie 2nd port) is /dev/ttyUSB1 and sms & internet aka data port (ie 3rd port) is /dev/ttyUSB3

install picocom:

  sudo apt install picocom

start picocom on the dialogue port:

  sudo picocom -c /dev/ttyUSB0

the -c means local echo on, making AT commands visible as you type

find the audio sample formats supported by your modem:

AT^CVOICE?

A reponse of 0,8000,16,10 means the rate is 8000hz

open another terminal and enable audio:

sudo cat /dev/ttyUSB1 | aplay -f S16_LE

open another terminal and enable microphone:

  sudo arecord -f S16_LE /dev/ttyUSB1

the audio sampleformat, S16_LE is 'Signed 16 bit Little Endian', Rate 8000 Hz, Mono it depends on the response from AT^CVOICE? other modems may require S16_BE

go back to the first terminal and dial the number:

ATDxxxxxxxxxx;

eg: ATD024698xxxx; OR ATD100;

from the same dialogue terminal he route audio:

AT^DDSETEX=2

you should now hear sound from your speakers and you can also speak into the
mic

after you are done with your call, you can hangup with:

AT+CHUP

if you want to keep you modem online so you can recieve calls, then keep both terminals open
You can recieve call with

ATA

followed by AT^DDSETEX=2 to enable sound
To stop picocom:
ctrl+a followed by ctrl+x

The mmcli developers are trying to implement it in ModemManager.I think
work is still on going.
maybe modem-manager-gui might also implement voice someday

tIP:-if you hear scratcy sound instead of human voice, change S16_LE to S16_BE.This is the sample format. other sample formats can be gotten from aplay --help

reference: mmcli Huawei voice


First You can search for replacements keycodes in your case via following command in terminal:

$ xmodmap -pke | grep Caps
keycode  66 = Caps_Lock NoSymbol Caps_Lock

$ xmodmap -pke | grep Enter
keycode 104 = KP_Enter NoSymbol KP_Enter

You can get all keycodes according to keys by command xmodmap -pke.

So, Run following command (to get Caps-Lock Work as Enter Key):

xmodmap -e "keycode 66 = KP_Enter"

(Then you can set/assign suitable key to keycode by command xmodmap -e)


Ethernet interface not connecting to internet Ubuntu 18.04.2 Server on Dell PowerEdge C6320

All the data that you've provided looks fine, but you have two problems.

you've mixed and matched netplan and ifupdown scripts

Your /etc/network/interfaces should only contain this:

auto lo
iface lo inet loopback

you have a cabling or hub/switch/router/modem problem, as sudo lshw -C network shows link=no

Revisit your cabling from the computer to the hub/switch/router/modem. Use cat 5e or cat 6 cables. Observe the LED light near the ethernet connection on the computer... it should be green or yellow, indicating a link. Use the lshw command to troubleshoot, until it shows link=yes.


Highlight search results in GNOME Terminal?

I have replaced the default gnome terminal by Konsole from KDE. The price to pay is the substantial increase of size in your installation due to KDE libraries. This terminal offers to highlight the search results and opens the "Find" dialog as a bottom panel attached to the terminal which avoids annoying overlapping windows.


maybe there's a better solution than work as www-data in Unity, if yes please tell me

I'm not sure what you want to do, but if you need to run graphical applications with the  www-data user while logged in as another user in a graphical session:

sudo apt-get install sux
sudo sux www-data
launch your graphical applications from this terminal session.

2.b the www-data user's default shell has to be set to one which allows logging in (but you already changed it to such). But you don't have to set or unlock the password for www-data since you use sudo sux www-data, if www-data has a password you can simply sux www-data.


Script for creating users on new servers

Sorry, I figured out a solution a few days ago, and here is my solution:

for i in "$@"; do
    echo creating user: "$i"
    sudo adduser $i

    echo add user to sudo group
    sudo usermod -aG sudo $i

    echo creating ssh folder and authorized_keys
    sudo -H -u $i bash -c 'mkdir -p /home/"$0"/.ssh' $i
    sudo -H -u $i bash -c 'chmod 700 /home/"$0"/.ssh/' $i
    sudo -H -u $i bash -c 'touch /home/"$0"/.ssh/authorized_keys' $i
    sudo -H -u $i bash -c 'chmod 600 /home/"$0"/.ssh/authorized_keys' $i
done

This requires me, of course, to create a new script on each server, but is still way faster than having to run all those commands manually for 5 users. So what I do on each server is:

touch create_users.sh
chmod +x create_users.sh
vi create_users.sh and past in the "script code"
Lastly I run ./create_users.sh john joe jill

I am then prompted for each user to enter a password, I then just create a simple password for each user and let them change it asap. This works for me and is way faster than running adduser --> usermod --> mkdir etc. manually for each user. So for now I stick with this.

Feel free to post your solutions, if any, I would like to see other approaches, especially because I am pretty new to scripting and working with ubuntu servers.


I had the same problem.

Upgrading the kernel from 4.4.0 to 4.4.14 worked for me.
You can check your kernel release by typing uname -r in the terminal.

Here's a quick tutorial to upgrading the kernel

You can skip straight to the 64bit section.

You can try to upgrade your kernel to 4.4.14:

cd /tmp
wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.14-xenial/linux-headers-4.4.14-040414-generic_4.4.14-040414.201606241434_amd64.deb
wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.14-xenial/linux-headers-4.4.14-040414_4.4.14-040414.201606241434_all.deb
wget kernel.ubuntu.com/~kernel-ppa/mainline/v4.4.14-xenial/linux-image-4.4.14-040414-generic_4.4.14-040414.201606241434_amd64.deb
sudo dpkg -i linux-headers-4.4.14*.deb linux-image-4.4.14*.deb

If you encounter problems, you can uninstall with:

sudo apt-get remove linux-headers-4.4.14* linux-image-4.4.14*


Openstack with autopilot, some networking clear up

Answer(s):

1.) Can be accomplished by typing:

JUJU_BOOTSTRAP_TO=host.maas sudo -E openstack-install

(Thanks to "stokachu" from IRC)

5.) This is an option that is set in the scheduler of Openstack and can be changed in the nova.conf file on the compute nodes. (NOT YET TESTED)


How to remove the first two characters of the file name when it is a hypen?

You can use -- to indicate the end of options, so that filenames starting with - are treated as filename arguments:

rename -n 's/^..//' -- *.mp3

Ex.

$ rename -n 's/^..//' *.mp3
Unknown option:  foo - bar.mp3
Usage:
    rename [ -h|-m|-V ] [ -v ] [ -n ] [ -f ] [ -e|-E perlexpr]*|perlexpr
    [ files ]

whereas

$ rename -n 's/^..//' -- *.mp3
rename(- foo - bar.mp3, foo - bar.mp3)


What other ways to install ubuntu without using a flashdrive?

As far as i know, there are 5 Ways to install ubuntu:

1- Boot From a Live USB Drive or CD

2- Install Ubuntu On Windows With Wubi

3- Run Ubuntu In a Virtual Machine

4- Dual-Boot Ubuntu

5- Replace Windows With Ubuntu

(Read More here)


Deja Dup gets stuck on "Preparing..." or "Reading..." (when backing up)

You could try this from a terminal to see what's going on:

Have a look at file /tmp/deja-dup.log after running the following line and replicating the problem (the file gets written after the deja-dup exits):

DEJA_DUP_DEBUG=1 deja-dup --backup > /tmp/deja-dup.log


Has anyone encountered problems with Trash drives on NTFS partitions?

My guess is that you will run into problems, since NTFS does not support Unix permissions. Try out deleting and restoring a few files before you move your trash there for good.

That said, I found that a regular backup is a much more safe solution than Trash, and you can back up on the NTFS partition just fine.


Ubuntu 16.04 - External monitor doesn't work

I had similar experiences when I plugged in my Samsung HDMI-capable TV, and it came up as Unknown Display (in Settings / Display).

In my case, the problem was that my graphics card needed a power-down. Not a reboot, a full power-down.

I spent hours trying and researching xrandr and such, until a power failure made everything work, and sudddenly the PC recognized the TV correctly. Since it works better in Windows, maybe this is a driver issue.(BTW, if HDMI sound and video on the Samsung are out-of-sync, the TV needs a power cycle. Too bad Samsung Support doesn't know this, or won't admit it.)


Three simple steps:

To disable system sounds check Sound Settings:

Mute Alert Volume:

To mute the Login Sound open Startup Applications:

Disable GNOME Login Sound:

To disable the alert on the login screen (lightdm) you have to mute it once - it is muted automatically next time you start your system:

Done.


Ubuntu 14.04 and Nvidia GeForce (840M) compatability on 64-bit laptop

I had a very similar problem and spent several days trying to get my card working.

I have an ASUS X550LN which has an Intel Graphics Driver on the CPU and a dedicated NVIDIA GEFORCE GT 840M.

First, installing the nvidia-340 drivers would cause Unity and Gnome to fail when launching. I could drop to a shell Ctrl + Alt + F1 and remove the driver sudo apt-get remove nvidia* to get things back to running solely on the Intel Graphics Driver.

After some research, I discovered that having both these interfaces made the system an NVIDIA Optimus (which is actually good just not well supported on Linux yet). Luckily, there is a project called Bumblebee which will help. More info here: https://wiki.ubuntu.com/Bumblebee

Here is what finally worked for me:

Install bumbleebee

Add bumblebee repository: add-apt-repository ppa:bumblebee/stable
Update repository information: apt-get update
Install packages: apt-get install bumblebee bumblebee-nvidia virtualgl linux-headers-generic
Reboot

For me, at this point bumblebee was installed but the nvidia-304 package was installed as this is what is installed with nvidia-current. Looking online I found that I needed Driver 337+. At the time of writing this, the best driver for me was nvidia-340. This however is not in the default repo so you will need to add another one.

Install correct nvidia driver

Add xorg-edgers repository: add-apt-repository ppa:xorg-edgers/ppa
Update repository information: apt-get update
Install nvidia-xxx drivers (for 840m it was nvidia-340): apt-get install nvidia-xxx

For me I got an error message the first time I ran apt-get install nvidia-xxx. However, simply running it again worked fine. I'm not 100% sure what happened.

Configure bumblebee to use latest driver

Using your favorite text editor open /etc/bumblebee/bumblebee.conf
Find the line starting with Driver and change it to Driver=nvidia
Find the line starting with KernelDriver and change it to KernelDriver=nvidia-xxx
Find the line starting with LibraryPath and change it to LibraryPath=/usr/lib/nvidia-xxx:/usr/lib32/nvidia-xxx
Find the line starting with XorgModulePath and change it to XorgModulePath=/usr/lib/nvidia-xxx/xorg,/usr/lib/xorg/modules

Basically, replace all of the nvidia bits with the nvidia driver you installed in step 2.

Reboot

After rebooting, hopefully you are able to access Unity, Gnome, or whatever display manager you're using.

Test that everything is working

First test without using NVIDIA card: glxspheres
Second test with NVIDIA card: optirun glxspheres

I hope this works for the next person!


Can't upload project to PPA using Quickly

GPG doesn't like to run if your keys and configurations don't have the right permissions.  Specifically it doesn't like other users being able to read them.  So try running: chmod 600 /home/robin/.gnupg/gpg.conf and trying again.  If you get the same error, but from another file in /home/robin/.gnupg/, do the same chmod 600 on that as well.


Workspace switcher for 18,04 , desktop and laptop?

Open the GNOME Tweaks application and enable the Top Bar/Activities Overview Hot Corner...

Then close GNOME Tweaks, and from now on, you can move your mouse pointer to the upper-left corner of your screen. The workspaces will appear on the right side of the screen. Click on any workspace to switch to it.


I want my Ubuntu on an external display alone?

Run (in terminal) xrandr -q

Find out which connected output you want to disable (in this example we disable LVDS1) and then:
xrandr --output LVDS1 --off

Example output of xrandr -q:

LVDS1 connected 1280x800+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   1280x800       59.9*+
   1024x768       60.0
   800x600        60.3     56.2
   640x480        59.9
VGA1 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 521mm x 293mm
   1920x1080      60.0*+
   1280x1024      60.0
   1440x900       59.9
   1280x800       59.8
   1152x864       75.0
   1024x768       70.1     60.0
   800x600        60.3     56.2
   640x480        66.7     60.0


Make sure that you are pointing VIM to the powerline bindings folder (it took me a while to understand that by just running the installer, this folder was still not avalailable). In my case I moved the powerline folder to /opt, so in my .vimrc I have a line that:

set rtp+=/opt/powerline-develop/powerline/bindings/vim

The location of your powerling bindings folder is likely to be different

I was unable to have the 10-powerline-symbols.conf recognized in my user folders (even after creating .font.conf.d so I ended up moving that to /etc/fonts/conf.d and run sudo dpkg-reconfigure fontconfig to have this new configuration file activated (and logged out and logged in).

For me that last step did the trick.

One thing you can do to see if all the other parts of the installation went well, is to select the powerline font itself inside vim (or gvim). Although the text will look unworkable, at the very least now the powerline should show the correct fonts. If they do not, then there is something else that needs fixing.


Use US(International with dead keys) in i3wm

setxkbmap -layout us -variant intl

Just picking up the comment by quixotic, which worked for me, and writing this up as an answer like Elder Geek suggested :)


If it's just a simple bash(.sh) script you should be able to add it to the crontab file. I used it to play a video at start-up on my Raspberry Pi but it should work with Ubuntu.

So here is what I use:

@reboot /path/to/script/video_script /path/to/script/video_file

Yours should look like this:

usr/local/include/temp_throttle.sh 80

Add this to the crontab entry using crontab -e. The format is really important but it should give you detailed instructions.


Video's transferred from HFS+ to Ext4 wont play on Ubuntu

Weirdly, all I had to do to fix the files on the Ext4 file system was to run a touch all command and they started work.

I am not sure why this worked, but I wanted to be sure to share my solution.


I don't use amazon prime, but I know someone who does and I've seen it used before. The way I saw it done was through amazon.com, just go to the prime tab (sign in of course) and to prime instant video, your library should show up there.

And I've no idea what HAL is (other than the computer from 2001 A Space Odyssey), but DRM is Digital Rights Management and attempts to prevent piracy (not very successfully).


HP probably has the best Ubuntu (in fact, Linux) support amongst all of the manufacturers. have a look at http://h10018.www1.hp.com/wwsolutions/linux/products/printing_imaging/

You should not need to install any drivers - just connect the HP printer over USB and let Ubuntu do its thing.


How can I install MySQL 5.7 on Ubuntu 20.10

If the goal is to use a previous version of MySQL on a current release of Ubuntu, the two options that I have found to be most reliable are:

Creating a dedicated Virtual Machine for that software
Using a Docker container for that software

The nice thing about Virtual Machines is that they operate just like a regular Ubuntu installation and all of the skills you already know can transfer over just fine. The downside is that they generally require more resources to be dedicated to them.
The nice thing about Docker containers is that you can very quickly set up a specific version of software without first going through the process of obtaining an older Ubuntu ISO and setting everything up.
Here is how you can get MySQL 5.7 running with either option:
Installing MySQL 5.7 on a Virtual Machine

Download and install VirtualBox if you do not already have it on your system
Download the ISO for Ubuntu Server 16.04.7, which uses the MySQL 5.7 release by default (unless you manually override it to use MySQL 8.0)
Create an Ubuntu VM in VirtualBox, ensuring the VM is accessible to the host machine (or the local network)
Install MySQL with:

$ sudo apt update
$ sudp apt install mysql-server

Use the machine

Installing MySQL 5.7 via Docker
First, if you don't already have Docker installed on your system, let's get Docker:

Open a Terminal and ensure the basics are installed:

$ sudo apt update
$ sudo apt install apt-transport-https ca-certificates curl gnupg-agent software-properties-common

Add Docker's GPG key to your system:

$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Add the Docker software repository:

$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"

Install the Docker Engine:

$ sudo apt-get update
$ sudo apt-get install docker-ce docker-ce-cli containerd.io

Make sure the tool functions by running the "Hello World" container:

$ sudo docker run hello-world

Now that Docker is installed, let's get MySQL 5.7 ...

Pull the MySQL 5.7 container from Docker:

$ sudo docker pull mysql/mysql-server:5.7

Run the container:

sudo docker run –name=mysqlCon -p 3306:3306 -d mysql/mysql-server:5.7

Note: the -p sets the port you wish to communicate on. 3306 is the default for MySQL.

Get the default root password for the MySQL server:

sudo docker logs mysqlCon

You'll see a line that looks like:
[Entrypoint] GENERATED ROOT PASSWORD {password}

Connect to the MySQL instance on Docker:

sudo docker exec -it mysqlCon mysql -uroot -p

Note: The above command will SSH into the container and run the mysql command. You'll be asked for the generated password.

Set your own password:

ALTER USER 'root'@'localhost' IDENTIFIED BY 'CorrectHorseBatteryStaple';

Be sure to set a proper password for your installation.

Start using MySQL.

This looks like a lot of steps but, once you see the flexibility of using VMs or Docker containers to work with very specific versions of software, you'll wonder how you ever did without.
Hope this gives you what you need.


What's the difference between the following php packages?

You can issue apt-cache show PKG (or just apt show PKG) command to get package description, in this case we'll start by issuing the command to each package you want to know about.

libapache2-mod-php7.2

This package provides the PHP module for the Apache 2 webserver (as found in the apache2-mpm-prefork package).  Please note that this package ONLY works with Apache's prefork MPM, as it is not compiled thread-safe.

php-common

This package contains common utilities shared among all packaged PHP versions.

php7.2-common

This package provides the documentation, examples and common module(s) for PHP.

php7.2-cli

This package provides the /usr/bin/php7.2 command interpreter, useful for testing PHP scripts from a shell or performing general shell scripting tasks.

php7.2-json

This package provides the JSON module(s) for PHP.

php7.2-opcache

This package provides the Zend OpCache module(s) for PHP.

php7.2-readline

This package provides the readline module(s) for PHP.

If you plan to use apache as your webserver, then leave out as it be because by default apt will install apache integration with php— otherwise just installing php7.2-cli will get rid of apache dependencies for good.


Find the process that is shutting down or killing a program or service in Linux


I found the answer in /usr/share/doc/mp3info-gtk/README.gz:

Usage: GTK Version
==================

gmp3info [song.mp3]

So gmp3info is the command you are looking for.


How to use systemd-resolve instead of connman as DNS proxy?

Sorry, it was as easy as:

removing connman:

sudo apt remove connman

deleting resolv.conf:

sudo rm /etc/resolv.conf

relinking to /run/systemd/resolve/resolv.conf

sudo ln -s /run/systemd/resolve/resolv.conf /etc/resol.conf

The last 2 steps were necessary because without the /etc/resolv.conf managed by connman, NetworkManager managed it, putting "127.0.1.1" as DNS server (and there were no server listening there).

The man page of NetworkManager says that all it needs to let systemd-resolve manage resolve.conf, is to make a softlink to the resolv.conf file under any of the systemd directories.


Ubuntu 18.04 alternating between successful boot and failed boot

So it seems this is an issue caused by a faulty update of intel microcode (relative to the affected hardware).

Working around it is done by adding dis_ucode_ldr as kernel parameter. This eliminates the hanged boots.

Note that this workaround comes with a risk of missing a fix to a CPU bug. The price looks like keep following on errata/bugs relevant to the CPU model and and perform BIOS updates to the latest version in a hope that the vendor addresses those bugs. Hopefully a future update of intel-microcode package would fix that issue.

Edit:

I discovered that the default package of intel-microcode that comes with Ubuntu 18.04.3 doesn't cause this issue. A newer version of that packages coming from sudo apt upgrade is the problematic one. Marking that package as 'hold' prevents it from being upgraded, and avoids the need to put the dis_ucode_ldr kernel parameter:

$ sudo apt-mark hold intel-microcode