cannot use wget command from a user I created

You have two unrelated problems.
"403 Forbidden" is a web server error. You have to fix your URL.
When you ran wget https://releases.mattermost.com/X.X.X/mattermost-X.X.X-linux-amd64.tar.gz, you got a 403: Forbidden error. This is an error from the web server and is unrelated to the user account used to download the file.
When you attempt to load a page or download a file and you specify an incorrect URL, a 404: Not Found errors is the most common result. But a 403 error can occur sometimes in this situation, and that appears to be what is happening here. It looks, from both the command you ran and wget's output, like you forgot to put the actual version numbers in the URL.
On my system, I am able to get exactly the same error using the URL with X.X.X instead of an actual version number:
ek@Io:~/Downloads$ wget https://releases.mattermost.com/X.X.X/mattermost-X.X.X-linux-amd64.tar.gz
--2017-01-17 03:15:30--  https://releases.mattermost.com/X.X.X/mattermost-X.X.X-linux-amd64.tar.gz
Resolving releases.mattermost.com (releases.mattermost.com)... 54.192.147.30, 54.192.147.18, 54.192.147.46, ...
Connecting to releases.mattermost.com (releases.mattermost.com)|54.192.147.30|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2017-01-17 03:15:32 ERROR 403: Forbidden.

And if I use the correct URL, it works:
ek@Io:~/Downloads$ wget https://releases.mattermost.com/3.6.0/mattermost-team-3.6.0-linux-amd64.tar.gz
--2017-01-17 03:09:50--  https://releases.mattermost.com/3.6.0/mattermost-team-3.6.0-linux-amd64.tar.gz
Resolving releases.mattermost.com (releases.mattermost.com)... 54.192.147.156, 54.192.147.30, 54.192.147.160, ...
Connecting to releases.mattermost.com (releases.mattermost.com)|54.192.147.156|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 27221349 (26M) [application/x-gzip]
Saving to: ‘mattermost-team-3.6.0-linux-amd64.tar.gz’

mattermost-team-3.6.0-linux- 100%[==============================================>]  25.96M   106KB/s    in 2m 6s

2017-01-17 03:11:58 (212 KB/s) - ‘mattermost-team-3.6.0-linux-amd64.tar.gz’ saved [27221349/27221349]

(Both the working and non-working URLs are from your post. I don't actually know exactly what file you need.)
The mattermost user isn't a sudoer.
Not all users may run programs as root (or at all) with the sudo command.  The file /etc/sudoers, or a file in /etc/sudoers.d, must be configured to allow them to do so. Most commonly, this is achieved by putting the user in a group that one of those files permits to run commands.
In particular, to make a user an administrator on an Ubuntu system so that they are permitted to run any command as root using sudo, add the user to the sudo group:
sudo usermod -aG sudo mattermost

Of course, you must run that as a user who can run commands as root with sudo already. (You were able to run sudo passwd mattermost, so I know you have at least one such user.)
Keep in mind:

You must only do this if you really want that user to have full power to do anything. They will have the same power as you. Once you've decided you want that, though, you should go ahead and simply add the user to the sudoers group. There is usually no need to actually edit any configuration files for sudo -- they're already set up to recognize the sudo group as conferring administrative power.
If for some reason you instead choose to edit /etc/sudoers or create/edit a file in /etc/sudoers.d, it is important that you use the visudo utility to do it, because it performs a syntax check to make sure your changes will be understood by sudo. If sudo sees incorrect syntax in a sudoers file, then it will completely refuse to work. For servers you only have remote access to, this can lock you out of the system.

Finally, it's very rare that you actually have to manually download a file with wget as root. In this case, you didn't -- the error was an incorrect URL and the "forbidden" message was from  the web server. Therefore:

If this is the only reason mattermost needed to use sudo, you probably shouldn't give that user account these abilities, because there's no need.
Even if mattermost really does need to be an administrator, they should perform actions as themselves (without sudo) rather than as root (with sudo) except when there is a clear reason to do the latter.


SSD Compatibility MacBook Pro 2010 (6,2)

According to the bug report linked to from the guide this appears to be fixable either by setting AHCI mode, or using EFI. I've only played with even older Macs, but back in those days I used rEFIt to set up an easy dual-boot; these days the working fork of rEFIt is rEFInd. In the bug report folks mention just using grub-efi, which is another option for you once Ubuntu is already installed, although something like rEFInd might make it easier to perform the installation in EFI mode in the first place, since it should be able to boot the USB or DVD you use for installation in EFI mode from the GUI boot menu.

The main caveat seems to be that the proprietary NVIDIA driver won't work if you boot via EFI. I don't know if that's still true, after all most of the comments in that bug report are from a few years ago, but you might find the default nouveau open-source driver will work just fine (honestly, in my experience it's often more stable, it just doesn't necessarily perform as well; chances are you aren't playing demanding 3D games on a 2010 Macbook anyways, however!).


How to upgrade my Aquarius E4.5 to latest OS?

Unfortunately I don't have enough reputation to make a comment, as this isn't a full answer, but here (elsewhere on askubuntu), you can see how to manually flash (and update) your phone (I have never actually done it myself, though).

You could also (first) trying playing around with when updates are supposed to be downloaded (always/only on wifi/never) which is also determined under Settings > Updates.


Setting up VPN connection: only pbk file (Windows) available

After some more trying and looking on the web, I managed to make the VPN connection by the following steps:

Add a VPN connection (click on network-indicator -> VPN connections -> Configure VPN ... -> Add). Here you choose "Point-to-Point Tunneling Protocol (PPTP)" (not Cisco compatible VPN)
Give the necessary data:

Gateway: this is the VPN address (PhoneNumber in the .pbk file)
User name and password

I had to follow this third step to get it work: Uncheck the checkbox "Available to all users" AND restart after unchecking the checkbox! (thanks to https://linux.ee.ethz.ch/VpnConnectNmGnome)

That's it, with these steps I got it working!


1080p choppy on two different GPUs, what else could it be?

Can you confirm if hardware assisted decoding is actually being used at all?

The output from mplayer and vlc (if run in a console) would help confirm or deny this if you could add it to your original question.

Try this in ~/.mplayer/config to turn it on:

vo=vdpau,xv
vc=ffh264vdpau,ffmpeg12vdpau,ffwmv3vdpau,ffvc1vdpau


You are not querying your local server for its HEAD response. The servers you are querying is your local filesystem, file:/, for your first argument and http.com for your 2nd argument. So no worries, your Apache is not identifying itself as Oversee Turing unless you have told it to do so. Since you give two paths, do you get two responses.

It exist a lot of ways to check headers, and since that is not the question will i not cover it.

For a in depth explanation:

First, when you are giving / as the path for HEAD is it considered a local absolute path pointing to your filesystem root and will be expanded to file:/.

Second, HTTP/1.0 is considered another absolute path. To understand how argument is interpreted, we have to take a closer look in the source beneath. But summed up is the  HEAD command pointing to a perl script. This perl script make use of uf_uri, a function from /usr/share/perl5/URI/Heuristic.pm to determine and return a full URI from a user friendly URI. That is done with running the function uf_uristr.

uf_uristr will match # no scheme specified at line 179 and will add schema to be http further will it expand the guess maps with the domain endings, on line 209+210 will it add .com. The different domain-endings will be tested in the for at line 215. The test will be done with gethostbyname("$guess.") and will set the $host to be the current $guess and exit the for loop if it gets a working result.

Then it will craft the URI it will return to the initial perl script on line 226;

$_ = "$scheme://$host$_";

$scheme = http
$host = http.com
$_ = /1.0

so the final $_ will be http://http.com/1.0

Source

$ ls -al /usr/bin/HEAD
lrwxrwxrwx 1 root root 11 Nov 23  2011 /usr/bin/HEAD -> lwp-request

$ file /usr/bin/lwp-request
/usr/bin/lwp-request: a /usr/bin/perl -w script, ASCII text executable

Notice uf_uri:

vim +196 /usr/bin/lwp-request +"sp +440 /usr/bin/lwp-request"

uf_uri calls uf_uristr in /usr/share/perl5/URI/Heuristic.pm that is a part of the liburi-perl package.


⚠ WARNING! PLEASE READ BEFORE RUNNING ANY COMMANDS! ⚠

  This answer is only provided for research and to further knowledge of Ubuntu Linux. Running any commands in this answer may very well destroy your system entirely. Make sure you're in a VM or a backup. I am not responsible if you break your system.

The command sh is provided by dash, by way of a symlink:

$ ll /bin/sh
lrwxrwxrwx 1 root root 4 Jun  1 08:33 /bin/sh -> dash*

$ which sh
/bin/sh

$ dpkg -S /bin/dash
dash: /bin/dash

$ dpkg -S /bin/sh
diversion by dash from: /bin/sh
diversion by dash to: /bin/sh.distrib
dash: /bin/sh

To remove it, run the below command:

sudo apt remove dash

APT will kick you back with the following error message:

You are about to do something potentially harmful.
To continue type in the phrase 'Yes, do as I say!'

If you are really willing to destroy your system, type that in and press Return.

Ubuntu will then uninstall bash, lightdm, and the ubuntu-desktop meta-package (as well as all packages that depend on those three), because they all have a dependency on dash. Unless your current shell works perfectly, your system will be unusable after you kill the last instance of bash or dash.

If you actually follow through with this command, the only way to restore the proper files is to boot into a Live CD and re-install the packages through a chrooted recovery session.

If you're really lucky, you might still be able to repair your system live by re-installing the packages, provided you still have a root shell open. Systems have recovered from worse before, but luck really needs to be on your side for that.

Instead, I would suggest you re-make the /bin/sh symlink to point to your shell. In that case, you can just restore back to dash if something goes really really wrong. Do this by running these commands:

sudo -s
cd /bin
rm sh
ln -s /path/to/your/shell sh
chmod 777 sh

Restore back to dash by repeating these steps, but specifying dash instead of your own shell. Or just run sudo apt install --reinstall dash. You might need to specify a custom init to do this.


Is there a way to switch users from the new lock screen?

I found a way which I will need to explain to my little kids who did not figure it out...  Click on the top right corner and you will see the list of users.

Honestly, I do not like it because it is not obvious and not user friendly. Before my 6 years old and my 9 years old could figure it out by herself, now I will need to explain it....


After installing Ubuntu my screen's frequency is out of range when I boot to Windows

I had the same problem. The solution is here, basically:

sudo nano /etc/default/grub

and change

#GRUB_GFXMODE=640x480

to something like

GRUB_GFXMODE=1024x768

That resolution might work. Finally:

sudo update-grub


No more booting after update systemd? on Ubuntu 18.04.3 | Failed to start Network Manager [URGENT]

Your issue most likely related to this Launchpad Bug #1843507.

The workaround is detailed in the comment #4 on the same thread (which has worked for many):

$ wget http://mirrors.kernel.org/ubuntu/pool/main/libi/libidn2/libidn2-0_2.0.4-1.1build2_amd64.deb
$ sudo dpkg -i libidn2-0_2.0.4-1.1build2_amd64.deb
$ sudo apt-mark hold libidn2-0

Also go through this comment #12, you might need to purge old package.

Edit: To bring the network interface up, go through this post, though I'm posting the solution here, as many people are having this issue today.

If you have an Ethernet cable connect the computer directly to the modem and then:

sudo nano /etc/network/interfaces

Note: Replace "eth0" with actual interface name like "enp0s3". You can find that out with command "ip a".

Append the following lines to the end of the file:

allow-hotplug eth0
iface eth0 inet dhcp

Ctrl+X to exit and Y to save. Then:

sudo ifdown eth0
sudo ifup eth0

You should get an internet connection. If you do not have a DHCP server use the following instead (if you don't know if you have a DHCP server, then you probably have one so nevermind the following):

iface eth0 inet static
address 192.168.1.5
netmask 255.255.255.0
gateway 192.168.1.254

Replacing the address, netmask and gateway values with the ones you are used to.


Can't extract and mount a gzip compressed partition image

Tar is for extracting tar balls :)

It is a gzipped image, but it does not have the familiar .gz suffix, commonly used for gzipped files. This is not a big deal; the data is there.

If you try to use gunzip directly, it will complain, as it does not use the default suffix. There's many ways to solve this:

Rename the file to ubuntu.image.gz (mv ubuntu.image ubuntu.image.gz) and uncompress it with gunzip ubuntu.image.gz.
Use zcat ubuntu.image > ubuntu_uncompress.image
Use gunzip -S .image ubuntu.image. This will yield a uncompressed file named ubuntu.

I'd stick with renaming the file. Also note that the unpacked file will be the same size as the partition originally was.

Once you have the uncompressed image, you can mount it with sudo mount -o loop ubuntu.image /mnt/


Can't copy .wav sounds from USB to SD card reader

The drive may be failing if it no longer works on Ubuntu and Windows, or maybe its in read-only mode? If it's stuck in read-only mode that might be a setting in software or the physical drive, or its dying.


Will i get update if I install a package by myself?

No the package will not be updated/you will not receive a notification when using the system package manager apt-get. Custom package installations are just that, custom, and for a reason, so apt doesn't meddle with both in order not to override configuration files, specific build flags or directory locations.

When you remove emacs using apt-get remove, ie. from the official repository, the package will no longer appear when running apt list installed, which are the list of packages read in the process of updating using the system package manager.

You may have a package dependency complain about the version of emacs at some point if you don't keep it up to date which would alert you to update emacs, but most likely you would get weird errors and have to figure out what is causing them.


This is happening because you followed the Debian Jessie instructions. You need to change the dropdown menu above the instructions to Ubuntu Trusty Tahr. :)

You first need to remove the Jessie entries from the depository. To do this enter the below command in Terminal:

sudo rm /etc/apt/sources.list.d/jessie-main.list

Next you need to update apt:

sudo apt-get update

Once you have done that, you will need to continue with the Ubuntu Trusty Tahir instructions.

Another way to remove the software sources is to open "Software Centre" using the below icon.

Within Software Centre click on the "Software and updates" link within the "Ubuntu Software menu" as per below image.

Within Software and Updates, click on the "Other Software" tab and make sure the 2 options that I've ticked in the below update are removed from your sources. If not, then remove them.

Once you have done that, close that window and it will update the repository.


The package jdk-13.0.2_linux-x64_bin.deb
installs to /usr/lib/jvm/jdk-13.0.2/bin/{java, javac, ....}, I.e. to use the oracle java, you will have to setup an "/etc/alternatives" link to a system PATH :

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-13.0.2/bin/java 2000
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-13.0.2/bin/javac 2000

And when that is done you can select the preferred java version (If more than one version is installed) :

sudo update-alternatives --config java
sudo update-alternatives --config javac


Ubuntu server 16.04.03 goes to sleep on esx

Do you try by adding acpi=off and apm=off to the GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub?

Then run sudo update-grub and reboot your server.


On HTTPS and Tomcat, GET requests work but not POST requests

Well if you need to run tomcat to use HTTPS thene you need keystore to be created and if you need to run the same in 443 port you need to configure ubuntu to allow tomcat using the privileged ports. Port numbers less that 1024 are privileged ports. So you need to do the follows steps. I am very unsure of how much you have done or achieved.Meanwhile I detail the following steps.

Tomcat7 on Privileged Ports (:80,443)
1) In server.xml, change the line

 <Server port="8005" shutdown="SHUTDOWN">
    <Connector port="80" maxHttpHeaderSize="8192" protocol="HTTP/1.1"
            maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
            enableLookups="false" redirectPort="443" acceptCount="100"
            connectionTimeout="20000" disableUploadTimeout="true"
            socketBuffer="18000"
            compression="on" URIEncoding="UTF-8"
            compressionMinSize="2048"
            noCompressionUserAgents="gozilla, traviata"
            compressableMimeType="application/javascript,text/html,text/xml,text/javascript,text/css,text/plain,application/json,text/json,a    pplication/xml"/>

<Connector port="443" maxHttpHeaderSize="8192" protocol="HTTP/1.1" SSLEnabled="true"
        scheme="https" secure="true"
        keystoreFile="/path/to/my.keystore" keystorePass="changeit"
        clientAuth="false" sslProtocol="TLS"
        maxThreads="350" minSpareThreads="25" maxSpareThreads="75"
        enableLookups="false" acceptCount="100"
        connectionTimeout="60000" disableUploadTimeout="true"
        bufferSize="4096"
        compression="on"
        compressionMinSize="2048" URIEncoding="UTF-8"
        noCompressionUserAgents="gozilla, traviata"
        compressableMimeType="application/javascript, text/html, text/xml,text/javascript, text/css,text/plain,     application/json,text/json,application/xml"/>

2) Install authbind

sudo apt-get install authbind

3) Make port 80 available to authbind (you need to be root):

sudo su
touch /etc/authbind/byport/80
chmod 500 /etc/authbind/byport/80
chown tomcat7 /etc/authbind/byport/80
touch /etc/authbind/byport/443
chmod 500 /etc/authbind/byport/443
chown tomcat7 /etc/authbind/byport/443

4) Make IPv4 the default (authbind does not currently support IPv6).
To do so, create the file $TOMCAT_HOME/bin/setenv.sh with the following
content:

CATALINA_OPTS="-Djava.net.preferIPv4Stack=true"
AUTHBIND=yes

5) Change /usr/share/tomcat7/bin/startup.sh last line to something as follows.

exec authbind --deep "$PRGDIR"/"$EXECUTABLE" start "$@"
# OLD: exec "$PRGDIR"/"$EXECUTABLE" start "$@"

Tomcat Keystore generation steps:

To generate SSL key, run the following command in the Terminal

  $JAVA_HOME/bin/keytool -genkey -alias Tomcat -keysize 2048 -keyalg RSA
  -validity 3650 -keystore /path/to/my.keystore

Provide the necessary information and set the password. The default password is “changeit”.

Grant execute permission to the my.keystore file

  chmod 777 /path/to/my.keystore

Thats it.

Note: I have posted connector tags of tomcat server.xml for a production environment. if you are running it in pre-production environment with low server config better avoid or reduce options inside the tags like max-min-Threads, lookups, timesouts etc at your ease.


How to remove the panel in the left side (the "starter")?

Open System Settings -> Appearance > Behavior tab and enable the Auto Hide.  This will hide the panel and reveal itself when the mouse hits that side of the screen.  The sensitivity of how hard the mouse has to hit for it to reveal is on the same screen and you can adjust that.

If you never want it to show, enabling auto hide, and turning the sensitivity all the way to low will give you the best results.  However it will still reveal if you hit the side hard enough.

You can install a package called Unity Tweak Tool from the software center, or by running sudo apt-get install unity-tweak-tool and the Launcher settings in that application provide a way to change the reveal location from the entire side, to the just the top corner.

That's about all you can do to stay away from it as much as possible, and doing the above will do a pretty good job.  However, that launcher is a pretty important part of the Unity desktop environment, and if you don't like it, perhaps another desktop environment will suit your workflow more; something like Gnome, XFCE, or KDE.


How do I get the ruby prompt with Ruby 1.8 package

I can only recommend removing the repository rubies and install it via RVM (Ruby Version Manager AFAIK). This will also allow you to have several versions installed, should you ever need that.

bash < <(curl -s https://rvm.beginrescueend.com/install/rvm)
echo "[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session." >> .bashrc

Then RVM should be installed. Close current terminal and reopen, in order to reload the bash profile. Ruby can now easily be installed by typing

rvm install 1.9.2  #Replace with whatever version you'd like (1.8.7, ree etc.)
rvm --default 1.9.2

This will also install rubygems, and the alias commands for you.

Since none of these commands should be sudo'ed, you will not experience permission problems with gems later on either :-)

Edit: To answer the last question, installing "ruby" from apt will install ruby1.8 too. It's even the same version, but with links fixed. You could just do a

sudo ln -s /usr/bin/ruby1.8 /usr/bin/ruby

to fix the links :-)


Is it safe to remove files/folders from .cache?

Yes you can delete all of .cache with no long term detrimental effects.

If your .cache is growing large, it might be better to look at the contents and try to determine what application is making it large and re-configure a bad acting application.

 In some case for application's custom configuration may cause problem.For the reason it is bad habit to delete things you do not understand in your home directory, back it up or use a test account.
 so have backup and then try

mv .cache .cache_backup


Run mysql queries in ubuntu 10.04 shell (cmd) stored in a files (desc order by filename)

If you wanted to run the scripts in ascending lexicographic order, you could do

for x in *.sql; do
  mysql <"$x"
done

Listing the files in descending order can be done easily in zsh , thanks to the O glob qualifier, but there is no corresponding feature in bash. At a zsh prompt:

for x in *.sql(On); do
  mysql <"$x"
done

By the way, if your numbers didn't have a leading 0, you could use (nOn) here, to sort 9 foo.sql before 10 bar.sql.

Using only programs that are in a default installation (plus mysql), you can list the files, sort them as desired with sort (or directly reverse the order with tac), and iterate over the result.

for x in *.sql; do echo "$x"; done |
tac |
while IFS= read -r script; do mysql <"$script"; done


PyPar2 pops up when i try to run eclipse. Please help

The problem is that the executable doesn't have the required permissions.

Simple resolution without using terminal - right-click the executable -> properties -> permissions tab. Check the checkbox that says "Allow executing file as program". Done!

Using terminal - navigate to your dir. Execute the following -
chmod 711 eclipse

Done!


If I did understand everything correctly, you are not able to boot any Linux installation media at all. This is due to the fact that you are having very new hardware - especially the latest available graphics processor EVGA GEFORCE GTX 1070 FOUNDERS EDITION - which is a slightly modified branded version of the NVIDIA GEFORCE GTX 1070 processor unit.

Those new graphics chips are known to have extreme compatibility issues with the open source nouveau drivers what prevents a Linux installation media or system from booting successfully. Also 3rd party installation media creation tools like Rufus, Unetbootin or WinUSB for example, are not creating the USB installation media properly in many cases.

As this is a Q&A site for Ubuntu, I provide you with the solution how to solve it for Ubuntu.
A tool to create a correctly working installation media is GNOME Disks and available in the repositories of nearly all Linux distributions ... in Ubuntu it is called gnome-disk-utility.

Open Disks - select Restore Disk Image from the menu on the top right.
Choose the ISO file and the USB drive to write it to, then start restoring.

Now boot from the created Ubuntu installation media, select Try Ubuntu without installing.
Press the E key and add the parameter nouveau.modeset=0 at the end of the linux line.
Press the F10 key and boot into the Ubuntu Live desktop - start the installation of Ubuntu.
Note : Set a Space between the last character in the linux line and nouveau.modeset=0.

Additional information : The way to create the USB media as described above is recommended ! When there's no chance for you to do it on a machine running a Linux system and you have to do it from within Windows ... you can create the installation media with the built-in diskpart tool.
On running Windows operating system open Command prompt as administrator and execute :

diskpart
list disk
select disk *
clean
create partition primary
active
format fs=fat32 quick
assign letter=**

Note : * = number of USB drive | ** = select a free drive letter
Now mount the ISO file and copy the content to the USB disk.


Try dragging the file/folder from nautilus to your desktop, but before you release the mouse button to drop the file/folder, press and hold Alt. Now release the button. A menu should pop up asking you if you want to move, copy, or link the file to your desktop.

Exact steps:

Navigate to file/folder in nautilus
Left click and drag, but don't release button
Press and hold Alt
Release mouse button
Release Alt


Transmission started to detect torrents bigger than they are

Are you sure the unit is the same? Maybe Transmissions is not using GiB units?

It happens, that 5.45 GB = 5.08 GiB <--- Note the "i".

The difference between GB (gigabytes) and GiB (gibibytes) is that GB are based on power of 10, and GiB are based on power of 2.

1 GB  = 1000 MB
1 GiB = 1024 MiB

and, subsequently

1 MB  = 1000 kB
1 MiB = 1024 kiB

GiB is not a SI unit, though SI standard recommends to use it for data size. There is a short article http://en.wikipedia.org/wiki/Gibibyte and there is a detailed explanation of this idea: http://en.wikipedia.org/wiki/Binary_prefix

Note that 5.45 GB = 5450000000 B = 5.08 GiB, so if Transmission uses GB instead of GiB, then everything is okay ;)


Sed substitute through a sentence on multiple lines

The following command will work in both situations:

sed '/Lorem.*/ {N; s/Lorem.*industry\./string to replace/g}' filename

More explanations: How can I use sed to replace a multi-line string?


Nvidia Digits isn't available in Ubuntu's default repositories. You can however add a PPA (see Are PPA's safe to add to my system and what are some “red flags” to watch out for?). The official installation instructions are:

  Prerequisites

  You need an NVIDIA driver (details and instructions).

  Run the following commands to get access to some package repositories:

  # Access to CUDA packages
CUDA_REPO_PKG=cuda-repo-ubuntu1404_7.5-18_amd64.deb
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/${CUDA_REPO_PKG} -O /tmp/${CUDA_REPO_PKG}
sudo dpkg -i /tmp/${CUDA_REPO_PKG}
rm -f /tmp/${CUDA_REPO_PKG}

# Access to Machine Learning packages
ML_REPO_PKG=nvidia-machine-learning-repo-ubuntu1404_4.0-2_amd64.deb
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1404/x86_64/${ML_REPO_PKG} -O /tmp/${ML_REPO_PKG}
sudo dpkg -i /tmp/${ML_REPO_PKG}
rm -f /tmp/${ML_REPO_PKG}

# Download new list of packages
sudo apt-get update

  Installation

  Now that you have access to all the packages you need, installation is simple.

sudo apt-get install digits

  Through package dependency chains, this installs digits, caffe-nv, torch7-nv, libcudnn and many more packages for you automatically.

The Apt source lines added by those two packages are:

deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/ /
deb http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1404/x86_64/ /


I have a misspelling in a repository source file, and it's lousing up my ability to download

Open a terminal and issue this command:

gksudo gedit /etc/apt/sources.list.d/yannubuntu-boot-repair-maverick.list

Then place a b in front of oot-repair to change it to boot-repair.
Press CTRL + S to save the file and exit.

You're done. Now you can do, update.


Keep getting autodeply.zip missing for ubuntu touch

First download the hardware specific one at here : http://cdimage.ubuntu.com/ubuntu-touch/daily-preinstalled/current/

Then install adb drivers with fastboot tool

adb reboot fastboot
fastboot flash recovery saucy-preinstalled-recovery-armel+grouper.img
fastboot flash boot saucy-preinstalled-boot-armhf+grouper.img
fastboot flash system saucy-preinstalled-system-armel+grouper.img

Then boot your phablet into recovery mode

adb reboot recovery

make a directory as

/sdcard/autodeploy.zip

Then send that downloaded zip into /sdcard/autodeploy.zip.

EX:adb push /path/to/your/downloaded/saucy-preinstalled-touch-armel+grouper.zip /sdcard/autodeploy.zip

again reboot into recovery mode

adb reboot recovery

and gain create the above autodeploy directory in the same way and then

adb push /path/to/your/downloaded/saucy-preinstalled-touch-armhf.zip /sdcard/autodeploy.zip

Then reboot the device

adb reboot recovery

To know more about your issue you must go through these steps.


How do I move window buttons to the right on Ubuntu 20?

Install GNOME Tweaks:

sudo apt install gnome-tweak-tool

Run the program, the setting for titlebar buttons placement is under Window Titlebars.

Note: You'll need to enable the universe repository if it's not enabled already:

sudo add-apt-repository universe


Open the "Disks" application

Unmount the USB drive (Click on the stop icon)
Click on the "gear" icon for menu and select "format.."
Format the USB drive as "FAT"


Personally I think Tilda is the best dropdown terminal.

I have tried a lot of them, including Yakuake, and I have to say that Tilda is the most customizable one, at least for my taste. At the github page there is information and screenshots regarding configuration options

Tilda exists in the repositories so you can give it a try fairly easily.


How to create launchers that open applications in a terminal?

Graphical method
To create launchers that lets you open applications in terminal, you can try alacarte.

First of all, you need to have alacarte  installed.              After installing it, open alacarte. On the right side, there would be an option to create a New item. Click on it.

When you click the button, a dialog box of title Create launcher would appear. For the option Type, choose Application in Terminal. Give appropriate name to the launcher item and the actual command to execute and so on. After that, click OK and that would save the launcher item.

Now, search for the launcher in the dash and then pin it to your launcher. Clicking on the launcher item would now open the application in terminal.

Note: There is a good chance that you might actually end up pinning the original launcher item which doesn't open in a terminal. So, good luck on pinning the correct launcher item.

Command-line method

sudo nano /usr/share/applications/minitube.desktop

Here /usr/share/applications/minitube.desktop is an example I used. You can use the exact path to the file that you want to edit.

Change the line Terminal=false to Terminal=true. If there is no such line, then add one: Terminal=true.

How to edit files in a terminal with nano?


How to control the up order of network interfaces?

you need to put script to up/down interface to your /etc/network/interface file

ubuntu is debian and this should helps you

Click here for Debian Networking Configuration

Bringing up an interface without an IP address

To create a network interface without an IP address at all use the manual method and use pre-up and post-down commands to bring the interface up and down.

   iface eth0 inet manual
      pre-up ifconfig $IFACE up
      post-down ifconfig $IFACE down


I had a similar problem when I first installed Ubuntu and the Nvidia proprietary drivers. I also got the black screen.

What fixed the black screen issue for me, was to enable "nomodeset" in GRUB bootloader.

When you have the black screen press Ctrl+Alt+F1 to get to TTY1
Log in with your username and password.
Run the following command: sudo nano /etc/default/grub
Find the like where quite splash is and add nomodeset in front of it.
Save the change with CTRL+o I think it is (check to be sure, it's written at the buttom of the screen)
Run sudo update-grub and let it find your installs.
Run sudo reboot to reboot the computer and check if it worked.

`


How are they different from the previous "The following ones are kept up-to-date on CRAN"?

The recommended packages are maintained by the R Core team.
On CRAN there is special versioned directory for these packages. E.g. for R 3.0.2 it is CRAN-mirror/src/contrib/3.2.0/Recommended/.

If you build R on your own, you can find a directory src/library/Recommended which is by default empty, but can be filled by using a helper script (tools/rsync-recommended).

  "they rely on the installed version of R".

"they" refers to littler and python-rpy.

E.g. rpy2 has the following requirements: Python 2.7, 3.3, or 3.4 and R 3.1+ (3.0 probably OK)


I don't know if I had the same exact bug as you, but I had something very similar. Thunderbird crashed (this is my 2nd day using it and I'm already 110% frustrated with it) and then wouldn't reopen.

/home/mhaase $ thunderbird

(process:11979): GLib-CRITICAL **: g_slice_set_config: assertion 'sys_page_size == 0' failed

On a hunch, I wondered if there was still somebackground process...

/home/mhaase $ ps aux | grep thunder
mhaase    2655  5.2  2.0 1720260 341164 ?      Sl   Jan26  45:39     /usr/lib/thunderbird/thunderbird
mhaase   12036  0.0  0.0  12164  2080 pts/8    S+   09:19   0:00 grep --color=auto thunder

After killing that process, Thunderbird starts normally.


How do I install the Intel HD Graphics driver for a Pentium P6200 CPU?

You already have the Intel graphics drivers; they're included and enabled by default.  Unlike nVidia and AMD, Intel does not provide a proprietary driver for their GPUs on Linux, so you get the possible performance in the default install.

As mentioned in the comments, Intel GPUs (particularly pre-Sandybridge) are not very powerful; your performance expectations may be higher than the hardware is able to deliver.


Autostart program whenever a file is added to a folder

There are a few solutions:

Option 1: without installing additional software:

You can use a minor script to keep an eye on the Downloads folder, like the watch command does, but make sure it only executes a command when a file is added to the directory. Copy the script below into an empty file, set the path to the folder to watch, and the command to run if a file is added to the directory. Save it as watch.py and make it executable for convenience reasons (so you won't have to use the language prefix). Add it to your startup applications:

- in Lubuntu:

Preferences > Default applications for LXSession, then choose "Autostart"

- or in Ubuntu:

System Settings > Keyboard > Shortcuts > Custom Shortcuts

The add the command to start the script on login:

/path/to/watch.py

The script:

#!/usr/bin/env python

import subprocess
import time

folder = "/path/to/folder/to/watch"
command_to_run = "command_to_run"

def get_drlist():
    return subprocess.check_output(["ls", folder]).decode('utf-8').strip().split("\n")

while True:
    drlist1 = get_drlist()
    time.sleep(2)
    drlist2 = get_drlist()
    if len(drlist2) > len(drlist1):
        subprocess.Popen(["/bin/bash", "-c", command_to_run])

Option 2: using inotify-tools:

inotify-tools is a tool you can use (a.o.) to watch a defined folder and take (defined) actions if a new file is added to the folder.

Install inotify-tools

sudo apt-get install inotify-tools

Paste the script below in an empty file, set the folder to watch ("/path/to/your/downloadfolder"), define the command it should run ("command-to-run-your-application") safe it as notifyscript.sh, make it executable for convenience reasons, and add it to your startup applications: (Preferences > Default applications for LXSession, then choose "Autostart". Add the command:

/path/to/notifyscript.sh

The script:

#!/bin/bash

while true
do
    fileName=$(inotifywait -r -e create /path/to/your/downloadfolder | sed -r 's/^.*CREATE(,ISDIR)*\s+(.*)$/\2/g')
    command-to-run-your-application
done

Note that in both cases your application will be called at the moment the file is created, but not yet fully downloaded. If the download is large, it can take some time.

EDIT

Additionally, if the newly added file has to be used as an argument for the command you run when the file is added, use the version below:

It uses the format:

<application> <file>

so the "usual". As an example, I left gedit, so the script will (try to) open the newly added file with gedit.

#!/usr/bin/env python

import subprocess
import time

folder = "/path/to/folder/to/watch"
application = "gedit"

def get_drlist():
    return subprocess.check_output(["ls", folder]).decode('utf-8').strip().split("\n")

while True:
    drlist1 = get_drlist()
    time.sleep(2)
    drlist2 = get_drlist()
    for file in [f for f in drlist2 if not f in drlist1]:
            command = application+" '"+folder+"/"+file+"'"
            subprocess.Popen(["/bin/bash", "-c", command])


What are the specifications of your computer? Usually, graphic type and drivers take a play on that. common with Nvidia graphics cards.

Do run lspci -k | grep -iEA3 '3d|vga' on terminal and add the output to your request.

Also if u have an external display connected, try disconnecting before opening lid or turning on.
You can equally check out these links for help


Networkmanager does not know that I am online, after resuming from hibernate

I’m not 100% convinced this is a 16.04 issue as this has recently resurfaced for me on 14.04.4. For me sudo nmcli nm sleep false wakes up network manager.

I know I’ve had this problem before as I had a script with the above command, but I can’t remember if I found a solution or it was just fixed somewhere along the way.


Why the wireless network is no longer listed?

You should update your Ubuntu install to a supported kernel with
sudo apt-get install linux-generic-lts-xenial
This will install the 4.4 kernel and it will support your wifi


how to enable netplan to auto-adjust to different network interface names in cloned instances

Got it working.   db429's suggestion to use match was the answer (I'd give you credit but as a new user I could not figure it out).
Here's the new netplan config I'm using now:
# generic ethernet adapter config, matches any interface names beginning with "en"
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      match:
        name: en*
      dhcp4: yes

Basically, at early boot, netplan reads this config, and generates a file in /run/systemd/network called 10-netplan-eth0.network
Note the eth0 in the file name which matches the block I provided in the netplan yaml config file.
The generated contents of 10-netplan-eth0.network are:
[Match]
Name=en*

[Network]
DHCP=ipv4
LinkLocalAddressing=ipv6

[DHCP]
RouteMetric=100
UseMTU=true

This generated network file is then used correctly to initialize any matching interfaces with dhcp.  This .network file can also be used directly by systemd-networkd and in fact netplan.io could be removed later (I tested that also, as systemd-networkd is enabled on my server).


Mount /usr in RAM (loading from HDD when starting, and saving to when shutting down)

This is possible, but pointless. The kernel keeps a cache of data from the disk in RAM. The data that you used most recently is kept in RAM. You will naturally end up with the parts of /usr that you use often in RAM, and the parts you don't use won't be taking up any RAM.

If you want better reaction time when you start an application, you can seed the cache. A file is loaded into memory the first time you use it, and remains there until the memory is reused for something else. You can force a file to be loaded:

cat /path/to/file >/dev/null

For example, to preload all executables and libraries into RAM:

cat /bin/* /lib/* /usr/bin/* /usr/lib/* >/dev/null

This can take a while to complete, so you should do it in the background. You can put the following command in /etc/rc.local:

ionice -c 3 cat /bin/* /lib/* /usr/bin/* /usr/lib/* >/dev/null &

To also load all libraries in subdirectories of /usr/lib* it could be useful to run find:

ionice -c 3 find /bin /usr/bin /usr/lib* -type f -exec ionice -c 3 cat '{}' ';' > /dev/null &


Some of those are Google owned IP addresses. I suspect its the google safe browsing service, which provides a list of known malware/phising URLs


After upgrade to 16.04 LTS rc.local is not executing a command

Ubuntu is now using systemd, and rc.local is now considered a service which is turned "off" by default. You can turn rc.local "on" by entering the following command and rebooting:

sudo systemctl enable rc-local.service


Android Studio standalone sdk manager doesn't start

Try installing Oracle Java

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer

Make sure you first remove Open JDK (if installed) to avoid conflict >>> Check java Version >>> Terminal >> java -version


What is the easiest way to install kernel 5.3 on Ubuntu 20.04 LTS

Just download and install the kernel binaries like so:

64-bit system:

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.3/linux-headers-5.3.0-050300_5.3.0-050300.201909152230_all.deb

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.3/linux-headers-5.3.0-050300-generic_5.3.0-050300.201909152230_amd64.deb

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.3/linux-image-unsigned-5.3.0-050300-generic_5.3.0-050300.201909152230_amd64.deb

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.3/linux-modules-5.3.0-050300-generic_5.3.0-050300.201909152230_amd64.deb

sudo dpkg -i *.deb

sudo reboot

32-bit system:

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.3/linux-headers-5.3.0-050300_5.3.0-050300.201909152230_all.deb

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.3/linux-headers-5.3.0-050300-generic_5.3.0-050300.201909152230_i386.deb

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.3/linux-image-5.3.0-050300-generic_5.3.0-050300.201909152230_i386.deb

wget -c https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.3/linux-modules-5.3.0-050300-generic_5.3.0-050300.201909152230_i386.deb

sudo dpkg -i *.deb

sudo reboot

Hope that was helpful


Catalina.sh not found, The file is absent or does not have execute permission

To see permissions do ls -l.

A file with execute permissions has x in the string at the front. Here's an executable script on my system:

-rwxr-xr-x 1 zanna zanna   7827 Jun 12 07:15 x205ta-iso2zip.sh

Here's one that isn't executable:

-rw-r--r-- 1 zanna zanna  24284 Jun 12 07:15 x205ta-iso2usb.sh

If catalina.sh does not have execute permissions then change the permissions:

chmod +x catalina.sh

Then try again.


How to watch videos in Amazon Prime Instant Video?

Ubuntu 13.10 does not have HAL in it's repos, so you might be able to get it at mjblenner's ppa. I have not tried to get Amazon Instant Video to run yet, but thought I would throw this out here anyway.

sudo add-apt-repository ppa:mjblenner/ppa-hal
sudo apt-get update
sudo apt-get install hal

Output:

The following extra packages will be installed:
  hal-info libhal-storage1 libhal1
The following NEW packages will be installed:
  hal hal-info libhal-storage1 libhal1

Simply close Firefox. Reopen it. And, you're done!

Another hal-related option (should purge previous, if installed, but I could not get repo below to work with 15.04 Vivid):

sudo add-apt-repository ppa:mjblenner/hal-flash ## Trusty & Utopic
sudo apt-get update
sudo apt-get install libhal1-flash

Another thing to try would be to install Firefox through PlayonLinux, including Silverlight and Adobe Flash. PlayonLinux seems to be up to 14.04 Trusty Tahr right now.(Aug2015)


If I reinstall mysql do I lose my databases?

No, reinstalling mysql-server will not delete you database files, only delete the package files of mysql-server. You will be able to access your files(database) after you re-install the server.
To purge and install mysql-server:
sudo apt-get purge mysql-server
sudo apt-get install mysql-server

If you want to delete the database too, you must delete it first before you remove mysql. To delete the database cleanly, on the mysql prompt type:
drop database <database_name>

I found another way to delete the database files, but I am not sure whether this is a clean way to delete the database, so take it with a pinch of salt:
From a question on stackoverflow:

It(The location of the database files) is installation specific, but if you've /var/lib/mysql , then:

MyISAM tables will be stored in individual files in /var/lib/mysql/databasename/
InnoDB resides in /var/lib/mysql/ibdata (unless you've used the innodb_per_table setting, in which case it's stored much like for MyISAM tables)

So check the location of your databases in these two locations and delete the directory of the databases(requires superuser privileges to read and delete).

See also: Similar question on Unix & Linux


How to make the VT display chinese characters?

I booted the 10.10 32-bit Ubuntu livecd, and chose what I'm pretty sure is simplified chinese (second to last option on the language menu). After it booted into the trial environment, I hit ctl-alt-f1, typed ls, and was rewarded with diamonds instead of chinese. I conclude Ubuntu does not include chinese support for console/tty. Otoh, everything works wonderfully inside Gnome.

Fortunately, you can add chinese tty support. Install fbiterm and run it on a tty. It's a frame buffer that can deal with non-latin characters. I don't know yet how to make fbiterm used by default.

@FUZxxl, running fbiterm on a fresh install of Ubuntu 10.10 in VirtualBox gives me your error Frame buffer device /dev/fb0: Open error. I found an UbuntuForum.org thread that suggests you need to load the kernel module that allows frame buffers. It's a bit old..here's what I did:

Edit /etc/initramfs-tools/modules. Add to the end of the file on separate lines: fbcon and vesafb.
Edit /etc/modprobe.d/blacklist-framebuffer and uncomment vesafb.
Run: sudo update-initramfs -u -k all.
Make sure you have a vga line set in /etc/default/grub. Example: GRUB_CMDLINE_LINUX_DEFAULT="vga=0x314"
Run update-grub.

Now you can reboot and run fbiterm at the virtual console.


How to create partition on single partitioned disk

You can't repartition a partition which is in use. So

1) backup your data (1);

2) repartition your disk with gparted starting the system with a LiveUSB or LiveDVD (there is a gparted LiveCD somewhere around).

(1) In theory the resizing of a modern ext4 partition should be safe and without data loss. But when doing such kind of highly potentially disruptive operations, a backup is fundamental.(2)

(2) well... I have daily backup even when I do almost nothing. YMMV...


Getting errors after setting up apt-mirror

I had the same issue, after some try and error I saw that I have 2 cron schedules for apt mirror.

1st which gave the error was in crontab of the user "apt-mirror" @1900h (time of mail) and a 2nd which did not gave any error in /etc/cron.d/apt-mirror @0400h.
After I disabled the 1900h job "crontab -u apt-mirror -e" the error was gone.

Hope this helps someone else.

Btw the syntax in the /etc/cron.d/apt-mirror file is little different than crontab file
the

/usr/bin/apt-mirror

is the apt-mirror script it self and the

apt-mirror

before the script is the username cron has to run the script as, an impersonationg thingy

  30 01 * * *  apt-mirror  /usr/bin/apt-mirror > /var/spool/apt-mirror/var/cron.log

    I think this is because its trying to use /usr/bin/apt-mirror as a config file


Have you set a separated boot partition?

it seems you have a disk full error, isn't it?

  cannot copy extracted data for './boot/vmlinuz-3.16.0-50-generic' to '/boot/vmlinuz-3.16.0-50-generic.dpkg-new': failed to write (No space left on device)
  No apport report written because the error message indicates a disk full error

have you tried?:
sudo apt-get autoremove

it will remove your old kernel images from /boot
I think it's the sollution


Boot Live CD into 'Try Ubuntu' by default

This is the simplified and revised version of this older answer.
To boot directly to Live session, look for /isolinux/isolinux.cfg in the content of the ISO image file and modify these two lines of code:

Replace the default vesamenu.c32 with default live

Comment the last line ui gfxboot bootlogo by inserting # at the beginning of line

Step 2 is required, otherwise the initial splash screen will still be visible until timeout. This is due to ui module will override the default setting, as explained on the Wiki (see "References").
Default configuration
# D-I config version 2.0
include menu.cfg
default vesamenu.c32
prompt 0
timeout 50
ui gfxboot bootlogo

Modified configuration
# D-I config version 2.0
include menu.cfg
default live
prompt 0
timeout 50
#ui gfxboot bootlogo

I have tested the modified configuration using Xubuntu 14.04 ISO image. The same steps are likely applicable to any Ubuntu and official flavours, regardless of the release.
References

How do I configure syslinux to boot immediately on Unix & Linux Stack Exchange

Config on Syslinux Wiki


How do I use the GTK+ development libraries in Ubuntu?

Advice
First of all, you don't have to settle for no IDE. Install Eclipse, it's available in the Ubuntu Software Centre. You also want to install CDT for Eclipse which gives you C/C++ support. Second I'd very much advise you to focus on C++ and Qt instead of C and GTK. Qt is a great cross-platform framework that uses C++ and QML (a JavaScript-like language for UI), and Ubuntu is moving more and more towards using Qt for their future desktop and mobile development. These tools will allow you not only to create beautiful applications for Ubuntu desktop but also for Android, Windows, Mac, BlackBerry and other OSes. An excellent Qt-specific IDE is QtCreator, also available in the Ubuntu Software Center, you should check it out along some Qt tutorials.
Answer
To answer you question directly, even though I strongly recommend doing what I outlined above, you likely need the -dev versions of the libraries you use. For GTK 3, you likely have to:
sudo apt-get install libgtk-3-dev

That should get you all GTK 3 headers.


Gradle is a build tool integrated in Android Studio: it downloads your project dependencies (the jar files you use in your code) from the maven repositories (maven is another well-known build tool with package dependencies capabilities and a remote ecosystem of repositories). One of the most used repository is jcenter().

Your gradle file lack of a repository configuration: add this piece of code to your gradle file (/home/jeevansai/AndroidStudioProjects/MyApplication/app/build.gradle): between apply plugin and android {...} section.

apply plugin: 'com.android.application'

repositories {
     jcenter()
}

android {
     compileSdkVersion 21
...

Alternatively, if you does not code the unit tests at the moment, you can simple comment out the junit dependency on the app/build.gradle file:

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    //testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.android.support:design:23.0.1'
}

Anyhow, you can always download the needed artifact from maven central and put in your /libs directory:

wget 'http://central.maven.org/maven2/junit/junit/4.12/junit-4.12.jar' -O /home/jeevansai/AndroidStudioProjects/MyApplication/app/libs/junit-4.12.jar


Maybe during the installation the Grub wasn't properly installed. Maybe if you use the flash drive again and try to install the Ubuntu, it will tell if it's installed or not. If it is, maybe you can try to reinstall it.


Troubleshooting of updation during installation of ns2 in ubuntu

Muru is right. These old repositories simply do not exist anymore and therefore your apt-get returns the 404 Not found error. You can remove these lines from your repository list, but this will not get you any updates either. Move over to 14.10 (9 months supported) or 14.04 LTS (5 years supported) or wait for 15.04 (released April 2015, also 9 months). Next LTS with 5 years support comes out in April 2016 (Version 16.04)


Constant freezes when downloading torrent to NTFS partition

Torrent's temporary files are still on your / partition (maybe /tmp, not sure). Check the options in your torrent client to change that temporary directory.
If that doesn't work, maybe you have a bug with your NTFS driver and you could try to reinstall ntfs-3g package:

Unmount your NTFS partition.

Use this command:
sudo apt-get install --reinstall ntfs-3g

You can also check your /etc/fstab to see if your NTFS partition is correctly mounted (or use the GNOME GUI program gnome-disks).


Open a terminal and run the following command...

gksudo gedit /etc/hosts

This will open the file in gedit with root privileges allowing you to make your changes.


How to install Ubuntu onto Acer Aspire V5-122P Laptop

You have to boot Your laptop from USB. You should have Boot menu on F12 but if not look this instruction http://acer.custhelp.com/app/answers/detail/a_id/3182/~/why-cant-i-get-the-f12-boot-menu-to-work-on-my-notebook-or-netbook%3F
When You get Boot menu choose Your usb. You can install Linux next to Windows or You can format whole disk for Linux. Read instruction carefully.

When You install Linux, probably You lost access to partition recovery!


Is there any "Everything Search" like searching software in Ubuntu 14.04?

I think there is one such app now. FSearch.

It is still in beta, but has a lot of features that is similar to everything search under windows.


can't download steam, need help with 403 error code

Yeah, the link on their page is broken for me as well. Try opening a terminal (press Ctrl+Alt+T) and running sudo apt-get install steam.


Ubuntu SDK. error: "Kit autocreation for error is not supported"

I have seen this problem and for me cleaning up the QtCreator's local config solved the problem:

  $ rm ~/.config/QtProject/qtcreator -r


Help identify confusing way Maven is running with no M2_HOME?

First, it is not MAVEN_HOME but like it is written into the title M2_HOME... The following assertion is true : the mvn command is in your path... The mvn command will function correctly if you were assigned a home directory...

In the home dir, you will find a directory .m2. In $HOME/.m2 you will find the maven repository and the file settins.xml.
You don't need a M2_HOME (tested) but you need a JAVA_HOME...


extract substring (filename) with bash/grep/awk/etc

Assuming the arguments are always in the same order:

grep -oP '(?<=-i ).*?(?= -filter_complex)'

Explanation:

-o - Print only the matching part of the line
-P - Use Perl extensions
(?<=-i ) - Lookbehind for -i
.*? - Match zero or more characters, non-greedily
(?= -filter_complex) - Lookahead for -filter_complex


crontab: run a command and kill its looped output after 2 min?

I'm not experienced in using cron, but you can also just write a little Bash script that runs in background infinitely, like this:

#!/bin/bash
while true ; do         # starts an infinite loop
    YOUR_COMMAND &      # runs YOUR_COMMAND in background
    your_pid=$!         # remembers the PID of YOUR_COMMAND
    sleep 2m            # pauses the script for 2 minutes
    kill $your_pid      # kills YOUR_COMMAND by its previously remembered PID
    sleep 48m           # pauses the script for the remaining 48 minutes
done                    # defines the end of the loop


According to xdebug manual:

xdebug.remote_enable Type: boolean, Default value: 0
This switch
controls whether Xdebug should try to contact a debug client which is
listening on the host and port as set with the settings
xdebug.remote_host and xdebug.remote_port. If a connection can not be
established the script will just continue as if this setting was 0.

I order to setup remote debugging, you should change your /etc/php5/apache2/conf.d/20-xdebug.ini and add this line:
  zend_extension=/path/to/your/xdebug.so
  xdebug.remote_enable = 1

You should setup xdebug.remote_port and xdebug.remote_host too.
Read this link for more information on Remote Debugging


I finally was able to solve this issue, thanks to a post on the /r/pop_os subreddit, I found the following issue that was logged with Valve: https://github.com/ValveSoftware/csgo-osx-linux/issues/2551
Based on this, it is a bug in the currently deployed version of mutter in the Ubuntu repository. The issue is found here: https://gitlab.gnome.org/GNOME/mutter/-/issues/1486
I downgraded the libmutter-7-0 and gir1.2-mutter-7 packages to the previous version via apt install libmutter-7-0=3.38.1-1ubuntu1 gir1.2-mutter-7=3.38.1-1ubuntu1
Games are now displaying in fullscreen as expected. I'll await the fixed mutter packages in the repo before upgrading again.


Is it possible to have multiple files with the same name in a folder?

No, it is not.

This is not a problem in Nautilus but the underlying filesystem which doesn't support having multiple files in the same folder.

I advise you to rename your files instead (letter_31-12-2014.pdf, etc.)


18.04 Install on Dell Power Edge 2950, LAN card not detected

I believe your Dell PC probably use Dual embedded Broadcom® NetXtreme II™ 5708 Gigabit2 Ethernet NIC.   As far as I can tell you can get a linux driver at this link:

https://www.dell.com/support/home/dk/da/dkbsdt1/drivers/driversdetails?driverid=29d9g

This is based on some googling and not from personal experience.


eee pc 701- if I create a dvd to install ubuntu will it auto reformat the hdd

The DVD will need to be formatted (to make it bootable and write the Live system) but the hard drive you want to install Ubuntu on will not be formatted until you ask it to. You wont need to format the whole drive, anything more you want to know?


According to a video by gotbletu, youtube-viewer - Watch, Read and Post Youtube Comments - Linux CLI, the youtube-viewer application can do what you want. You may add the Webupd8.org ppa using sudo add-apt-repository ppa:nilarimogard/webupd8 and then install the youtube-viewer package for your version of Ubuntu.

The earlier video by gotbletu on YouTube Viewer is Youtube-Viewer -- Search and Play Youtube Video - Linux CLI and a detailed review from 2015 is here.

I followed the instructions and installed youtube-viewer and its dependencies on Lubuntu 19.04.

I ran youtube-viewer --comments 'https://www.youtube.com/watch?v=iVzGZo5kS8c' to look at the comments for that video.

At the same time, I also viewed the video in Firefox 69:

youtube-viewer seems to default to displaying comments chronologically, newest first. So I sorted the comments in Firefox the same way.
youtube-viewer seems to only display comments but not their replies as can be seen by comparing the highlighted areas in the images. So if one is interested in viewing replies as well, then a full-fledged browser maybe needed.


Ubuntu 14.10 cant find printer option Windows Printer via SAMBA

Just install the samba client:

sudo apt-get install smbclient


systemd User= setting: how to apply selectively?

You've got the right syntax, but the wrong systemd version. You are reading the docs for the current version of system, but running an older version. The +ExecXYZ syntax was introduced in systemd version 231.

The workaround is for your "service" to run as root and then have your scripts that need to run as postgres include bash wrappers that first su to PostgreSQL.

But why are you writing your own postgresql systemd file instead of using one already written?


In 14.10 MAAS now handles the importing of boot images. You know longer need to run that script. On the new "Images" page you can start the import process.

You can also do this from the command line. Once you have logged in using the command line. [Documentation for logging over the command line is here].1

maas  boot-resources import

You can then monitor the progress of importing with.

maas  boot-resources read


From my experience burning disks via Disk Utility, sometimes it can simply mess up on the burning process. You should figure out firstly whether it's a problem with Disk Utility or just the disk. Your best bet is to try burning a second disk and see what happens when you boot.

Also, instead of booting from the CD via the C button, try holding down the option key instead to see a menu of bootable devices to select the disk from there.


GTK theme broken on move to Ubuntu 14.04

I've now found a way to correct this.  It's brute force but it works.  I changed the name of the "themes" folder under /usr/shared to "themes_".  The result is that all pre-installed themes are hidden from the system and our GTK theme again works.


Update

Old answer is incorrect and it fails after system upgrade. No need to install infinality-ultimate. Do the following instead:

$ sudo add-apt-repository ppa:no1wantdthisname/ppa
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install fontconfig-infinality

$ sudo bash /etc/fonts/infinality/infctl.sh setstyle
# set to win7

$ sudo gedit /etc/profile.d/infinality-settings.sh
# set USE_STYLE to WINDOWS7

These are the instructions already given on github.com/achaphiv/ppa-fonts/blob/master/ppa/README.md which I missed.

--Old Answer--

Since posting the question I found a solution myself, though I am not clear why it worked. Here it is:

Used a fresh install without Infinality install
Add PPAs

$ sudo add-apt-repository ppa:no1wantdthisname/ppa
$ sudo add-apt-repository ppa:rjvbertin/infinaltimate
$ sudo apt-get update

$ sudo apt-get install fontconfig-infinality
Use

$ sudo bash /etc/fonts/infinality/infctl.sh setstyle

and set style to Windows 7. Logout and Log back in.
Now install bohoomil's infinality-ultimate patches. I installed almost all packages to be sure

$ sudo apt-get install fontconfig
$ sudo apt-get install fontconfig-config
$ sudo apt-get install fontconfig-infinality-fonttweaks
$ sudo apt-get install libfontconfig1
$ sudo apt-get install libfontconfig1-dev

$ sudo apt-get install libfreetype6
$ sudo apt-get install libfreetype6-dev

Logout and log back in. Install unit-tweak-tool for easy font settings. This is the final result.
Antialiasing: RGBA, Hinting: Full and Font: Consolas 12


Need help installing Vulkan drivers on Ubuntu 18.04

just try this:
sudo apt install nvidia-settings vulkan-utils


How to get my disappeared network connection to work again?

I found an old thread:

Last upgrade crashes network manager (no internet connection, no applet)

After downgrading libnl I could restart the network manager.

Later, Ubuntu obviously suggested upgrading again libnl but also other packages. I did it and everything works.


Suddenly having extremely slow wifi on Ubuntu 18.04 (RTL8821CE)

It's been sometime ago (and I thought this was patched) but is your Android linked to the same WLAN?

I recall that there has been issues like this in times past when an Android OS was on the same WLAN at the same time, and your description reminded me of my own experience with it.


can ping other machines but other machines can not ping me

Assuming you can access your machine through other ways. Ubuntu has ping switched off sometimes, try and switch it back on using this:

In Ubuntu ping can be enabled by adding following line to your /etc/init.d/networking script.

echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all

This adds to ability to be pinged using ICMP calls. Check out what your current settings are by using cat on /proc/sys/net/ipv4/icmp_echo_ignore_all


"Syntax error: "(" unexpected invoke-rc.d:" when installing the i8kutils package

It seems that the problem must be solved by loading the i8k.ko module at start-up.


Editing Nautilus to add split screen (F3) feature in Ubuntu 14.04 LTS

Patching nautilus
The F3 functionality was removed via this bugzilla report.
The bugzilla report contains the patch used to actually remove the functionality.

https://bug676858.bugzilla-attachments.gnome.org/attachment.cgi?id=215023

As you can see from the stats - it was a sizable patch crossing many source files

19 files changed, 916 insertions(+), 1847 deletions

Thus, to reinstate this, you'll need to reverse engineer this.  What makes this more difficult, is that the code base of nautilus has changed considerably between Nautilus from Gnome 3.2 when F3 was available to todays Gnome 3.10/3.12 code base.
Thus its not going to be an easy, "take this diff and insert into the source file".  You'll likely to have to manually match up the various functions and manually edit the source.

Hints:
To build nautilus is relatively straightforward:
apt-get source nautilus
sudo apt-get build-dep nautilus

Make your changes. Compile via either running the autogen in the top-tree level or seeing if a debuild -us -uc method works if you've patched the source files in the debian/patches folder.
More information here how to build.

https://wiki.gnome.org/Apps/Nautilus/Development/Nautilus

If this seems like hardwork - it is.  Good luck.  I'm sure you'll have a grateful community if you manage to hack it.
If you like an easier life, this Q&A gives alternative methods and alternative file-managers that has this capability.

Is there a way to restore Nautilus' split screen (F3) feature?


Live CD: Running chkrootkit (OR rkhunter)

sudo apt install chkrootkit rkhunter
like you would with any other distribution. It just isn't installed permanently and is lost once you quit the live OS.


How do I get a transparent page/screen in Firefox?

You can do it with using  compiz. Install the compizconfig settings manager
by following command in terminal.

  sudo apt-get install compizconfig-settings-manager

Go to accessibility enable "opacity,brightness and saturation". Click on this icon. Click on the new button at "Windows specific settings". Click on the + button and enter "Firefox" in the value field. Press add... Use slide to influence transparency. 100=no transparancy - 0=100% transparency.
Now you can see the background through firefox.


Your Firefox profile cannot be loaded. It may be missing or inaccessible

Usually I fix this by restoring correct rights on corresponding catalogs with:

sudo chown $USER: -R ~/.cache/mozilla/ ~/.mozilla/firefox/


Try changing the permissions to /opt then making sure that A and all of its contents are owned by you.

sudo chmod 775 /opt
sudo chown -R $USER:$USER /opt/A


Are there any issues with backing up Ubuntu running on an internal SSD drive to an internal HDD?

No, there shouldn't be any adversary consequences of backing up to an additional hard drive (except increased energy consumption, wear, and decreased performance during backup of course).

Unless you do something fancy (like some proprietary backup solutions), you'll be able to treat your backup drive as a regular storage medium with a common file system. If done right you'll even be able to boot directly from the backup medium.


After typing your application name, switch to the "action" by hitting tab and type "launch again".

To make it the permanent default for this application, select "Make 'Launch Again' Default for..." from the kupfer menu in the top-right corner.


How to make a permanent configuration to eth1

You can do that by configuring the /etc/network/interfaces file in Ubuntu.

Open /etc/network/interfaces file in an editor and the add these following lines

auto eth1
iface eth1 inet static
   hwaddress ether A2:BB:CC:DD:5:15
   address 10.5.15.200
   netmask 255.255.255.128
   gateway 10.5.15.129

Here's a tutorial that can help you http://www.howtogeek.com/howto/ubuntu/change-your-network-card-mac-address-on-ubuntu/

You can check this out for more details
http://manpages.ubuntu.com/manpages/lucid/man5/interfaces.5.html

Here's a post that has lots of examples if you need a more advanced configuration
http://www.cyberciti.biz/faq/setting-up-an-network-interfaces-file/


You'll be prompted during Ubuntu install to choose the drive to install Grub (it's the dropdown at the bottom of the 'something else' page). It doesn't matter which drive you put Grub on, as long as your BIOS boots the drive with Grub on it. Personally, I would put Grub on the new SSD.


DRM is Direct Rendering Manager - a method of directly rendering composited images in hardware without going through the entire X graphics stack.

KMS is kernel mode switching - a kernel technology that allows DRM and DRI (direct rendering infrastructure).

The idea is that instead of the cumbersome and over-complicated X technology that currently runs graphics in linux, there will be more direct hardware based methods of producing graphical output.

Wayland and Ubuntu's Mir are new technologies that implement DRM and DRI to replace the X stack.

Here's a link to Mir with a diagram - https://wiki.ubuntu.com/Mir/Spec


For WSL you'll want to use the correct syntax:
sudo service ssh status

This will give you what you're looking for:
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/lib/systemd/system/ssh.service; enabled; vendor preset: enabled)
     Active: active (running) since Sat 2021-05-22 19:54:00 JST; 3h 25min ago
       Docs: man:sshd(8)
             man:sshd_config(5)
    Process: 2129 ExecStartPre=/usr/sbin/sshd -t (code=exited, status=0/SUCCESS)
   Main PID: 2137 (sshd)
      Tasks: 1 (limit: 9127)
     Memory: 1.8M
     CGroup: /system.slice/ssh.service
             └─2137 sshd: /usr/sbin/sshd -D [listener] 0 of 10-100 startups

 5月 22 19:54:00 Carbon systemd[1]: Starting OpenBSD Secure Shell server...
 5月 22 19:54:00 Carbon sshd[2137]: Server listening on 0.0.0.0 port 22.
 5月 22 19:54:00 Carbon sshd[2137]: Server listening on :: port 22.
 5月 22 19:54:00 Carbon systemd[1]: Started OpenBSD Secure Shell server.


aklog: a pioctl failed while setting tokens (18.04 LTS; afs daemon appears to be running)

It turns out I needed to

Use PPA to get the latest version of openafs.
Explicitly (re)install openafs-client and other libraries.

I found a blog post that said to do the former, but in my case apt-get update wasn't sufficient to get things working for me.

sudo add-apt-repository ppa:openafs/stable
apt-get install openafs-client openafs-krb5 openafs-modules-dkms

I rebooted after this, but it might have sufficed to just restart the service.


Intel 3160 AC wifi - no WPA connection in Ubuntu 16.04.1

No solution, but at least a workaround:

It is sufficient to open the network settings and then edit the connection. If you have tried to connect once the wifi network will show up as a recently used network. If you then edit the wifi network, you can enter the password in the "security" tab, and voilà it works.

So it looks like the problem is that the password isn't saved in the settings upon first connection try.


Virtualbox Ubuntu issues running programs in secure shell

When you log into a remote machine and run programs using X forwarding (well, same is true of text programs, but much less bandwidth) it is running the program (the X client) (client/server terms are reversed for X than what you normally think of) on the remote machine, so it is using its CPU,memory, etc.; however, the display (the X server) is on your local machine, so it's streaming all the X display updates across the Internet to your machine.  Now if you think VNC is slow over the Internet...it's fast compared to raw X.  Using ssh compression may help, or it may make things worse, depending on just how slow your Internet connection is.   X just wasn't designed for low-speed high-latency connections, so while it's really cool and handy to be able to do it, performance over anything but a high-speed LAN sucks pond water.

The only way seriously improve performance is going to be to use VNC or FreeNX or something instead of raw X.  If you don't have the ability to install VNC,etc. directly on the machine at work, perhaps you can use another machine up there (even a dedicated VM) to host the VNC server; then you can use that machine to do the X-over-SSH connection where it's on a faster network, and you can VNC to that machine instead of the one you really want.


When piping input from one program to another, what happens to the original program if the program receiving output is killed?

It greatly depends on what program1 is. The software needs to be able to handle (or ignore) a SIGPIPE signal. program1 will be responsible for handling the error - if the software is open source you should be able to discern what happens or if it traps/detects a SIGPIPE signal. If the software doesn't do anything special with streams it will likely complete execution before passing on the results. I attempted a small example to show the point using two php scripts.

program1

#!/usr/bin/env php
<?php

@unlink('program1.out');

for( $i = 0; $i < 10; $i++ )
{
    // This goes to either the buffer or whoever is next in the pipe
    echo $i . PHP_EOL;
    // Put everything in a file so we can see what Program1 actually did
    file_put_contents('program1.out', $i . PHP_EOL, FILE_APPEND);
}

// All done! Cap off the file
file_put_contents('program1.out', 'Fin', FILE_APPEND);

program2

#!/usr/bin/env php
<?php

// We're taking inputs and just redirecting them to program2.out
// but to make it fun I'll throw an error half way through
// because I'm malicious like that

@unlink('program2.out');

$pipe_input = file("php://stdin");
$pipe_total = count($pipe_input);
$stop = rand(0, $pipe_total - 1);

echo "I'll be stopping at $stop" . PHP_EOL;

foreach( $pipe_input as $key => $input )
{
    if( $key == $stop )
    {
        file_put_contents('program2.out', 'Dead!', FILE_APPEND);
        die(1);
    }

    file_put_contents('program2.out', $input, FILE_APPEND);
}

When you execute ./program1 | ./program2 you'll get two .out files one for each program. In the example I ran I got the following files:

0
1
2
3
4
5
6
7
8
9
Fin

And for program2.out

0
1
2
3
4
Dead!

The first program will execute and pass it's contents to the second. You'll notice that the first program's .out file has a full set of numbers and the second only contains a set of that because it was killed off.


Launcher icons on desktop or in the main panel

Are you able to right-click your desktop at all? Are there icons? Two things to try:

gnome-tweak-tool

This app might also show up as Advanced Settings if you have it installed already. Otherwise:

sudo apt-get install gnome-tweak-tool

Run it and go to Desktop. Check Have file manager handle the desktop to the ON position.

dconf-editor

Install dconf-tools, which includes this tool:

sudo apt-get install dconf-tools

Run it and navigate to this position:

org > gnome > desktop > background

Check show-desktop-icons to on.


NetworkManager static routes not applied

nmcli connection up
Thanks to thallers answer it works. That was missing. Didn't know that I had to do this. I just changed the entries in nmtui.


It may just be an internal error.

sudo apt-get purge network-manager
sudo apt-get update
sudo apt-get autoremove
sudo apt-get upgrade
sudo apt-get install network-manager
sudo apt install ubuntu-desktop

Do that then reboot.


I had a similar issue and found this StackOverflow question that seems to have fixed the issue for others:

https://stackoverflow.com/questions/19126603/android-source-repo-gpg-public-key-not-found

I didn't read it correctly the first time, and the thing I did wrong was to download the repo file to ~/bin/repo. What I had to do was type which repo, and then copy the newly downloaded file over this one (in my case this was /usr/bin/repo). So my steps were:

curl http://commondatastorage.googleapis.com/git-repo-downloads/repo >
~/bin/repo
chmod a+x ~/bin/repo
which repo
sudo mv /usr/bin/repo /usr/bin/repo2
sudo mv ~/bin/repo /usr/bin/repo

This has enabled me to progress further.


Remember what files are opened in a session of gedit

There's also a Session Saver plugin to save and restore working sessions.


How do you install Google Chrome on Ubuntu 16.04?

This worked for me
 (all other methods suggested got me very lost):

Download the package (64 bit):

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

Install the package, forcing install of dependencies:

sudo dpkg -i --force-depends google-chrome-stable_current_amd64.deb

In case any dependencies didn't install (you would have a warning or failure message for this), you can force them via:

sudo apt-get install -f

Note: Refer to the link above for 32 bit systems.


Concatenate multiple files without header

Using awk in a single folder

awk 'NR==1 {header=$_} FNR==1 && NR!=1 { $_ ~ $header getline; } {print}' *.dat > out

find and awk  if you need all files in the current folder and in the subfolders. You can replace . with your desired folder.

find . -type f -name "*.dat" -print0 | \
    xargs -0 awk 'NR==1 {header=$_} FNR==1 && NR!=1 { $_ ~ $header getline; } {print}' > out

or, as getline is bad (thx @fedorqui)

find . -type f -name "*.dat" -exec awk 'NR==1 || FNR!=1' {} + ;

Example

% cat foo1.dat
a   b   c
1   2   3

% cat foo2.dat
a   b   c
4   5   6

% awk 'NR==1 {header=$_} FNR==1 && NR!=1 { $_ ~ $header getline; } {print}' *.dat > out

% cat out
a   b   c
1   2   3
4   5   6


corrupted "/etc/ld.so.conf" file, how can I fix it?

I think this is what you are looking for

chick@dad:~$ cat /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf


How to configure system wide proxy with user authentication

I eventually solved this issue by using cntlm, according to the instructions in:

How to solve "407 Proxy Authentication Required" error in Ubuntu ?

Install cntlm (for example do sudo apt-get install cntlm) then edit the /etc/cntlm.conf file to contain:

Username   YOUR_USERNAME_HERE
Domain     YOUR_ORGANIZATION_DOMAIN
Password   YOUR_PASSWORD
Proxy      YOUR_PROXY_SERVER_IP_WITH_PORT
NoProxy    LIST_ALL_IP_WITH_NO_PROXY_REQUIREMENT
Listen     SOME_PORT

For example:

Username   rafa
Domain     awesomeplace
Password   Xtra$trongp4ssw3rD
Proxy      10.18.200.203:8080
Proxy      10.18.200.204:8080
NoProxy    localhost, 127.0.0.*, 10.*
Listen     8080

Still would like to know how it could be done without cntlm...


How can I tell if port 465 is open for outbound traffic?

Outgoing ports are always open on EC2. It might be a different error, try setting mail.debug to true and run the program. Logs generated will be very helpful in determining the root cause.


How do you create a program launcher with administrative privileges using Alacarte?

Use

gksudo -u root <program_name>

or

gksudo -k -u root <program_name>

to run <program_name> as the root user.

See the manpage for the gksudo command  for more information.


I tried removing Ubuntu and now I can't boot into windows

See my answer to this:

How to boot USB from GNU GRUB 2.02~beta2-9ubuntu1?

It applies the same way except you want to be looking for your Windows partition (assuming you didn't accidentally wipe it).  Once back in Windows, you will need to change it so the bootloader won't kick into the GRUB menu every time you turn on your computer.  You should be able to find that with some google-ing.


Evolution data migration (on update) missed all but the first "accounts" (mail, addressbook, calendar...)

The above PHP got me started.  But I had problems with junk in the cards.

I am a Python guy, so I wrote a new program in Python.  I used Python 2.x to run this.

This uses a Python dictionary to keep track of email addresses already seen from address cards, and it only stores a given address once.  This solved another problem I had, of duplicate card records.

I think the binary junk between the cards was used by Evolution to figure out which cards were valid.  This program just uses a couple of rules of thumb: if a card has garbage binary characters in it, or isn't properly terminated, or doesn't have an email address in it, it's a bad card and goes in the "bad" output file.

After you are done converting, you can check the "bad" output file and see if there is anything in there that isn't in the .vcf output file.  In my case, there wasn't; this program got all the good cards for me.

#!/usr/bin/python

import re
import sys

def bad_chars():
    for n in range(0, 32):
        if n not in (9, 10, 13):
            yield chr(n)
    for n in range(128, 256):
        yield chr(n)

def has_bad(s):
    return any(ch in s for ch in bad_chars())

def get_email(card):
    lst = card.split('\n')
    for line in lst:
        if "EMAIL" in line:
            _, _, email = line.partition(':')
            return email.strip()
    else:
        return ''

if len(sys.argv) != 4:
    print("Usage: cvt.py <input_old_address_book> <output.vcf> <bad.txt>")
    sys.exit(1)

with open(sys.argv[1], "rb") as in_f:
    s = in_f.read()

s_start = "BEGIN:VCARD"
s_end = "END:VCARD"

cards = {}
lst_bad = []

while s:
    i_start = s.find(s_start)
    if i_start == -1:
        break

    i_next = s.find(s_start, i_start + len(s_start))
    if i_next == -1:
        i_next = len(s) - 1

    i_end = s.find(s_end, i_start + len(s_start))
    if i_end == -1:
        i_end = len(s) - 1
    else:
        i_end += len(s_end)

    if i_next < i_end:
        i_end = i_next

    card = s[i_start:i_end+1].strip()
    s = s[i_end:]

    card = card.replace('\r', '')
    card = card.replace('\0', '')
    if not card:
        continue

    key = get_email(card)
    if has_bad(card) or s_end not in card or not key:
        lst_bad.append(card)
        continue

    if key not in cards or len(card) > len(cards[key]):
        cards[key] = card

with open(sys.argv[2], "w") as out_f:
    for key in sorted(cards.keys()):
        out_f.write(cards[key] + "\n\n")

with open(sys.argv[3], "w") as bad_f:
    for s in lst_bad:
        bad_f.write(s + "\n\n")


After logging in (or just before), press Ctrl-Alt-F1. Then enter your login and password and run

sudo stop gdm

This will enable the CLI.

The second way is holding Shift during the boot and choosing Recovery Mode. Then you should select Drop to root shell with networking.


It doesn't work like that. You need to write sudo dpkg -i before the file path. So write that in a terminal and then drag and drop the skype package.


Preserving multi-column output from ls when paging

There are two options

   -C     list entries by columns
   -x     list entries by lines instead of by columns

the first shows the output in columns, where each column comes after the preceding (from the sorting point of view):

enzotib@acer:tmp$ touch {10..99}
enzotib@acer:tmp$ ls -C | less
10  15  20  25  30  35  40  45  50  55  60  65  70  75  80  85  90  95
11  16  21  26  31  36  41  46  51  56  61  66  71  76  81  86  91  96
12  17  22  27  32  37  42  47  52  57  62  67  72  77  82  87  92  97
13  18  23  28  33  38  43  48  53  58  63  68  73  78  83  88  93  98
14  19  24  29  34  39  44  49  54  59  64  69  74  79  84  89  94  99

The second option puts the first elements on the first row, then on the second row and so on:

enzotib@acer:tmp$ ls -x | less
10  11  12  13  14  15  16  17  18  19  20  21  22  23  24  25  26  27  28  29
30  31  32  33  34  35  36  37  38  39  40  41  42  43  44  45  46  47  48  49
50  51  52  53  54  55  56  57  58  59  60  61  62  63  64  65  66  67  68  69
70  71  72  73  74  75  76  77  78  79  80  81  82  83  84  85  86  87  88  89
90  91  92  93  94  95  96  97  98  99

When piping to a pager, the terminal width and the color formatting are not taken into account from ls. To force this you can do

ls -Cw $COLUMNS --color | less -r

where -r option to less is needed to correctly interpret ANSI color sequences.
Putting this line into a script do not work, because COLUMNS is not exported to subshells. Two work-around can be used

export COLUMNS in your ~/.bashrc
implement that line as a function or an alias in ~/.bashrc

myls() {
    ls -Cw $COLUMNS --color "$@" | less -r
}


So the issue was the internal WiFi. I cannot tell you if the issue was a driver or the 7+ year old internal card, but a cheapo USB dongle fixed the issue.

If someone is looking for a cheap and easy test, try this one out.

Also, please comment on other good Linux Wifi dongles!!!


There are several things that might cause this. either the command was not run as root user or you use a virtual server were a remount of the / filesystem is not allowed.

Your case seems to be the second (You are using a virtual server were a remount of the / filesystem is not allowed)

You can replace this command with a reboot.

Source: https://www.howtoforge.com/community/threads/ispconfig-installation-mount-o-remount-question.64840/


Installing LyX 2.3.5.2 on Ubuntu 20.04 LTS

You need to install QT4 as it is dependency of lyx. QT4 is not available in official Ubuntu 20.04 repository.
You can install it via Rock Core Team PPA.
sudo add-apt-repository ppa:rock-core/qt4
sudo apt-get update
sudo apt install qtwebkit


Only one user can connect to Ubuntu samba server

It turns out that in order to enable samba sharing for a user when using "security = user", the user has to log into the box at least once. I don't know what environmental variables get setup the first time they log in, but once I logged into the box it worked fine.


On my machine, I run Settings and then select 'Users'.  The 'automatic login' option is found there.


So far ksuperkey looks the only solution.
The documentation says it is not necessary for plasma 5.8 but actually make the trick.

By default I have Control + F12 assigned to show desktop action so I  just need to:

Remove the association ALT F1 in the application launcher widget ( other wise super will also open this )
run in a terminal ksuperkey -e 'Super_L=Control_L|F12'

If it works you can add this to the startup application


How do I create a PPA for a working program?

That's a very wide question. I'll try to answer as much as I can, but it definitely WON'T be a step-by-step instruction. This is because there is no step-by-step algorithm for creating a package. The way you'll do it depends on many factors, mostly on the type of package (application, library), the structure of source, and many details.

Luckily, there is a thorough guide at http://packaging.ubuntu.com

I'll try to help you a bit with understanding the whole process, so when you'll be a bit more familiar with it. The Packaging Guide includes resources for additional help.

First of all you should realize that creating a package (a .deb file) is a separate process from creating a PPA. Creating a PPA is a matter of going to your Launchpad's profile and clicking "Create a new PPA" link. That's all. It's created, it works, but it's empty. To upload a package you must first create one. But let me first answer some of your minor questions.

The programing language DOES NOT matter at all. It can be a C++ application, Bash script, Brainfuck Hello World, a single README file, or a set of cool photos. Packages may contain any file. During installation the package gets extracted to the root ("/") of your filesystem. This way they can put some files in the binaries folder, add some wallpapers to the GNOME default set, or provide user with a Bash script.
You DO need to add something to the source. It must be a top-level directory named "debian". There will be some files with the package details - they will be used to define what type the package is, etc.
Dependencies are listed in one of this files (amongst other details). Where to get them from? They are simply other packages that your application uses. The developer of the application WILL know what libraries and resources his program requires, so he shouldn't have much trouble with listing them.

Some tools used to build a package (pbuilder) can fill in the dependencies automatically, probably by determining what your app requires during compilation.

It is also highly recommended to use AutoTools. That's other thing you may need to add, but probably almost every piece of software uses them already. AutoTools is a set of extremely helpful programs - automake, autoconf and autoscan to name a few. When you compile&install a program with the famous ./configure && make && make install then the autotools are used to automatically deal with the source, to prepare other resources included with the source to installation, and to extract the result of the compilation to appropriate place (to answer your question: The build will extract to MANY separate places. The binaries will go to /usr/local/bin, the docs to /usr/local/share/docs etc. Moreover, a binaries from a package will go to even different places, f.e. the binaries to /usr/bin. How to deal with this complicated directories layout? Use AutoTools - it will care about it automatically, and that's why they are so useful).

Building a .deb package may look as a really complicated process, but it's not that difficult. I highly recommend you the official Ubuntu guide to creating packages: http://packaging.ubuntu.com

It's HUGE, but you'll see you can probably skip most parts of that text (depending on what package you are going to build). Basically, packaging process consists of these parts (all are clearly explained in The Guide):

Init some tools used to build packages.
Get the source
Create the ./debian directory and fill it with required data
Build the package with debuild [That should create a set of files, including *.dsc, *_source.build, *_source.changes, which are responsible for the data about the package, and how to deal with it (you will also have a source .tar.gz)]
Test whether everything works by running pbuilder locally (it will take all these files mentioned above and try to combine them into a .deb package, by automatically building the source with the help of AutoTools - that's why they are crucial for packaging [frankly speaking - not - you can get along without them or with some alternatives, but that's the very easiest approach, and other may require some advanced setup, as you'll need to instruct the builder how to build the source (using ./debian/rules file) - but that's not for beginners]) - if you just want to get a .deb package, it's done.

Now you'll have to upload it to your PPA, which is explained on this help page: https://help.launchpad.net/Packaging/PPA/Uploading

Use dput to upload these files to Launchpad
Launchpad will run pbuilder on their computers, and generate packages in a clean environment
Finally, the packages should appear in the PPA.

As you see creating a PPA is not that straightforward. But don't be frightened, it's also not that difficult. Moreover, I recommend you not to encourage developers to use a PPA, as probably they won't listen to you, since they would need to do some additional job (and if they wanted to they would have done it already), but you may want to try to support Ubuntu developers and the whole community and provide them with packages you've prepared :)

I wish you good luck with creating packages, hope you'll find my answer helpful :)

Your friend,
Rafał Cieślak


Those are pre-compiled files. There's nothing more to install, looking at the README. You run them. First, make the file executable:

$ chmod +x msmc_linux_64bit

Then run it:

$ ./msmc_linux_64bit
Usage: msmc [options] <datafiles>
  Options:
    -i, --maxIterations=<size_t> : number of EM-iterations [default=20]
    -o, --outFilePrefix=<string> : file prefix to use for all output files
    -r, --rhoOverMu=<double>: ratio of recombination rate over mutation rate. Default=0.25.
    -t, --nrThreads=<size_t> : nr of threads to use (defaults to nr of CPUs)
    -p, --timeSegmentPattern=<string> : pattern of fixed time segments [default=10*1+15*2]
    -P, --subpopLabels=<string> comma-separated subpopulation labels (assume one single population by default, with
          number of haplotypes inferred from first input file). For cross-population analysis with 4 haplotypes, 2
          coming from each subpopulation, set this to 0,0,1,1
    -R, --fixedRecombination : keep recombination rate fixed [recommended, but not set by default]
    -I, --indices: indices (comma-separated) of alleles in the data file to run over
    -s, --skipAmbiguous: skip sites with ambiguous phasing. Recommended for gene flow analysis
    -h, --help: show this message


I think I understand what you're asking, but as you said, it's a bit extensive, so I'm not sure how to best answer you.

There's a pretty good beginner's guide over on MakeUseOf that I wish I had found when I first got started with Ubuntu: http://www.makeuseof.com/tag/ubuntu-an-absolute-beginners-guide/

Again, not sure if it's exactly what you're looking for, but HowStuffWorks has a pretty extensive explanation of what Ubuntu is and isn't: http://computer.howstuffworks.com/ubuntu1.htm

In my personal experience, I've learned a lot about Ubuntu since I first started using it, but I just learned as I went. It's a lot easier to learn as you go than it is to learn the entire workings of Ubuntu in one shot.


I think you just have to restart your computer. Then you'll be able to right-click and select to keep the icon on the Launcher.


Is it possible for emacs to appear on right side of the desktop area when invoking it from the command line?

It's quite straightforward to do this (even though it should be on the right side by default): all you need to do is to experiment with the --geometry option when launching a file. Apart from specifying the size of the emacs window, you can specify offsets to determine window position. It is well explained at the official site:

  In the ‘--geometry’ option, {+-} means either a plus sign or a minus sign. A plus sign before xoffset means it is the distance from the left side of the screen; a minus sign means it counts from the right side. A plus sign before yoffset means it is the distance from the top of the screen, and a minus sign there indicates the distance from the bottom.

So, if we want to launch emacs top-right, we run:

emacs file.txt --geometry '-3+3'

Other options such as bottom-left would be '+3-3', etc.

You could just put the above line in your .bashrc as an alias if you want it to launch it like this everytime:

alias emacs='emacs --geometry '-3+3''

After adding the alias, you have to run . .bashrc to source your .bashrc or restart the terminal for it to take effect.

(At any point you can launch emacs with command emacs to run it as normal and the alias will be ignored.)


I have a windows app which requires .NET 3.5. Can wine handle .NET 3.5?

A lot of the more complicated areas of wine can be simplified using winetricks, vineyard and playonlinux. you might find these a helpful starting point.

Also, when it comes to wine: if you don't know if something will work there's normally someone who's had a go before you. you can check the appdb at http://appdb.winehq.org

Apparently the .net 3.5 framework is a tad hit and miss:

http://appdb.winehq.org/objectManager.php?sClass=version&iId=10166

But it appears you can get some functionality using winetricks:

winetricks dotnet30
wine ./dotnet35setup.exe

Hope this gets you on your way.


How to add output from a command to a group name in a script?

Since all that you are trying to do is to get the output of the first command into the second command, you can do it with running a command substitution $() of the first command into the second command.  To combine these together put the first command into the second command where you want the output to be so that you don't have the need of assigning the output of the first command into a variable then putting into the second command.

First command:

head -$1 /folder/file | grep $2 | cut -d ',' -f4

That you know returns what you want.  In your second command you know that you want the output of the first command in a specific location like where the $1 is located in the second command.

Second command:

echo "$1:x:50$int" >> /etc/group

Since $1 is what you want to replace in the second command, you would then replace the $1 with the command substitution and command of the first one like this:

echo "$(head -$1 /folder/file | grep $2 | cut -d ',' -f4):x:50$int" >> /etc/group

Hope this helps!


Solved my problem. My pc is under a network w/ proxy authentication, and my configs were blocking access through http://localhost. It's working fine if I access through http://[my_IP_address], so all I did was configure my pc network settings properly with the help of our network admin.

Thanks anyway :)


How do I lock a package in the Software Centre?

The Software Center is an application manager, not a package manager, and as such does not provide advanced functionality like version locking. Unfortunately, your question is analogous to asking how to perform differential calculus in a children's math game.

If you do want this functionality, you should install the Synaptic Package Manager  and follow the instructions from this question.


Thanks to cor-el on support.mozilla.com

To disable hardware acceleration.

Edit > Preferences > Advanced > General > Browsing: "Use hardware acceleration when available"

So the issue is hardware acceleration.  And it only happens to my ATI card.  My other computer running nVidia is working just fine with Firefox 6.

I tried to upgrade the driver to ATI 11.8, but I am not sure if it worked, and i am too tired to find out.  Anyway, this at most is a workaround.  There is some kind of bug either in the ATI driver or the way firefox hardware acceleration handles ATI drivers.