How do i open videos with VLC with just double-clicking?

The easiest way would be to right click on the file, choose "Open with other Application", and then choose VLC from the list provided:

If the application you want to use is not in the "Recommended Applications" list, click on "View All Applications" and then you should see "VLC media player" so long as it is installed on your system. This works on a per-file-type basis, much like it does in other operating systems.
Another option would be to set VLC as default for video in the "Default Applications" section of the Settings application:

Here you can set the applications that you would like for specific mime groups. This will override any file-specific rules you may currently have in place, though.
Hope this gives you what you need.


Using the dd command on external hard drive with partitions

It would destroy the partition table, since that's stored at the beginning of the drive.
It would destroy as much drive contents as the size of the image itself. If it is large enough to reach into the second or third partitions then it will destroy those.
MEMDISK will allow you to leave it as an image and boot it directly.


thinkpad t440p annoying static noise when I plug the speakers realtek ALC292 HDA Intel PCH 13.10

Partial Fixed follow this:
http://xps13-9333.appspot.com/#background_noise

with

    mkdir -p /usr/local/bin
    wget -O /usr/local/bin/white_noise_fix.py http://xps13-9333.appspot.com/root/usr/local/bin/white_noise_fix.py
    chmod 744 /usr/local/bin/white_noise_fix.py

changed the script on /etc/init.d/xps this line:

kernel_version=$(uname -r | cut -c3-4)

to

kernel_version=$(uname -r | cut -c3)


I want to create a virtual machine for study mysql

You can install VirtualBox on your host system (download)
And download an Ubuntu server iso (download)
Then, create virtual disk on VirtualBox and install system with downloaded server iso file.
Open your settings of virtual Ubuntu server, then set network as bridged to get all of them in your local network (link)
Go to $HOME/VirtualBox VMs directory and multiply several copies of your virtual server machine's directory with different names.

Now you have several virtual servers in same local network


My system has a special image and standard images won't work?

Your laptop is actually certified to work with Ubuntu, so you shouldn't have any problems installing it. You can follow the standard installation instructions.


xubuntu internet thing says it is connected to internet but everything else says its not

How is your network set up?

It would have been usefull to know your settings like output of 'ip add', 'ip route' and contents of the file '/etc/network/interfaces'.

If you use NetworkManager, it will tell the other programs what the status of your internet are. But if you uses '/etc/network/interfaces' to set up your connections, NetworkManager will not manage those interfaces mentioned there. And NetworkManager will not tell those other programs that there are a internet connection.

If that is your problem, either comment out the connections in interfaces file or remove the packages with NetworkManager.


Ubuntu gnome 16.04 xenial xerus - Changing Automatic Brightness Response Time

have you tried wildguppy? see http://www.webupd8.org/2014/01/wildguppy-adjusts-your-laptops.html. it has features you are looking for (sample response time etc)


How do I install and uninstall kubuntu desktop environment?

Open a terminal (CTRL+ALT+T).
To install Kubuntu desktop use the following command:

sudo apt-get install kubuntu-desktop

To remove Kubuntu desktop use the following commands in a terminal:

sudo apt-get purge kubuntu-desktop
sudo apt-get autoremove

Note: You can replace Kubuntu for any other Desktop Environment.


Installing programs from Ubuntu Software Center on Ubuntu 16

Canonical decided to pull the plug on the Ubuntu Software Center in version 16.04. The Ubuntu Software Center has now been replaced by the Gnome Software Center. You can still install software there just like when Ubuntu still had USC.

I hope you find what you are looking for. Good luck.


Trying to install Ubuntu 14.04 but getting the message "not a bootable disc"

I have the .iso image on the USB drive - do I need to unzip the files for them to be recognised?

What method did you use to write the ISO to USB? (I'm just guessing here, but if you simply copied the ISO file to the USB, it won't work.)

Please try to write it using UNetbootin on Windows.

Download and run Unetbootin
In the Diskimage section, select your ISO file and your USB drive.
Click on OK and wait for it to finish.


The cron.hourly file remove_old_tmux_resurrect_saves is running as user root (hence ~ refers to home directory of root) and you are searching for files in the home directory of user admin.

Replace ~ with the absolute path to the home directory of user admin.

Alternately, you can open user admin's crontab by running crontab -e as user admin and put an entry there.

Also note that parsing ls is not a good idea at all and whatever you are doing can be done with other tools easily and you don't even need a script.


How do I make a Icecast live stream play at accurate time?

I'd recommend to read through these two answers to gain a better understanding of what is at play here:

https://stackoverflow.com/a/36929851/2648865

https://stackoverflow.com/a/17151097/2648865

You can reduce latency somewhat, but it will require control of as much of the whole chain as possible. It also will come at the expense of stream reliability.

It would certainly help if you would explain what you are trying to achieve with this on a higher level, as it might even be that Icecast is unsuitable for what you want.


Open the terminal application and enter

sudo update-grub

This probes for other existing OSes and writes a new grub configuration; since you deleted the windows partition, it shouldn't be in the menu anymore on the next boot.

You can also disable the Grub Os Prober if you like. Just add GRUB_DISABLE_OS_PROBER=true to /etc/default/grub and run sudo update-grub again.

To disable the display of the menu:

Edit /etc/default/grub with elevated rights

and set GRUB_TIMEOUT=0

Run sudo update-grub again.


Thaw must be "resume" from hibernation. Literally it is resume from disk.


Intel Wireless AC3165 is disabled under Ubuntu 16.04 LTS Live CD

Look here: http://ubuntuforums.org/showthread.php?t=2306536

It worked on my HP Pavilion x360.


LibreOffice Impress slide background image?

First You have to create a second "background"- in german version it is called "Masterfolie"- the english version calls it "master". You can find it in Version 6 under "view" -"master".

After that You can set an master slide. Best would be to set the new slide for all slides, and just to set the special master slide for the first slide. After selecting the Slides in the slide pane on the left, You can find the master slider settings on the right side. See this picture: Image

I know, this is from Openoffice, but it works on Libreoffice also


Uninstalling a Windows program using ubuntu

As far as I know, once your boot manager is corrupt, there is no way to revert it without a backup. Windows Repair might help, but since this is not a generic problem it might not work. Even if you could uninstall the program via Ubuntu, which you can, manually, I don't think it will fix your bootmgr error.

You can take a look here too. It may solve your issues.


There is a specific Nautilus/Files setting on that.


Why won't my OCE c360 print on upgrade to 14.04

Instead of using the Konica PPD, use the Generic - PDF option. When choosing the options, instead of using PCL5e, choose PDF and most if not all of the regular options for duplex, color, page size are all available and work well.
It only took me 4 years to find it.


How to prevent PPA to upgrade all packages instead of desired one

If more than one version of same package is available, in this case you can install specific version of package using sudo apt-get install packagename=version

To find the available version of shotwell use

 apt-cache policy shotwell

On my Ubuntu 12.04 it was

Installed: (none)
  Candidate: 0.14.1-1~precise1
  Version table:
     0.14.1-1~precise1 0
        500 http://ppa.launchpad.net/yorba/ppa/ubuntu/ precise/main i386 Packages
     0.12.3-0ubuntu0.1 0
        500 http://in.archive.ubuntu.com/ubuntu/ precise-updates/main i386 Packages
     0.12.2-0ubuntu2 0
        500 http://in.archive.ubuntu.com/ubuntu/ precise/main i386 Packages

So I tried

 sudo apt-get install shotwell=0.12.3-0ubuntu0.1

But it gave me error for  libgexiv2-1 package.
So I applied apt-cache policy  libgexiv2-1 to find conflict and found it is also available in the PPA.

So to install shotwell from Ubuntu repo I used following  command

  sudo apt-get install shotwell=0.12.3-0ubuntu0.1 libgexiv2-1=0.4.1-1build1

It installed  shotwell successfully from the Official Ubuntu repo.

shotwell --version
Shotwell 0.12.3

EDIT

Pinning  a Package

As you specified you want to receive  upgrade only for Geary, not for other packages from this PPA. For this you can use Pinning.

Create a pinning config file using

gksudo gedit /etc/apt/preferences.d/ubuntu-geary-pin-400

with following contents.

Package: *
Pin: release o=LP-PPA-yorba
Pin-Priority: 400

Package: *geary*
Pin: release o=LP-PPA-yorba
Pin-Priority: 500

(Here it is first assigning priority of 400 to every packages in yorba ppa and     then after it is assigning 500 priority(which is normal priority) to geary package.)
Save it.

Now you will receive upgrade from this ppa only for geary


“signal out of range” when starting grub after server installation

Boot from the live cd and open a terminal.  Assuming your root is on /dev/sda1, then do this:

sudo -s
mount -t ext4 /dev/sda1 /mnt
gedit /mnt/etc/default/grub
for f in sys proc dev ; do mount --bind /$f /mnt/$f ; done
chroot /mnt
update-grub

When the editor comes up, uncomment ( remove the '#' ) this line and save and exit:

#GRUB_TERMINAL=console

After the update-grub, reboot and you should be good.


Internet worked during install, but not after

In a terminal do this:

sudo sh -c "cat > /etc/network/interfaces"

Now copy the following text:

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

Press Ctrl + D. Now restart your system and it should be back to normal.


I'm sure there is a proper, clean way to do this by changing the default location of the Downloads directory. The proper, clean way to do this is given by Mook765 below. I suggest you use that.

A simple approach would be to just make $HOME/Downloads into a symlink pointing to wherever you want to keep it. For example, if you want it to point to $HOME/foo, you could do:

mv ~/Downloads ~/foo  ## rename the existing dir
ln -s ~/foo ~/Downloads ## create the link

Now, when you click on the Downloads bookmark, it will actually be going to $HOME/foo.


To force the created files to belong to a specific group use the paramteter force group.

In your case:

[timesheets]
  comment = Samba Share for Timesheets
  ...
  force group = timesheetmgmt
  ...

In addition, to enforce security, you can add a force create mode or force directory mode to set minimal levels.


sudo update-alternatives --list <group>
sudo update-alternatives --remove <group> <app>

where  is the application you removed but still listed in , and  is the alternative name you want to change.


Displaylink driver installation fails on Ubuntu 18.04

Installation is successful ... finally.
In case someone ran into the same issue; here is what I have done.
Not sure how did I fix it exactly, but I tried different approaches:

To install the drivers using this installer:
https://github.com/AdnanHodzic/displaylink-debian

I run the script displaylink-debian.sh and also the script evdi.sh which ended up with the same result, but it installed some more libs that might helped.

To remove evdi version which is already running

I first stopped gdm3

sudo service gdm3 stop

Then I ran the uninstall command again plus several other command using modprobe

sudo ./displaylink-installer.sh uninstall

modprobe -r evdi
modprobe -r evdi-1.6.0

After a reboot; installation went though (with the first command in the question) and the display was detected but was black; another reboot fixed the black screen.


USB stick read only when should be read/write

If it's a MicroSD card and you are using it with an adapter just check and make sure if the lock is not on . If the lock is on then disable it by sliding the switch to the upside(it may be in the different direction depending upon your adapter).


Touchpad doesn't work on Fujitsu Lifebook UH552

Ok, guys, I made it. Just like Danatela said, everything is connected. I had troubles with my newly installed Ubuntu because of incorrect instalation, so I reinstalled the OS and added GRUB_CMDLINE_LINUX="i8042.notimeout i8042.nomux" to the /etc/default/grub.

And it works!


Unity interface issues with AMD Radeon 6450

I am using ATI HD4870 and while I was using Ubuntu 11.04, I also had your issue. But installing the official driver from AMD site:

here

is the link to the 64bit driver of your card. Make sure you have Ubuntu 11.04 64bit, otherwise download the 32bit version.
Read the release note there for useful info. After download run the following command in the terminal, from your download location:

 sudo sh ./ati-driver-installer-x86.x86_64.run

Follow the instruction and you should be fine.
I recommend you keep the driver on your disk, because every kernel update, or when you see that the shell does not start up properly after a reboot, you need to reboot into low graphics and re-run the above command.

You can also force the driver to be installed:

sudo sh ./ati-driverinstaller-x86.x86_64.run --force

For uninstall:

sudo aticonfig --uninstall

Hope it helps


When I try to start lampp the terminal says that it only works on 32bit

LAMP is a software bundle for Linux that includes Apache, MYSQL, and PHP.

To install LAMP you need to do the following:

install apache:

sudo apt-get install apache2

Optional: Testing Lamp:
http://localhost/ in your browser

install and restart Apache:

sudo apt-get install php5 libapache2-mod-php5
sudo /etc/init.d/apache2 restart

Test PHP if you like:

In the terminal copy/paste the following line:

sudo gedit /var/www/testphp.php

This will open up a file called phptest.php.

Step 2. Copy/Paste this line into the phptest file:

<?php phpinfo(); ?>

Step 3. Save and close the file.

Step 4. Now open you're web browser and type the following into the web address:

http://localhost/testphp.php

Install MYSQL:

sudo apt-get install mysql-server

gksudo gedit /etc/mysql/my.cnf

Change the line
bind-address = 127.0.0.1 to your local IP. This will enable other computers on your network to see this computer, this step is optional.

This is where things may start to get tricky. Begin by typing the following into Terminal:

mysql -u root

Set root password

mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('yourpassword');

(Make sure to change yourpassword to a password of your choice.)

Install phpMyAdmin which is an easy tool to edit your databases. Copy/paste the following line into Terminal:

sudo apt-get install libapache2-mod-auth-mysql php5-mysql phpmyadmin

Make PHP play nice with each other:

gksudo gedit /etc/php5/apache2/php.ini

Now we are going to have to uncomment the following line by taking out the semicolon (;).

Change this line:

;extension=mysql.so

To look like this:

extension=mysql.so

Restart Apache one last time

sudo /etc/init.d/apache2 restart


Darktable 3 does not have print option (Ubuntu 18.04 Snap install)

The snap version appears to be missing some features, such as opencl support and printing. Try to remove the snap install and reinstall with sudo apt from the terminal.

3.0 version of darktable should be available from universe for 20.04, for older versions of Ubuntu, to install the latest 3.0 version add this ppa repository:

sudo add-apt-repository ppa:ubuntuhandbook1/darktable

Install Darktable:

sudo apt update
sudo apt install darktable


network applications throwing "Servname not supported for ai_socktype"

This can occur when, due to misconfiguration, an unprivileged user does not have read access to /etc/services. Check with:
ls -l /etc/services

It should look like -rw-r--r-- 1 root root ...
The file should be installed from the Priority: important package netbase and have exactly these permissions. If not, fix it with:
sudo chown root:root /etc/services
sudo chmod 644 /etc/services

Nothing about the files contents is confidential or expected to change often. The file lists IANA-registered or common protocol port number associations for TCP, UDP, DCCP, and SCTP.


Looking for code editor software with following functionalities

Vim, or Vi IMproved, provides all of the features you've mentioned (and more) at a relatively low performance hit.

I highly recommend the program vimtutor to get you started. It always comes with Vim, and you can run it from a terminal.

I've used Vim for about a year now, and it's saved me loads of time.

There's a wiki, too.

After you pick up on the basics, it's faster than most editors out there.


Ubuntu 18.04 does not shutdown or suspend | event loop failed: Connection timed out

Both the shutdown and suspend issues were due to a recent kernel update. I reinstalled Ubuntu and both the issues were fixed.

But the wake-up issue was still there so I replaced Ubuntu with elementary OS. It didn't help: the wake-up issue was there as well. To fix wake-up issue, I installed the latest version of the kernel (5.4.6) on elementary OS and both the shutdown and suspend issues appeared again. So I had to downgrade the kernel version to remove them.

Now, I have installed kernel 4.19.79 (as instructed here) and the amdgpu-pro drivers provided by AMD. The wake-up issue has occurred once after the last nine suspends which is much better a situation than what it used to be (roughly once after every two suspends).


When resizing a volume, you need to resize all the layers, starting from the bottom up.

In this case you have 6 layers:

EC2 volume
LVM physical volume
LVM volume group (automatic upon resizing the physical volume)
LVM logical volume
LUKS volume
XFS filesystem

In this case "bottom" means the first one

Resize the LVM physical volume:

pvresize /dev/xvdH

(replace with the actual device path)

Resize the logical volume

lvresize -l +100%FREE vgdata2-lvdata

(adjust to how much space you want the volume to use if not 100%)

Resize the luks volume

cryptsetup resize /dev/mapper/cryptmnt

Resize the filesystem

xfs_growfs /mnt/ebs1


Enforce outgoing port for a machine inside LAN

You can do that by adding a iptables rule using REDIRECT to redirect all requests done by a --src on a specific --dport to be redirected to another specific --to-ports

I would look something like this:

iptables -t nat -I OUTPUT --src 192.168.0.2 --dst 51.72.64.256 -p tcp --dport 80 -j REDIRECT --to-ports 10002

Edit:

Correct answer was supplied by Calin Don after testing:

iptables -t nat -I PREROUTING --src 192.168.0.2 --dst 51.72.64.256 -p tcp --dport 11000:12000 -j DNAT --to-destination 51.72.64.256:11002


I have a problem while trying to execute a command with params via Java runtime

You are not doing it right. Make a string array. The first element will be the command name, and the following elements will be arguments. http://download.oracle.com/javase/1.4.2/docs/api/java/lang/Runtime.html#exec(java.lang.String[])


How do you fix a broken/missing icon (in this case, typing break icon)?

I found someone else with a similar problem. What you need to do is add the indicator applet to the panel (right-click on an empty space in the panel, click Add to Panel, then look for Indicator Applet).


Help with .kernel_config_md5: Permission denied

Fixed by following this post on Ubuntu Forums:

make install
sudo !!

= sudo make install


rsync appears to copy files to Android device, but no files are actually copied

Although it doesn't solve your problem regarding rsync but you can use GSConenct if you use ubuntu with gnome shell or KDEConnect if you use KDE plasma (you can use KDEConnect in gnome but it is better integrated with KDE plasma) to transfer your files between your PC and mobile phone ( unfortunately KDEConnect only works with android phones for now)

KDEConnect has lot more features and is well-integrated with the dolphin file manager (i.e default file manager in KDE plasma) and it puts an option named Send to "Your phone name" via KDE Connect in the drop down menu when you right click almost any file .( Note that you need the Android version of KDE Connect in your phone .)

Take a look at The demo video.

If anybody has a better solution I'm glad to hear.


sync in Ubuntu is from coreutils. Check the package from which it comes. The sync described in sync(8) is an antique that probably never was available on Ubuntu as part of fileutils:

This page describes sync as found in the fileutils-4.0  package;  other
versions may differ slightly.

(fileutils-4.0 is from 1998.)

The sync(1) manpage for is what you should be looking at: 14.04, 18.04. Note how 18.04's manpage is just like the man7.org manpage.

If you compiled sync from coreutils 8.29 and didn't get those options, you did something wrong, since on Ubuntu 16.04, with the default sync from coreutils 8.25, I do get those options:

~ sync --help
Usage: sync [OPTION] [FILE]...
Synchronize cached writes to persistent storage

If one or more files are specified, sync only them,
or their containing file systems.

  -d, --data             sync only file data, no unneeded metadata
  -f, --file-system      sync the file systems that contain the files
      --help     display this help and exit
      --version  output version information and exit

GNU coreutils online help: <http://www.gnu.org/software/coreutils/>
Full documentation at: <http://www.gnu.org/software/coreutils/sync>
or available locally via: info '(coreutils) sync invocation'
~ sync --version
sync (GNU coreutils) 8.25
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Jim Meyering and Giuseppe Scrivano.


Hide multiple files at once with shell script

Try this in the terminal

    $ for i in *
    > do
    > mv "$i" ".$i"
    > done

It hides all the files in the current directory. I hope that's what you're looking for.
EDIT: Added the quotes around $i.


Is it possible to read the inputs from a text file for an application installation in Linux?

For a cli you can run your command once with

autoexpect command args...

and interact with it as usual with the answers wanted.  When this ends you will have an executable file script.exp which is an expect script (install the expect and tcl packages). You can run it at any time to repeat the command and have the same answers provided.  The file is easily edited in a text editor to slightly modify an answer.  You can write your own such scripts to do more complex interactions. See the expect man page.


What files to edit to change title bar and border width of Ubuntu 18.04 LTS

I was able to add border to windows in Ubuntu 18.04 by doing the following:

nano ~/.config/gtk-3.0/gtk.css

Then add the following:

decoration {
    border: 3px solid gray;
    background: gray;
}

After saving the file, remember refresh gnome using this command:

setsid gnome-shell --replace

I found it works well for Ambiance. I like the border slightly thicker (3px) to make it a little easier to see in laptop running in 1920x1080 resolution.

EDIT:

To customize the active title bar background colors. (use :backdrop for inactive windows)

.titlebar {
    background: #0759EB;
}

.titlebar:backdrop  {
    background: #829EDF;
    color:white;
}


Should I edit my resolv.conf file to fix wrong DNS problem?

What none of the answers posted so far addresses is the appearance that the questioner fails to understand that having nameserver 127.0.0.1 in /etc/resolv.conf is correct, assuming that a local nameserver is running. And in Ubuntu 12.04 Desktop there is, by default, a local nameserver running, namely, a dnsmasq process controlled by NetworkManager which listens on 127.0.0.1. In Ubuntu 12.10 the listen address has been changed to 127.0.1.1.

So the solution is not to make any changes to resolv.conf. It is correct, assuming that the questioner wants to use the local nameserver.

If name service is not working then the local nameserver is not being given correct forwarding addresses, or there is some other networking problem.

The questioner tried using the "network settings GUI" to "generate the file with the right settings" and this failed to work. I don't know exactly what this means, but here is the right way to enter nameserver addresses so that they end up in resolv.conf at the right time. I assume that the questioner is using NetworkManager and not ifup to configure interfaces.

Most often interfaces are configured using the DHCP protocol. In that case nothing needs to be configured on the local system. The DHCP server knows what nameserver address its clients should use and sends this information to the DHCP client, which sends it to NetworkManager, which sends it to resolvconf, which puts the information into resolv.conf. So in this case it is the DHCP server that may need to be configured.

If the network interface on the local machine is statically configured then the correct nameserver addresses have to be entered into NetworkManager at, for example, network indicator | Edit Connections... | Wireless | myconnection | Edit... | IPv4 Settings | Additional DNS servers.

It is possible that the local nameserver is not working properly. In that case the questioner should edit /etc/NetworkManager/NetworkManager.conf

sudo gedit /etc/NetworkManager/NetworkManager.conf

and comment out the line

dns=dnsmasq

in the "[main]" section. To comment out the line, put a # at the beginning of the line, then save the file. Then restart network-manager.

sudo restart network-manager

After this, non-local nameserver addresses will be entered into resolv.conf instead of the 127.* address.

If the questioner is using ifup rather than NetworkManager to configure network interfaces then jmartin2279's answer is correct: you have to add the nameserver addresses to /etc/network/interfaces in the way jmartin2279 described.

Contrary to what some other answers advise, in general you should not add nameserver, domain or search options to files in /etc/resolvconf/resolv.conf.d/. See my comments on those answers.


Windows 10/ubuntu dual install goes only to windows

It sounds like you're saying you are installing Linux next to Windows. Just to confirm it's not the other way around.

Changing Boot Order

When your computer first turns on you need to press the F2 or F12 button (this depends on your computer). F2 worked for my Dell Inspiron. This should open a menu with advanced options. Use left and right arrow keys to navigate tabs to the one that says 'Boot' or something similar.
Once you're in this menu, you will have to change the order of your boot options. Your computer may be using BIOS or UEFI. If you have 'secure boot' turned on, you will need to turn it off to change the order of your boot options.
Press the enter key on the format you are using (BIOS or UEFI) and use the F5 and F6 arrow keys to move the Linux system above the Windows boot option. Save your changes with F10 and you should be good to go! Now grub should load when your computer turns on and give you an option of which system you want.

Note: Some of these keys may be different on your system but there should be a little 'table' on the bottom of your screen that tells you what each button or key does.

Edit: If this answer was helpful please accept it. Otherwise let me know what went wrong and I can help you figure it out.


Is there any ncurses archiver interface available?

We have a winner: https://github.com/matejc/tarman

I've been using Matej's code since the beginning he coded the project, It's handy.


How to create a virtual host in apache with an IP address

It's worth checking that the default site is actually disabled. You haven't stated which Ubuntu version you're using, but in most versions, Ubuntu versions of Apache come with the lines:

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

inside /etc/apache2/apache2.conf. Make sure those lines are in, or Apache won't know to look inside that folder for its configs. If you list the contents of:

ls /etc/apache2/sites-enabled/

If you used a standalone configuration for your virtualhost in /etc/apache2/sites-available you should only have your site available in there, and not the default site.

It is also worth using your domain name rather than your IP address, as aready mentioned. You may, at some point, want to host other content in that server.

If this is the only virtual host you will have, you can do without the ServerName line. Try commenting it out (put a # at the start of the line).

Finally, after making sure that you have only the virtual hosts you want in /etc/apache2/sites-enabled, restart Apache in order to load the new configurations:

sudo systemctl restart apache2

Your new configuration won't load until you do so.

The error about www-browser is strange. How did you install Apache? It means that there is no command-line browser installed. You could install Lynx and this should fix it (sudo apt install Lynx), but I'm doubtful that this is the cause of the default page being shown instead of your own. Again, after any change, reload Apache with sudo systemctl restart apache2.


Add environment variable to .bashrc through script

Use the echo command to append lines to the .bashrc script

So in your script use these lines

echo 'export APP=/opt/tinyos-2.x/apps' >> ~/.bashrc

echo  'export TOS=/opt/tinyos-2.x/tos' >> ~/.bashrc

Make sure to use >> (append), if you use a single > you will overwrite the file.

~/.bashrc indicates .bashrc is in your home directory


I think your System Might be Broken

This might Fix your Problem

First REBOOT

Then Open A Root Terminal and then follow these commands

nano /etc/apt/sources.list

And Then Paste this To your Existing Source List (CONTAINS FROM VIVID VELVET)

###### Ubuntu Main Repos
deb http://us.archive.ubuntu.com/ubuntu/ vivid main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ vivid main restricted universe multiverse

###### Ubuntu Update Repos
deb http://us.archive.ubuntu.com/ubuntu/ vivid-security main restricted universe multiverse
deb http://us.archive.ubuntu.com/ubuntu/ vivid-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ vivid-security main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ vivid-updates main restricted universe multiverse

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu utopic partner
deb-src http://archive.canonical.com/ubuntu utopic partner

Then Execute These Commands

sudo apt-get update
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get upgrade

Maybe for New Distribution Updates

sudo apt-get dist-upgrade

This is for the Purpose of Re Installing Wine

sudo apt-get remove wine
sudo apt-get purge wine
sudo apt-get autoclean
sudo apt-get install wine


Configuring additional two monitors to an Ubuntu12.04 installed system

So you want to use 3 monitors total?  Will you be using one GPU?  What kind of GPU will you be using?

It should be as simple as plugging them in and going to 'System Settings -> Displays' to configure them the way you'd like.

You can move them around, set resolution, etc.


You just forgot the preceding dot, the command to open your (bash) terminal history file is

gedit ~/.bash_history

This file is only updated when you close a terminal.
To remove the last 10 lines from this file and don't get this command itself recorded, open a new terminal and execute the following chain of commands:

sed -n -e :a -e '1,10!{P;N;D;};N;ba' ~/.bash_history && history -c && exit

or

for i in {1..10}; do sed -i '$d' ~/.bash_history; done && history -c && exit

or

head -n -10 ~/.bash_history > ~/.b_h_2 && mv ~/.b_h_2 ~/.bash_history && history -c && exit

sed or head respectively deletes the selected lines from ~/.bash_history, history -c clears the terminal's history and exit closes it.


What finally resolved my issue was updating the UUID of my swap partition in the /etc/fstab according to the information from Slow boot - "a start job is running for dev-disk-by..."

As I resized my primary partition I had to move my swap partion as well, seems like the system would create a new UUID but not update it in the fstab file. I'm back at a few seconds of booting time.

The answer from Alexander helped me to get the bootup messages guiding me in the right direction.


How can I request password when Usb hardware is plugged in?

For Ubuntu 11.10

Create a .pkla file with the following command.

gksu gedit /var/lib/polkit-1/localauthority/50-local.d/mount-usb.pkla

Paste the following text into the file's contents, and save the file.

[Mounting, checking, etc. of external drives]
Identity=unix-group:admin
Action=org.freedesktop.udisks.filesystem-mount;org.freedesktop.udisks.filesystem-check;org.freedesktop.udisks.filesystem-unmount-others;org.freedesktop.udisks.drive-eject;org.freedesktop.udisks.drive-detach;org.freedesktop.udisks.change;org.freedesktop.udisks.luks-unlock
ResultActive=auth_admin_keep

Logout, and login again.

Source (Ubuntu Forums) I've tested it with two USB drives (one a flash drive, the other an external HDD), and things seem to work perfectly!


You are most likely experiencing bug #467397. A possible workaround is described here:

  As far as I was able to test this bug, the locale change is required
  for ubuntuone-client-applet (OAuth module), not syncdaemon. Syncdaemon
  is able to sync files with tr_TR locale.

  Open gnome-session-properties, select "Ubuntu One" entry, Edit it and
  prefix the available command with env LC_ALL=en_US.UTF-8, so that
  Command (Komut) is env LC_ALL=en_US.UTF-8 ubuntuone-client-applet

  The client will be started with English/USA locale on next login.
  This is still a workaround but at least it will not require manual
  syncdaemon/applet startup with en_US locale.


Ubuntu Classic, possible to have just big icons like in Windows 7?

It sounds like you might be looking for Dockbarx. It's a panel applet you can add to your bottom panel in place of your window list, and it should be able to duplicate all this functionality for you. (Also, to make the icons bigger, just increase the size of the panel then.)

You could also try removing the bottom panel and replacing it with Docky in panel mode, but then you won't get previews. Docky is a bit nicer-looking and easier to set up though, in my opinion.


I have not tried it, but these could be the steps:

map a host folder as shared folder in virtual box machine.
use dd command from within the vm to raw copy the vm disk to a file in the
shared folder.
use the raw file and dd to write it to a real hardisk.
use something like gparted to strech the partition to the harddisk length, if not same size.
boot for that partition and see it if works.


Command to List Installed and Enabled GNOME Extensions

Your locally installed gnome Shell extensions, i.e., these that are installed for your user only, can be listed with the commmand:

ls ~/.local/share/gnome-shell/extensions/

You can find out which extensions are enables by querying a dconf setting:

gsettings get org.gnome.shell enabled-extensions

System wide installed gnome-shell extensions are listed with the command

ls /usr/share/gnome-shell/extensions/


File ignored PyCharm Pro IDE and this the correct sys.path for PYTHONPATH?

My venv directory comes up as ignored

That's an expected behavior, you don't really need PyCharm to treat your virtual environment as a part of your project code.

  Despite the directory being created I still get this result:

Make sure the venv you created is selected as a project interpreter in Settings | Project ... | Project Interpreter and it has Django installed.


Second screen is not properly recognized

The same happened to me with Ubuntu, graphic card, screen and all.

Curiously with other screen worked well and sometimes goes back to normal with this one, but goes back at the same fail suddenly, after shutting down and turning on.

Try this with the desired resolution, mine is 1440x900 , IT WORKED for me!!

xrandr --newmode "1440x900_60.00"  106.47  1440 1520 1672 1904  900 901 904 932  -HSync +Vsync


How to format/restore USB where its partition's contents 'unknown'

Try Format Disk in "Gnome-Disks":

If that does not work try mkusb restore to a Standard storae device.
https://help.ubuntu.com/community/mkusb#Re-use_the_pendrive

Sometimes USB devices just die.


Moving space from /home partition to others

You cannot resize a partition that's mounted, and you cannot unmount a partition that's in use. The best way to do this would be to boot from a USB Stick (or Live DVD) and resize the partitions from there via GParted.


Ubuntu installer won't let me install to my USB?

I think the easier way to do this is either use a Linux Image that allows for persistence, or you need to do this with the use of a CD/DVD/USB and a Separate USB stick.  This way the Kubuntu install doesn't get upset when you are running gparted to edit the partition structure.  Universal USB Installer(for Windows) allows for persistence with certain images.  (This essentially allows you to install Linux to the usb and boot it keeping your changes every boot.  It is NOT as good as having it truly installed to a USB however.  You do know that all USB sticks have a maximum number of read and writes before they fail, so I would suggest an external HDD for maximum system life)


You need to update (and upgrade recommended) before you can install flatpak.

sudo apt update && sudo apt full-upgrade -y

(kudos to mook765)


Nvidia GT730 driver problem with Ubuntu 16.04

From Nvidia customer service....
The following worked for me:

NVIDIA Driver Installation for Ubuntu 16.04

for Ubuntu 16.04, please try the following manual driver installation procedure:

blacklist open source nouveau driver by the command

sudo printf "blacklist nouveau\nblacklist lbm-nouveau" | sudo tee /etc/modprobe.d/blacklist-nouveau.conf

blacklist nouveau
blacklist lbm-nouveaulisam@Atlas-PC:~$

to update the boot process run the command

    sudo update-initramfs -u

    update-initramfs: generating /boot/initrd.img-4.4.0-36-generic
    W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1.bin for module i915_bpo
    W: Possible missing firmware /lib/firmware/i915/skl_guc_ver6.bin for module i915_bpo

Reboot

use ctrl+alt+F1 to go to a console, then login and use the command

sudo service lightdm stop (command to exit the gui)

change directory to the Download folder where you usually download the NVIDIA driver

cd /home/usr/Downloads

run sudo sh and follow on screen instructions

    sudo sh ./NVIDIA-Linux-x86_64-367.44.run

It may say that the pre-installation script failed and do you want to continue and answer Yes.

    The target kernel has CONFIG_MODULE_SIG set, which means that it supports cryptographic signatures on kernel modules. On some systems, the kernel may refuse to load modules without a valid signature from a trusted key. This system also has UEFI Secure Boot enabled; many distributions enforce module signature verification on UEFI systems when Secure Boot is enabled. Would you like to sign the NVIDIA kernel module?

    <Install without signing>

I tried installing without installing and I get an error message saying I needed to sign the kernel module or signing was necessary for secure boot up.

I tried to disable secure boot:

plug in USB
Restart and enter BIOS
Advanced mode> secure boot
Windows UEFI mode OS
Save secure boot keys
Select USB drive as file system
Saved four key files PK, KEK, DB, DBX to USB
Delete PK to disable secure boot
Save and restart with Other OS type and Secure Boot state disabled

    WARNING: Unable to find a suitable destination to install 32-bit comptability libraries. Your system may not be set up for 32-bit compatibility. 32-bit compatibility files will not be installedl if you wish to install them, re-run the installation and set a valid directory with the –compat32-libdir option.
    <OK>

    Would you like to run the nvidia-xconfig utility to automatically update your X configuration file so that NVIDIA X driver will be used when you restart X? Any pre-existing X configuration file will be backed up
    <YES>

reboot or run this command to start the gui:

sudo service lightdm start


Exchange with Evolution or any other mail client

You should try DavMail Exchange Gateway.

You can use it "standalone" on your own computer, or on a server so you can share it with other colleagues.

Basically, this application connects to the Exchange server (you can use the web address you gave) and translates all Exchange specific stuff into standards protocols: POP, IMAP, Caldav, SMTP, Carddav or LDAP. So you can access e-mails, calendar and contacts (included corporate ones) from this application.

Then, you just have to configure Thunderbird or Evolution, etc. to connect to this application instead of Exchange.

It works like a charm on Windows, Linux and Mac OS. There is a 'deb' package in the download section of the project web-site, so you can easily install it on Ubuntu.

Then, you can launch it from the Applications->Internet menu.


Mode setting is basically setting up the screen resolution and the depth mode for the graphics card.

From Wikipedia:

  Mode-setting can be done in kernel space or in user space. Doing mode-setting in kernel-space is more flexible. Doing kernel-based mode-setting allows displaying an error in the case of a fatal error in the kernel, even when using a user-space display server. User-space mode-setting would have needed superuser privileges for direct hardware access. So kernel-based mode-setting increases security because the user-space graphics server does not need superuser privileges.

From Ubuntu Wiki on Kernel Mode Setting:

  Kernel mode-setting (KMS) shifts responsibility for selecting and setting up the graphics mode from X.org to the kernel. When X.org is started, it then detects and uses the mode without any further mode changes. This promises to make booting faster, more graphical, and less flickery.

If KMS were to fail, I would think that X would do its own modesetting; instead of having the kernel do it. But that might require you to first disable KMS. More information specifically for different graphics gards can be found on the Ubuntu Wiki article I linked to eariler.


How do I migrate my Ubuntu 18.04.5 Installation to my New machine

Using dd to Clone File System from Old Drive to New Drive

Create Live Ubuntu USB and Boot it.

Plug in Target drive, (must be at least as large as Source drive).

Open Gnome-Disks to confirm drive designations, sda, sdb, etc.

In Terminal run sudo dd if=/dev/sdx of=/dev/sdy
Where sdx is the Source drive and sdy is the Target drive. Double check that the Target device designation is correct, one typo can overwrite your OS.
Some people prefer to add a block size, such as bs=256k, but I do not bother.
The process may take a long time without showing activity.
Ref: https://docs.oracle.com/cd/E19455-01/805-7228/bkupsavefiles-60904/index.html


tlp-stat and power indicator show different battery levels

I'd say both are:

since it says Capacity 90% and Charge 95,9% I would guess the menu bar shows you

Charge * Capacity = RealCharge
95,9%. * 90%      = 86,3%

Capacity is the maximum capacity that your battery is able to charge to. This can and will decrease with time for technical reasons, and your battery will charge and discharge faster as it gets older because of this decreased capacity.
This value might differ slightly while charging but should more or less only decrease with time.

Charge is the percentage of how charged your battery is compared with its maximum capacity.


How to block anything but internet(firefox) from UFW?

I presume from your question that you have installed Ubuntu on a flash drive and wish to run it as a live session each time.

To enable the firewall in a terminal you should run:

sudo ufw enable
sudo service ufw restart

As you are using a live USB, you will need to type these commands every time you use Ubuntu in that way.

This will give you the default firewall settings provided by ufw, which blocks almost all incoming traffic, but allows all outgoing traffic. In simple language, this means that you are free to make any connection from your computer, but others will not be able to make a connection to your computer. Of course it will not protect you from your own actions, e.g. if you decide to use a banking website with poor security.

For more information see https://wiki.ubuntu.com/BasicSecurity/Firewall


Remove Ubuntu login screen from Xubuntu 12.04

If you don't want any of the Ubuntu applications and are good with just the Xubuntu defaults, you can use the command on this site: http://www.psychocats.net/ubuntu/purexubuntu


Why do I get these differences on ppa vs snap Communitheme Ubuntu 18.04?

The ppa has been deprecated and doesn't reliably build anymore new versions.

Only the snap is the supported documented way and you should remove/purge the ppa and packages that are installed into it to ensure you get the tested and supported stack.


You can check the title of an open window using wmctrl:

$ wmctrl -lx | grep "last.fm.Last.fm" | grep -Po "(?<=$HOSTNAME ).*$"
Insomnium – Death Walked the Earth

Watching the title using this method would require the script to periodically poll for changes, though, which would be messy and inefficient.

A smarter approach would be to wait for some kind of event generated by the Last.fm player. A D-Bus interface or similar API would be ideal, but I don't see any documentation suggesting one exists. As a next-best alternative, you can try watching the terminal output for information on what the player is doing:

#!/bin/bash

grabnextline=0
albumart="$(mktemp)"

while read line; do
    if [ $grabnextline = 1 ]; then
        title="$(echo "$line" | cut -d\" -f2)"
        wget -O "$albumart" "$(grep -A 10 "<title>$(echo "$title" | awk -F ' – ' '{print $2}')" ~/.local/share/Last.fm/Last.fm.log | grep -Eo "http://.*\.(jpg|png)" | sed 's/174s/64s/' | sed 's/jpg/png/')"
        notify-send "$title" --icon "$albumart"
        grabnextline=0
    fi
    if [[ "$line" = *ScrobblerManager::nowPlaying* ]]; then
        grabnextline=1
    fi
done < <( /usr/bin/lastfm 2>&1 )

rm "$albumart"

exit

It's still an ugly hack, but it gets the job done.


I figured out that, it was a router problem
SSID isolation and user isolation to be precise.
I tuned of both of them and connection is back.
Image


Why do (some )apps open in random workspaces when started from command line?

You might keep track of where the programs' windows are when you exit them or end the session; some programs remember what workspace their windows were last on and ask the window manager to move them back there.


Have you tried

resizecons -lines 40

This command works with every single one of my Ctrl+Alt+F tty consoles. The number of lines can be set to 25, 28, 30, 34, 36, 40, 44, 50, 60.

if this command is not found you may need to sudo apt update && sudo apt install console-setup console-setup-linux


Can't install any software on 16.04 while using live flash drive, is this normal? [First time linux user]

To be quick, Yes this is completely normal, ubuntu software in live sessions should have very little software, if any, but when you boot up normally, from an installed version, all of it will be there.


Create folders in remote server after ssh login using commands

You can supply the command at the end of the ssh

ssh user@host command

So your command would look something like this

ssh  -i #{key_path}key_file.pem ubuntu@ec2-**-***-**-***.ap-southeast-1.compute.amazonaws.com mkdir appname.git

I noticed that you are trying to initialize a git repo. A simpler way to do it is just git init --bare #{app.name}.git

ssh  -i #{key_path}key_file.pem ubuntu@ec2-**-***-**-***.ap-southeast-1.compute.amazonaws.com git init --bare #{app.name}.git


How to provide acces to my Video folder to Guest account

You can allow everybody (including guests) to access this folder, if you give other users read and execution permissions to

the folder in question and everything below it (recursively) and
every folder between / and the folder in question.

Example:

You want to allow everybody to access /home/cristiano/Videos/Movies. Therefore you need to

allow everybody to access /home/cristiano/Videos/Movies, the folder itself, and its content:

chmod -R a+rX /home/cristiano/Videos/Movies

allow everybody to access to /, /home, /home/cristiano, and /home/cristiano/Videos. Conveniently, / and /home are already accessible to everybody and you only need:

chmod a+rX /home/cristiano /home/cristiano/Videos

All of this can be done through the Permissions tab of Nautilus' file property dialogue instead of the command line.


Setting up a DHCP subnet running on several interfaces

Just modified my setup a bit:
I'm now using bridge-utils to switch all of my interfaces together.

Now it works with several hosts but I still can't access my devices over their host name.


try reinstalling virtual box
try using some prebuilt virtual box images from the internet
enable 3D acceleration, hardware-vt/amd-v, pae/nx, nested paging. Let your VM have atleast 2GB of ram for ubuntu. after installing ubuntu run the following commands : (otherwise ubuntu will be very slow)

sudo apt-get install dkms virtualbox-guest-dkms virualbox-guest-x11 virtualbox-guest-utils


Everything randomly freezes in Ubuntu 16.04.3 LTS while using GUI

Apparently it was Driver-related, since there is not support for these processor and GPU drivers for Ubuntu 16.04.3 LTS.

The solution was downgrading to Ubuntu 14.04 LTS (where there are available drivers), now I'm dealing with connection problems but those are unrelated.

The real question would be:
Can I upgrade back to 16.04 LTS without breaking everything again?


How to pass a file containing queries to youtube-dl?

I don't know about python, but you could use GNU parallel for that (sudo apt install parallel; I omit most of your options to increase clarity here):

parallel youtube-dl "ytsearchall:{}" -ix :::: /path/to/b.txt

By default parallel runs as many jobs in parallel as you have CPU cores, which is normally a good choice. If you want to set the number of youtube-dl processes run in parallel you can use the -j option, e.g. -j2 for two processes.

Alternatively you could use a while loop:

while IFS='' read -r l || [ -n "$l" ]; do youtube-dl "ytsearchall:$l" -ix; done </path/to/b.txt

Both ways can cope with the last line of your file not ending in a linebreak – parallel by design, the loop with the help of the test command [.


Install CompizConfig Settings Manager

sudo apt install compizconfig-settings-manager

Open CompizConfig Settings Manager, type "ccsm" in the dash.
Locate:  Window Management → Resize Window
Uncheck the checkbox.

Try to resize the window, note that it no longer resizes on click.


If there are no suggested drivers in the Additional drivers tab:

Before you do this run:

lspci -nn | grep -i network

and make sure the device number matches this Broadcom Corporation Device [14e4:4365]

If that's the case

Download this dkms enabled bcm43142 driver from jas.gemnetworks.com and save it in your Download folder.

In the term run:

sudo apt-get install linux-headers-generic build-essential dkms

then install the package, still in the term:

cd ~/Download
sudo dpkg -i wire*.deb
sudo modprobe wl


Typing freezes automatically in chromium

That's actually not freezing, you might have enabled the Chrome's 'Instant search' feature that will start guessing the query that you are typing.
As it process your typed characters in the search box (universal address bar now in chrome)
it process it, which, based on your system/internet speed takes time.
You can try disabling it in the Chrome settings (Settings-Search-Enable instant for faster searching). Cheers.


Cannot type into some text fields during installation

I had exactly the same problem, but the problem has gone after having resetting (Ctrl+R) the virtual machine.


How to install net speed indicator on Ubuntu 20.04 LTS?

Install the Vitals GNOME Shell extension, found here.

A glimpse into your computer's temperature, voltage, fan speed, memory usage, processor load, system resources, network speed and storage stats. This is a one stop shop to monitor all of your vital sensors. Uses asynchronous polling to provide a smooth user experience.


lost HDD Space after reinstalling ubuntu

Your drive and your partitions are perfectly fine. I am unable to see an issue here.

It may be possible that from re-partitioning and from recovering partitions with testdisk some partitions can not be recovered completely. This may then lead to unused, or badly allocated hard drive space, but this is not the case in your present partition layout.

We have here an issue with different units used for your storage quantity:

1 GB  = 1.000.000.000 bytes
1 GiB = 1.073.741.824 bytes

for your drive this means a capacity of

200 GB                   = 200.049.647.616 bytes (as correctly displayed from fdisk)
186,31 GiB × 1,073741824 = 200.048.839.229 bytes.

The missing few bytes are likely a rounding error.


"Clearing orphaned inode" messages then no progress booting Ubuntu on virtual machine

Judging from the error message you might have shutdown the Ubuntu guest OS improperly by shutting down the virtual machine application without shutting down the Ubuntu guest OS first. This leaves semi-deleted orphaned inodes on the disk that aren't attached to a directory entry in the filesystem, which means they can't be reached. Since this could be a one-shot deal caused by an improper shutdown, booting the guest OS from an earlier snapshot would clear the error, if you have saved snapshots of the guest OS system state as you always should. If you didn't save any snapshots you have nothing to restore the operating system back to in case of a serious system error.

Without any snapshots you would have to access the virtual console with the keyboard shortcut Ctrl+Alt+F3 (or any of the F3-F6 keys) and boot from there.

The last resort is to reinstall the guest OS since it's a new guest OS anyway and immediately save a snapshot after the first reboot.


sudo apt-get remove gdm

sudo dpkg -i /path/to/deb/file

Be aware that because you are installing this deb from a file and from another repository that you may have to pull in other dependencies from Mint. Those new dependencies may break stuff in Ubuntu as well. But, honestly, as Mint is Ubuntu-based I don't see that happening. Just wanted to warn you in advance so you know what you're getting yourself into.

Also, as you probably know, since you're installing from a file you'll have to manually update the packages/dependencies.


Ubuntu 16.04.5 sha256 signing mismatch questions

Where did you download your Ubuntu 16.04.5 ISO from?

To test your assumption,

I downloaded the ISO taking 1hr 31 mins 1s from my local [official] mirror
I downloaded the SHA256SUM file (for diff from main site)

The result was

6b505fd3b6f816f8ff058710f127a9900e9233e496783ce08a0022814d224810  ubuntu-16.04.5-desktop-amd64.iso

exactly what it should have been according to the official site.

Where did you download it from? or maybe it failed because of a bad connection (it's not matching because your download is invalid)

As for whom do you contact - if you think there is a problem in the documentation, file a bug on launchpad [with ubuntu-docs as the package].

As for a bad download - I think the check sum is correct, your download was corrupted (in my opinion), or you downloaded your ISO from a corrupt or invalid site.  At least my copy matched perfectly.

note: by official mirror, I mean it's one found on https://launchpad.net/ubuntu/+cdmirrors

You listed the command used to grab the gpg keys as
gpg --keyserver hkp://keyserver.ubuntu.com --recv-keys 0xZZZZZ 0xZZZZZ which was not what I used, nor what I saw in the documentation.  Did you replace the real key you used with Z's? or feel that information was private so hid it?


How do I to copy files to flash drive in a recovery mode?

Use fdisk -l to see if you USB-Drive is identified. Remember the device (/dev/sdX)
Mount the USB-Drive manually with mount /dev/sdX1 /mnt
Copy thr whole Downloads-Folder with cp -R /home/<your_user>/Downloads /mnt/


How can I save an email from Thunderbird?

Could you please try to use File -> Save As -> ... or Ctrl + S?


System is not asking for password as it should

Edit /etc/sudoers using sudo visudo, and remove the last line:

ALL ALL=(ALL) NOPASSWD:ALL

then it should ask you for a password once again.


Cannot schedule a bash script with crontab

The desktop's runtime environment differs from the cron runtime environment. Read man 5 crontab and run

(echo "=== set ===";set;echo "===env ==="; env | sort;echo "=== alias ===";alias)

in both environments, and compare the results.


How to turn off the Multicast DNS and Multicast UPNP Services in Ubuntu?

Try with this

nano /etc/init/avahi-daemon.conf

Search for the following lines, edit the line with “start on” and add “never and”:

Replace the line

start on (filesystem and started dbus)

with

start on (never and filesystem and started dbus)
stop on stopping dbus


Try to remove the funny package via

sudo apt-get purge sl

Check your aliases for ls e.g. in your ~/.bashrc or ~/.profile.
Check the binary /usr/games/sl and delete

sudo rm /usr/games/sl

Check the output of

strace sl |& grep execve
strace ls |& grep execve

if point three has no success.
And in future, do NOT install anything that promises to 'lighten things up a little' in the description. ;)


Gnome Extensions Disabled after upgrading to 20.10

Extensions may not anymore work on a newer version of Gnome Shell, which is at 3.38 in Ubuntu 20.10. Make sure your installed extensions are up to date. "Clipboard Indicator" is updated for Gnome Shell 3.38, so that one should work if you have the correct version installed. The latest supported version of Netspeed is 3.34, so indeed there is a possibility that that extension won't work anymore on 3.38. The same goes for " Sound Input & Output Device Chooser", which at this time is available for Gnome Shell up to 3.36.


I found a solution myself: in Ubuntu Software Center, I found a program, called "Find File/Folders". I found those two leftovers and deleted them using that program. At first, deleting does not make them disappear from the list, but after restarting "Find File/Folders" the files were really deleted. Thank you very much for your help.


I have the same problem with 3400G and ubuntu 18.04. new problem start from this week.
Only sudo reboot -f can reboot successfully


Suspend does not resume on Ubuntu 18.04 HP Elitebook 850 G6

I have the same exact issue (same model, Ubuntu 18.04, kernel v5.3.0-45) and the closest I got to solving it was downgrading to kernel v4.18.0-15 where the suspend works properly, but now my wifi doesn't work (which is why I upgraded to v5.3. in the first place).
You can try the downgrade, you can always change to the other kernel version you have installed.


NVIDIA drivers don't work after kernel update to 5.11

Kernel 5.11 is still just in RC step (release candidate) thus Nvidia doesn't have to support it yet.
Go with 5.10.x, everything works just fine there. For dual monitor you might want to switch primary GPU.


Either of these would solve your issue:

How can I add a bash script to the Unity launcher?

How can I edit/create new launcher items in Unity by hand?

Basically, you need an icon (.desktop) file than be docked to the Unity bar (left of screen).


Overheating in Kubuntu 18.04 - Lenovo Ideapad 330-15ICH

I managed to solve all the issues by following one simple solution that I found in this post: nvidia drivers problem on Kubuntu 18.04

I did not install any NVIDIA drivers, because this was a fresh installation, thus I did not need to remove-purge drivers, so I just run the following two commands in the terminal:

sudo apt-add-repository ppa:graphics-drivers

sudo ubuntu-drivers autoinstall

And it all magically solved after rebooting: lower temperatures, a normal temperature (instead of the 511 crazy degrees), and normal poweroff-rebooting-session closing (however, I needed to perform a hard reboot just after installing the drivers, because the laptop got stuck again with a normal reboot).


20.713316 intel-rapl: no valid rapl domains found in package 0 error and Ubuntu /Xubuntu does not boot..message is permanent

I may have found a solution for this bug. Try to enable the function "Intel Virtualization Technology", on the BIOS SETUP. Step by step in this video. https://www.youtube.com/watch?v=886cH0E-T7I


Autologin Xenial/OpenBox WITHOUT Lightdm

Solved this issue:

Install slim

apt get install slim

edit /ect/slim.conf

default_user "name of user to login"
auto_login yes


How to get started with Jekyll on Ubuntu 16.04?

After some searching around (in particular this), I ended up installing several packages:

$ sudo apt-get install gcc ruby ruby-dev libxml2 libxml2-dev libxslt1-dev zlibc zlib1g-dev

Disclaimer: Not sure all of those are needed but once I had those, it seemed to work.


How to unmount gmail account from "Places" in Ubuntu after adding via Thunderbird

Per a reply on Twitter I received from @linuxuprising, go to Online Accounts in Settings, and delete my google account there. It worked. So simple, yet so difficult to find that answer. Big thanks to @linuxuprising.


how to make a dvd which can be played in a dvd player

Try using 'DeVeDe DVD/CD Video Creator'. This application allows to create video CDs and DVDs, suitable to be reproduced in home DVD players. For some details see Ubuntu Software Center.


How to download stable version of wxPython?

To install the stable version of wxPython for Python 2.7 from the default Ubuntu repositories, open the terminal and type:

sudo apt install python-wxtools  # tools from the wxPython distribution

wxPython 4.0.1 has been released. To get the GTK3 wxPython builds for Ubuntu 16.04 you can use a pip command like this:

sudo apt install python-pip
sudo pip install -U \
    -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-16.04 \
    wxPython


Not able to connect to USB modem on Ubuntu 14.04 using wvdial

I slogged for days when i found it was this simple

First, run this command:

sudo wvdial.conf

This will set up the config file for you

Then run:

sudo wvdial

Shut down your wifi and run your browser and it will work,the problem is that the GUI for the network connections doesn't detect or is not able to connect to the modem but it is actually working.


Adding Two Factor Verification to Ubuntu Server SSH login

Jakuje is on the right track.  A bit of googling let me to an article that gives you exactly what you need.  Just got done setting up my own server to use google authenticator on my phone.  Instead of repeating the directions, here's the URL where I found the answer:

http://www.howtogeek.com/121650/how-to-secure-ssh-with-google-authenticators-two-factor-authentication/


is there any kind of utility/protocol that can take premissions from root users?

SELinux, but that almost certainly has nothing to do with the problem you encountered. It's not enabled by default in Ubuntu, you would have to install it yourself.

The problem also had nothing to do with "root users" -- your regular user account by definition was not a "root user", and you said running programs as root (with sudo) worked fine.


Gesture to minimize window in Gnome Shell

You could try Easystroke. Easystroke allows users to create custom mouse gestures so you could simply make a gesture to minimize all windows or the current window or whatever. This blog post talks a little about it. There is also more information from the tips/tricks and documentation from the developer.


Lenovo Yoga 900 Internal Microphone Not Working on Ubuntu 18.04

I had the same issue with yoga 920 and ubuntu 18.04, the mic was working on 16.04 but stopped after the upgrade.

I'm not entirely sure how I managed to resolve it though.

Firstly I added load-module module-echo-cancel to the end of /etc/pulse/default.pa and restarted pulseaudio, for no reason really, simply wanted to check whether it would help or not. It didn't.

Then I booted into my windows partition and disabled Dolby through Lenovo Vantage, the on/off switch can be found in the hardware/audio tab.

After I booted back into ubuntu the mic started working. Although maybe the pulseaudio+reboot fixed the mic, and not the Dolby disabling. Later I enabled Dolby back and the mic was still working in ubuntu.


On an XPS 13 9380, first enable the media keys by pressing Fn+Esc.
Afterwards Alt+PrtScr will trigger SysRq.

Another option is to Fn+R+Alt but you'll have to release Fn to trigger a command key.


Why does 11.10 wait for network config when everything is static?

Remove the "auto" lines (comment them out if you're not confident). This is a bug, either #839595, “failsafe.conf's 30 second time out is too low” or #845914, “Failsafe boot delay causes a real delay on every boot” (now marked as a dupe of #847782, “installer writes a permanent ethernet entry in interfaces file”). That edit fixes it.


To autostart JDownloader together with a specific user’s session, create this script in your preferred users home (hereafter referred to as /home/username)

nano /home/username/jdownloader2/startjd2.sh

with the JDownloader init command in it:

#!/bin/sh

java -jar /home/username/jdownloader2/JDownloader.jar

Set the correct permissions afterwards:

chmod 755 /home/username/jdownloader2/startjd2.sh

Then edit

nano /home/username/.config/lxsession/LXDE/autostart

and put this line into this usually empty file:

@/home/username/jdownloader2/startjd2.sh

If you want a desktop icon press

lxshortcut -o /home/username/Desktop/JDownloader.desktop

and tell the wizard the path to your startjd2.sh


Reinstalling all installed debs with a command

You first need to understand a few things.

First, apt-get / dpkg / apt , by default, will not overwrite configuration files if they already exist.

You can over ride this behavior.

sudo apt-get -o Dpkg::Options::="--force-overwrite" install python-profiler

see : Force apt-get to overwrite file installed by another package

This is one of the reasons why, unlike other OS perhaps, re-installing a package typically will not fix a problem.

You can purge and re-install a package, as purge will remove config files.

But even a purge will not remove config files in your home directory.

Second, unless you manually edited a system file, reinstalling will not help as you did not really change anything. This is because user specific settings are stored in $HOME .

Third, custom configuration files, for your keyboard or other settings etc, reside in your home directory. These user files will not change by re-installing a package, you need to delete or edit the files manually.

Fourth, nothing in the question you linked suggested re-installing your entire system would fix your problem.

To debug your problem, identify your hardware and check your logs for errors.


Skype on HP ENVY m6 Sleekbook has no sound

Have you checked out this page on sorting out Skype audio problems?


To understand how it move folders you may need to understand a bit about file system under linux.  Every files and folders are stored as part of a data structure called an "inode".  Each file has an inode number, so does folders.

To view the inode of your folder, use the command ls -ial foldername.  The first column shows the inode number of the file.  For each folder there are two unique names . and .., representing the directory of its own, and the parent directory respectively.

You can try doing an experiment to move a directory (say, /home/me/source) with sub-directories and files to another directory (e.g. /home/me/somewhere/else).  The inode number of /home/me/source and all its contents remains the same before and after moving.  The only difference is the inode number of .., which originally shares the inode number of /home/me and now becomes the inode number of /home/me/somewhere/else.  In simple wording, Linux update the link to directory source and then it's done.

The contents on the hard disk are not modified anyway, only the inode index is updated when the folder is moved.  This is, of course, not the case if you move the folder to a different physical location.


Older Intel graphics adapters may need UXA acceleration instead of the default. The work-around is to change the Xorg acceleration method to UXA.

Edit (or create) as root or sudo a file named /etc/X11/xorg.conf as follows (there should be a tab before each line except the first and the last):

Section "Device"
        Identifier "Intel Graphics"
        Driver "intel"
        Option "AccelMethod" "uxa"
EndSection

Restart (reboot, restart your display manager, whatever). Problem solved.


Re-directing applications to virtual sinks

I finally got it to work

I was making the simple mistake of forgetting about the word .monitor in source parameter

It looks like this

###Create two virtual sinks named VoIP and Games
pactl load-module module-null-sink sink_name=VoIP sink_properties=device.description="Virtual_Sink"
pactl load-module module-null-sink sink_name=Games sink_properties=device.description="Virtual_Sink_2"

###Redirect sound from them into output
###In my case alsa_output.pci-0000_00_1b.0.analog-stereo
pactl load-module module-loopback source=VoIP.monitor sink=alsa_output.pci-0000_00_1b.0.analog-stereo latency_msec=200
pactl load-module module-loopback source=Games.monitor sink=alsa_output.pci-0000_00_1b.0.analog-stereo latency_msec=50

and then run any application with PULSE_SINK=Games or PULSE_SINK=VoIP environmental variables.


How to Recover Permanently Deleted File from NTFS Partition?

I suggest you read through this wiki post on data recovery:

https://help.ubuntu.com/community/DataRecovery#Testdisk

and I suggest you try to recover your data using testdisk.


When using Focusrite USB Interfaces, it can sometimes be the unit acting up.

To fix this, boot into windows and use the Mix Control app to reset the settings to factory settings.


For the Captive Portal auto-login problem (not the network disconnecting issue)...

Coova, a captive portal implemtnation has some client tools: CoovaFX is a Firefox extension for doing login, and CoovaAX is an Android app. These use WISPr for authentication.

There are also some other Android applications for the same purpose; some are specific to certain providers, others use a particular standard.

I suspect that in most cases where a captive portal is redirecting requests to its login screen, these standards are not supported, however if they are then automating the login should be easier than with a non-standard browser screen.

There are some very basic scripts by Laurent Gighonis, but they don't look very comprehensive and probably only cover a few providers...


Install wv-dial. First download the wv-dial from net.
Then go to terminal and simple give the following codes. sudo apt-get updateIt will take some time for processing. then to install the wvdial give this code: sudo apt-get install wv-dial  this will install the router. then simply restart the computer with the connection on. Starting of ubuntu it will configure the network.

To on the net go to terminal, go to root , then sudo pon dsl-provider. it will switch on the connection. To see the log give sudo plog. To switch off the connection give sudo poff.


Can't login to GUI in 16.04 with xf86EnableOPorts xserv failure

The problem was fixed by doing the following:

  Press CTRL+ALT+F1 and log in via the terminal then run:

  sudo chown -R $USER:$USER $HOME

  Then press CTRL+ALT+F7 and log in

for example:

sudo chown -R popeye:popeye /home/popeye/

This comes from:

https://answers.launchpad.net/ubuntu/+source/lightdm/+question/197479

Post #2 by actionparsnip (andrew-woodhead666)

Thank you Jyves.  Your answer and variants of it where also mentioned at that forum post. Thankfully the answer above turned out to be cleaner in the long run and let me keep all my original files without my having to laboriously sort through them and copy them to a new user profile.

So it appears that this question is closed.


Nvidia (Bumblebee) failed to load after install latest Intel driver

New Intel driver is the problem. Nvidia doesn't support new drm environment. To remove the new driver run the following commands:

sudo apt-get purge i915-3.15-3.13-dkms
sudo apt-get install --reinstall xserver-xorg-video-intel libgl1-mesa-glx libgl1-mesa-dri xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg

Then restart the system. optirun should work after restart the system. If not then run the following commands and restart again

sudo apt-get install --reinstall nvidia-340
sudo dpkg-reconfigure bbswitch-dkms


You could try this for example. Pavucontrol is a gui for pulseaudio that gives you the option to choose which output system to use.
Good luck!


java.lang.OutOfMemoryError: unable to create new native thread : after upgrading from Ubuntu 14.04 to Ubuntu 16.04

We had identical problem and the root-cause seemed to be that logind.conf does not support "infinity". Instead you should use exact limit (such as UserTasksMax=32000).

It seems to be fixed in the latest version (https://github.com/systemd/systemd/issues/3833), but at least our Ubuntu 16.04 had the version which didn't support infinity.


The PPA that you are trying to upgrade packages from (found here) hasn't been updated for 5 years. It does not provide packages for your 14.04 version of Ubuntu.

You should get rid of the PPA, e.g. by installing ppa-purge and doing

sudo ppa-purge ppa:psyke83/ppa

Then do sudo apt-get update.

Then, sudo apt-get upgrade will remove the packages from this PPA, and install your new kernel.


Since you want a combination of two keystrokes, xcape may be a solution. the Ubuntu manpage explains how to do it.
So a command like this

xcape -e 'Caps_Lock=Super|A'

might be a solution.
/usr/include/X11/keysymdef.h includes all the relevant keystroke definitions


What to do when something mess up my screen resolution?

xrandr --auto

resets your resolution to the standard. This will set the resolution for the first monitor, so if you use an external one or have any other setup you'll additionally need to specify the output using the --output option.


Sadly the Shumway project has been retired (click show info next to Product: Firefox Graveyard). So the following answer is only here now for historical reference purposes, do not follow it for practical use.

As it says on the page:

  Available in Nightly on Desktop for all platforms, preff'd off Will
  not ride the trains for now, so not available on Aurora, Beta, and
  Release

And the section has the title of Current Shumway In Nightly thus meaning that Shumway can only be enabled in this way (by going to about:config and then changing the option shumway.disabled) in the Firefox Nightly builds, this does not include the current stable release (what you are running), nor does it include Beta, or Aurora.

So in order to install it on one of these which is not the Firefox Nightly, you will have to go to the Shumway Github page here and then go down the page until you get to the Getting Started section, in this section there are two sub-sections, go to the Extension one and click on the link to install Shumway in your browser.

Note: As Shumway is still under development the method of installation may change, so this answer will be updated accordingly. If there has been an update to the installation method and this answer has not been updated, please comment.


How can I scrub through a video for saving screengrabs frame by frame?

For actual scrubbing through a video, i.e. advancing frame by frame, this can be done with vlc. The feature can be accessed by pressing the 'e' key or using the button marked 'Frame by Frame' under View --> Advanced controls, then using the screenshot capabilities of vlc which by default can be activated by using  Shift+s. As far as I can see this will not run backwards though.

There are a few other non-scrubbing options with MPlayer and FFmpeg. MPlayer is capable of outputting images either automatically or manually from a video clip and perhaps this would be helpful. Have a look here:

Tip 5: Taking screenshots

FFmpeg has similar capabilities but with vastly more options:

Create a thumbnail image every X seconds of the video

How to take multiple screenshots to an image (tile, mosaic)

But certainly the only genuine scrubbing option, and that forwards only, was with vlc...


Cannot update system - stuck on zramswap-enabler

When the process stalls at "Preparing to replace zramswap-enabler", open another terminal and try running "sudo start zramswap".


How does Ubuntu partition the disk when we choose "Erase disk and install Ubuntu" during installation?

When you choose "Erase disk and install Ubuntu" there is nothing to choose; the installer will automatically allocate all disk space on the selected disk to Ubuntu and install nothing on any other disks except for the selected disk.
When installing in legacy (aka MBR) mode:

Older versions, up to and including 16.04, will create a massive primary partition formatted ext4 mounted on / and a logical partition to be used as swap space sized in accordance with the amount of RAM.

Newer versions will dispense with the swap partition; they will create just one partition covering all the disk space and will allocate a swap file just as Windows does.

When installing in UEFI mode an EFI system partition will be created, in accordance with UEFI requirements; it will be mounted as /boot/efi.

If you want to control the allocation of disk space, for example because you want a separate partition for /home, you should create the partitions using gparted (if installing a desktop system) or parted / fdisk (if installing a server), optionally configure LUKS and LVM, then in the installer choose Something Else and allocate partitions or logical volumes to mount points explicitly.


How to change Ctrl+Alt+F7 in Ubuntu 18.04

I found it! I found it!
(I copied my answer to this chat too)

There is a simple command line to disable the shortcuts Ctrl+Alt+F [1-7].
I don't know which versions of ubuntu support this command line, but on Ubuntu 18.10, it seems to work well.

setxkbmap -option srvrkeys:none

But the command line only seems to work when it is executed after the login: After each lock/logout, the shorcuts Ctrl+Alt+F [1-7]. Are enabled again.
I tried to put this line in "Startup Application" and also in ".profile". Either way, it doesn't work.

So I created a new shortcut that executes this command by pressing (for example) Super+F7. And it works fine!
I just must do Super+F7 after each login, and if after I do Ctrl+Alt+F7 there isn't any black screens!

Does someone know a better way to run a command line after the login?
Am I obliged to do Super+F7 after each login?


Discrepancy with the output of `ls -al` and `getfacl`

What you see with ls is the mask entry of the ACL. From man setfacl, the mask entry seems to reflect the maximum possible permissions that can be set on an ACL entry.

  the permissions of the mask entry are further adjusted to include the union of all permissions affected by the mask entry

The access rights you see in your example with ls for the default group root:rwx are wrong as the effective rights are now controlled by the ACLs.


Saving generated passwords to a .txt file

Using I/O Redirection

your_script 1>> pwd_list

to redirect and append stdout to file pwd_list.

E.G.

#!/bin/bash
random-string()
{
    tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w "${1:-8}" | head -n 1
}

if [ -f out_pwd ]; then
   rm out_pwd
fi

COUNTER=0
while [ "$COUNTER" -le 10 ]; do
    random-string "$@" 1>> pwd_list
done

exit 0

and simply start the script, the output into the file pwd_list is part of the script

or use this script, to redirect the output in the file pwd_list when you start the script

#!/bin/bash
random-string()
{
    tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w "${1:-8}" | head -n 1
}

COUNTER=0
while [ "$COUNTER" -le 10 ]; do
    random-string "$@"
done

exit 0

and start the script with

script_name 1>> pwd_list


Start tmux with multiple tabs detached under a user on boot

Either modify the command to add new-window:
/usr/bin/tmux new-session -s mytab -d \; new-window

Or create a .tmux.conf with your commands - tmux will run each command when it starts:
new-session -smytab -d
new-window

And change your command to:
/usr/bin/tmux start

Or create a separate config with the same and start tmux with:
/usr/bin/tmux source /path/to/myconfig


The mouse is not supported by your current kernel.
If you are fine with changing to a newer kernel run this command:

sudo apt-get install linux-image-generic-lts-saucy

If you are not fine with that, aka, you are getting other issues you can not mange to solve with eg. graphic drivers. Is it still possible to get the mouse working with backporting of the driver module.

PS. You will need to reboot after the installation of the new kernel.


You can install flutter by snap. Open Terminal and execute below command.
sudo snap install flutter --classic


How do I lock a file on linux without compressing or encrypting

If other user doesn't have elevated privileges - such as access to root account or sudo, then You can set file permissions:

chmod o-r path_to_file_or_directory # (with -R to do it recursively)

If other user has possibility of logging into Your account then this won't work.


Precise Pangolin (12.04) trying to install Trusty Tahr (14.04) updates?

Those packages are not from the Trusty archive. They are from the Precise archive. The kernel packages are backported from the newer releases, for hardware enablement. If you installed from a point release of Precise (12.04.5 for example), then you likely are already using such a kernel.


Using a virtual machine for such things can at times become complicated. Easiest approach is to use bridged networking for the server.

See Which type of VirtualBox networking should I use?

You can use NAT, and there is a graphical tool to configure NAT in the advanced options under NAT. Using NAT is also known as port forwarding, so the configuration is similar to how one would confiugre a router. Here teh virtualbox network configuration is using NAT and port forwarding your services.

  To configure Port Forwarding you can use the graphical Port Forwarding
  editor which can be found in the Network Settings dialog for Network
  Adaptors configured to use NAT. Here you can map host ports to guest
  ports to allow network traffic to be routed to a specific port in the
  guest.

see https://www.virtualbox.org/manual/ch06.html#network_nat

Graphical tutorial here : http://ask.xmodulo.com/access-nat-guest-from-host-virtualbox.html

NOTE: Link given as I could not see how to copy-paste the graphical pictures here as there is not a direct link to pics.

General pics


How to transfer a file between two AWS different servers using pem files, while on a local system

You can create ssh key pair (private key /home/ubuntu/id_rsa and public key /home/ubuntu/id_rsa.pub) on remote1 server than append content of public key to /home/ubuntu/.ssh/authorized_keys on remote2 server.
After that you can copy file without remote.pem file
ubuntu@server1:~$ scp /var/www/html/file.zip ubuntu@server2:/var/www/html

Upd:
From local system
ssh -i remote1.pem ubuntu@1.1.1.1 'scp /var/www/html/file.zip ubuntu@server2:/var/www/html'


You can use the --ips switch.

To quote the manual:

  --ips

  Print  ips  instead  of  hostnames. With --lookup, canonicalizes based
  on stored IP, if available, rather than stored hostname.


How do I install the latest version of EMACS and pick the appropriate UI?

If you must chase the very latest version, then you can always get the source and compile it yourself.  Unless you know of some killer new feature that emacs24 has though, I'd not waste the time and just use the one that ships with Ubuntu.

There's no downsides to calling it directly, but the emacs way is to start up one emacs session when you log on and never close it.  You can export EDITOR=emacsclient and run M-x server-start in emacs and things like crontab -e will prompt emacs to open the file in the other window.  When you are done, you hit C-x C-# to unblock the emacsclient.

If you prefer to keep the editing in the terminal window ( of course, you can just run M-x ansi-term and do your terminal work inside an emacs buffer ), you can add -t to the emacsclient command and it will open a new emacs frame on that terminal so you can do your editing in the terminal, but still have access to all of your other buffers, the kill ring, etc.


How do I tunnel and browse the server webpage on my machine?

Easy.  As you said you need a tunnel.  We'll make one.

ssh -L 8080:bast01:8080 myuser@bast02

You log in normally, and you could use anything you normally use in an ssh session.  However, it did something else.  It told ssh that you want a port on your local machine, namely 8080 (that's the first 8080), to tunnel to bast01 on port 8080, using bast02 (the one you are logging in to).
Do note, that your own machine does not need to be able to resolve (DNS) the name bast01, the name must be resolvable by bast02.   Obviously bast02 needs to be resolvable from your desktop.

At this point, you point your browser to:
http://localhost:8080
Voilà... You now see the login page (or whatever) that is hosted on port 8080 of bast01.

Now, bast01 might use vhosts, and in that case your browser will sent the hostname it wants to the server.  In this case, the server will receive "localhost" as a name and it might not know what to do with it.  If that's the case, temporary edit your hosts file (on the machine where you issue the ssh command, typically your desktop) and add:

127.0.01 hystrix

(or whatever name you need to use)


Laptop slow performance on battery power

What you are describing sounds more like a hardware problem. i Googled your laptop model and apparently these are known for having charging issues. There should be a pin that you can straighten inside the charger end that you plug into the laptop. You obviously want to unplug the charger first though. Here's a thread on HP's website about other people with the same problem:

HP Forum on charging problems

and another:

Hp forum post on your model

Finally, try doing stuff like putting upward pressure on the charger while plugged into the laptop and see if it suddenly starts charging. There isnt a software setting that Im aware of in Ubuntu that would prevent a charger from working intermittently.


Can I install ubuntu 12.04 lts using ubuntu 14.04 lts trail version?

You need to clean-install Ubuntu 12.04 LTS. You can use a USB to install 12.04 as well. I have tried it myself and its all fine


Anjuta is just an IDE. I assume you are looking for something like that:

#include <stdio.h>

int main(void)
{
    printf("Hello, world!\n");
    return 0;
}

Save this into a file called helloworld.c and compile it. It should run.


Any time you use dd (a.k.a. disk destroyer) there is a potential for messing up your data. dd has no safeguards for accidentally writing your new drive over the old drive. The only thing keeping it working right is if you're VERY careful with typing the commands correctly and not mixing up the source and destinations. if= and of= are only one small mistyped keystroke away from each other!

The other problem is that dd is slow and puts unnecessary wear on your target SSD. Most partitions are typically no where near 100% utilization. Using dd to copy a partition with lots of free space ends up copying EVERY BYTE of said partition, even the bytes that aren't actually containing any allocated data!

Here's what I would do if it were my system:

Take a screenshot of your old SSD's partition table for reference later when we set up your new SSD's partition table.
Connect the new SSD to the computer and disconnect the old SSD. Keeping the old SSD disconnected makes it impossible to destroy any of our precious data while we do potentially destructive work.
Boot from the Ubuntu installation USB thumb drive in Linux live mode. Make sure your BIOS always boots the thumbdrive in legacy/MBR mode instead of UEFI mode, since it sounds like your old system is using MBR. If my assumption is invalid, make sure your BIOS boots the thumbdrive in UEFI mode instead. Mixing things up would make it a lot harder to get grub to install properly later on.
Use gparted to set up your new SSD with the desired partition table and format the filesystems. Try to keep everything the same  as your old SSD's partition table (aside from partition sizes and UUID's). Don't forget to mark the / root filesystem as active / bootable, just like your old SSD.
Now that all the dangerous partition editing stuff is done, you can safely shutdown and add the old SSD connected to the computer.
Boot the Linux live USB thumb drive again with both drives connected this time. Do not boot from the old SSD (we need to keep that system inactive to make a good clean copy of it).
Once booted, open a terminal and start working through these commands to copy the data from your old SSD to your new SSD. Unlike using dd, the cp command is far more error-proof because you can't destroy anything copying an empty file system over top of your old file system -- there is nothing copied in that case! Plus, we can mount the old SSD in "read-only" mode to avoid any possibility of modifying the old SSD.

mkdir oldroot newroot oldhome newhome
sudo mount -o ro /dev/sda1 oldroot
sudo mount -o ro /dev/sda2 oldhome
ls oldroot
ls oldhome

Verify that you can see your old data. If all you see is an empty file system, perhaps you've got the wrong "/dev/sdXX" device...

sudo mount -o noatime /dev/sdc1 newroot
sudo mount -o noatime /dev/sdc2 newhome
ls newroot
ls newhome

Verify that all you see is an empty file system as your destination. If everything is good, issue the following commands to copy all of your files while preserving all the permissions/ownership/SELinux context settings:

sudo cp -Rfax oldroot/* newroot/
sudo cp -Rfax oldhome/* newhome/

Once that's done, unmount everything and sync cached writes to persistent storage:

sudo umount oldroot
sudo umount oldhome
sudo umount newroot
sudo umount newhome
sync

Now you can safely shutdown and disconnect the old SSD so that we can't possibly destroy anything on it while we work through making the new SSD bootable.
Boot the computer using the USB thumb drive in Linux live mode with only the new SSD connected. Open a terminal and start working through these commands:

mkdir newroot
sudo mount -o noatime /dev/sda1 newroot
sudo chroot newroot /bin/bash
mount -t devtmpfs udev /dev
mount -t proc proc /proc
mount -t sysfs sysfs /sys
nano -w /etc/fstab

Now you need to modify the fstab file to match the UUID numbers to whatever they are on your new SSD. You can open gparted to look at your partition table and figure out what the new UUID's are. When done, hit CTRL-X and save the fstab changes to disk.

update-grub
grub-install /dev/sda

If everything is working right, this should configure grub and install it into your new SSD's MBR. After grub is installed, you have to unmount all the stuff we previously mounted from within the chroot environment before exiting. Otherwise, Ubuntu will have a hard time unmounting the Linux partition cleanly when you shutdown.

umount /sys
umount /proc
umount /dev
exit
sudo umount newroot
sync

And there you have it! Hopefully your new SSD is bootable and everything is good now.


Notifications wrongly positioned in my KDE+i3wm setup

As I have written in the Update not killing the window titled Desktop - Plasma in the i3 config fixed this issue.


php-mysql is a meta package that causes the installation of the real package with the binary. In Ubuntu 18.04, this is in php7.2-mysql. You can check the installed packages.

dpkg -l |grep mysql |grep php
ii  php-mysql                                  1:7.2+60ubuntu1                             all          MySQL module for PHP [default]
ii  php7.2-mysql                               7.2.5-0ubuntu0.18.04.1                      amd64        MySQL module for PHP

And using whereis

whereis php7.2-mysql
php7: /usr/bin/php7.2 /usr/share/php7.2-sqlite3 /usr/share/php7.2-ldap /usr/share/php7.2-common /usr/share/php7.2-mbstring /usr/share/php7.2-readline /usr/share/php7.2-pgsql /usr/share/php7.2-opcache /usr/share/php7.2-mysql /usr/share/php7.2-xml /usr/share/php7.2-json

You can learn more about meta-packages from the MetaPackages Wiki Docs


HP Envy dv6t-7300: Disabled WiFi through button and can't enable it anymore

I have a HP Pavilion DV6 and had a similar problem - if the laptop was switched off with the wifi off (amber light) then next time the computer is started the button and wifi does not work (the light changes colour but to no effect). Making sure the light was white when switching the laptop off, the wifi and switch would then work again the next time the laptop was started up. Does this work for you? Or does the light not even change anymore?


LAMP mysqli and PDO is connected but mysql is not connecting

The mysql_connect() function was deprecated from PHP v5.5.

I guess you have some old codebase written in PHP 5.4 or earlier which you want to run.

Either you'll have to install PHP v5.4 or earlier or change all your mysql queries to mysqli.


Wifi card becomes unreadable after laptop enters sleep mode in Ubuntu 18.04

You need to install the 'firmware-realtek' package. Right now it's getting the firmware blob from Windows. It hangs on to it until Linux goes to sleep. When it wakes up, it can't reload the firmware, because it isn't there.


Some cursory web searching shows that IPSEC uses port 500.  If indeed the client is trying to listen on port 500, you may run into issues because on Linux system you need elevated privileges to listen on ports <1024.


Reading (well, searching) man wireshark ( from the SEE ALSO of man tshark) led me to

   Wireshark can read / import the following file formats:
...
·   Linux Bluez Bluetooth stack hcidump -w traces

and man hcidump shows me:

NAME

       hcidump - Parse HCI data

SYNOPSIS

       hcidump [-h]
       hcidump [option [option...]] [filter]

DESCRIPTION

       hcidump  reads raw HCI data coming from and going to a Bluetooth device
       (which can be specified with  the  option  -i,  default  is  the  first
       available  one)  and  prints  to  screen commands, events and data in a
       human-readable form. Optionally, the dump can  be  written  to  a  file
       rather  than  parsed,  and  the dump file can be parsed in a subsequent
       moment.


/home is on its own disk. Can I move that disk to a new install?

Yes, you can.  Just don't forget to NOT format it, and you'll need to mount it as /home/ in the new OS.  Just add a line to /etc/fstab.


Acer Nitro 5 Linux - HDMI output for external monitor

Thanks. I have solved the issue by upgrading to nvidia driver to 430 and prime select. (For some reason it was not showing as available earlier). Although there was a boot up problem showing again (with no icons but screen and cursor) and after repeatedly failing nomodeset in the grub it somehow worked in the next boot without nomodeset.


How to make apache2 serve HTTPS on port 443 and non-default ports?

Everything works fine now with the described settings. The behaviour might be because of firefox cache loading nonsense.


Not showing amazon echo dot as output or input device in ubuntu sound setting after connecting through bluetooth

After lot of googling and trying out many commands, finally this  solved my issue
Reinstalling bluetooth modules and rebooting worked out for me.
sudo apt install bluetooth pulseaudio-module-bluetooth

 wget https://github.com/winterheart/broadcom-bt-firmware/blob/master/brcm/BCM43142A0-0a5c-21d7.hcd

sudo cp BCM43142A0-0a5c-21d7.hcd /lib/firmware/brcm/BCM43142A0-0a5c-21d7.hcd

 sudo modprobe -r btusb

 sudo modprobe btusb


Upgrading the BIOS on Lenovo IdeaPad B50-70 Without Windows

You can try to make a live windows session inside a usb drive. But even for that u might need a windows pc/laptop. Not sure if u can run that software inside ubuntu.

http://lifehacker.com/how-to-run-a-portable-version-of-windows-from-a-usb-dri-1565509124


Check your kernal version by running uname -r

If the version is 5.3.x or higher, follow the below steps:

Reboot your system. AT GRUB, choose Ubuntu and press E. You will be taken to command line options.
Locate the line beginning with Linux. Add the following parameter at the end of the line snd_hda_intel.dmic_detect=0
Press F10 to reboot.

After verifying this has indeed solved your sound issue, you can make this change permanently by performing the below steps

Run sudo gedit /etc/default/grub from terminal.
Locate the line beginning with GRUB_CMDLINE_LINUX_DEFAULT and append the above parameter to it. GRUB_CMDLINE_LINUX_DEFAULT="quiet splash snd_hda_intel.dmic_detect=0"
Save and Close gedit.
Run sudo grub-mkconfig -o /boot/grub/grub.cfg
Reboot.

Please check the below question:
No Sound (Dummy Output) error Ubuntu 19.10


Did you Install two versions of wine/wine-mono?

I've had the same problem, did the following steps:

Uninstall all previous packages starting with wine using

sudo apt-get remove 'wine*'

Add apt-repository using

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

Install Wine 1.7 from repository:

sudo apt-get update && sudo apt-get install wine1.7

Now run the command:

winetricks dotnet20

To download required file and install it correctly.


Use a GameCube Controller with Dolphin Emulator 14.04

Follow this guide: https://wiki.dolphin-emu.org/index.php?title=How_to_use_the_Official_GameCube_Controller_Adapter_for_Wii_U_in_Dolphin

The Linux specific instructions can be found here: https://wiki.dolphin-emu.org/index.php?title=How_to_use_the_Official_GameCube_Controller_Adapter_for_Wii_U_in_Dolphin#Linux

Also note that the adapter will need to be set to Wii U mode beforehand even if you are using it on a PC.