How to install sane graphics drivers for Nvidia Optimus hardware on *Ubuntu 16.04?

What I did
1: First I ran lspci | grep VGA to check which Nvidia graphics card/chipset my computer is using.
2: Then I went to the nvidia driver website to check which graphics driver version I should install for Linux x86_64.
3: I added the graphics drivers ppa to my system sudo apt-add-repository ppa:graphics-drivers/ppa
4: Then sudo apt-get update
5: Then sudo apt-get install nvidia-367 but you your system it will be a different driver version depending on your result from Step 2!
... will now reboot to check if it worked...
Did it work?
Probably. I can login, but I needed to change my dual screen configuration again. Now that's done it seems to work alright. If anyone has any suggestion as to how I can check the performance of my system please leave a comment.
Edit: glxgears reports 13000 FPS. Not sure what it would be without the Nvidia driver.
Update - No it doesn't work!
I have a rather irritating problem which has rendered my system unusable. When browsing files, sometimes when changing directory there is a ~1 second delay before the window updates - this makes it difficult to browse files on the system quickly.
In addition, when typing in the terminal, there is an occasional delay/lag which prevents one from running commands efficiently and quickly.
Hence my system is "unusable".
What I am trying now.
0: Fresh install of xubuntu 16.04. apt-get update / upgrade
1: sudo apt-get install intel-microcode
2: Reboot
3: sudo apt-add-repository ppa:/graphics-drivers/ppa
4: sudo apt-get install nvidia-364 (not 367)
Just checked and laptop BIOS appears to have secure boot disabled.
5: Reboot
6: glxgears -info | grep "GL_" reports that glxgears is now running using Nvidia card
7: glxinfo | grep "OpenGL version" Also suggests nvidia card is functioning.
8: ... will update if graphics problems resurface...
Updates: Noticed graphics problems when switching into/out of screensaver. This was quite annoying so ran sudo apt-get remove nvidia-*, rebooted, then sudo apt-get install nvidia-361... hopefully this driver will be better...
nvidia-361 appears to have the same problem of screen tearing when scrolling with the file manager, as did driver version nvidia-367.
Will try nvidia-361-updates... Not hopeful however.
361 still has problems with file manager scrolling and tearing... Going to try 352
I have noticed that attempting to install version 352 causes apt-get to try and install nvidia-361 as an additional package... Not sure what has caused this or if I just didn't notice before...
Tried nvidia 340... Crashed when I tried to login, so removed all nvidia packages. This appears to be the correct method, however none of these drivers seem to play nicely with my system.

I came back to this some weeks later
... and followed this guide: http://lenovolinux.blogspot.co.uk/2016/05/bumblebee-on-lenovo-t440p-nvidia-gt.html?m=1
I was getting an error with optirun but with the additional command sudo apt-get remove xserver-xorg-legacy it seemed to work, however performance doesn't seem to be as good as it used to be with 14.04!


Easy way to switch network proxy settings?

One way would be to place the Network Proxy app in your gnome panel. Just left-click and drag System->Preferences->Network Proxy and drop it on your gnome panel somewhere. Create proxy profiles in the Network Proxy application by clicking "Location->New Location" and defining each proxy profile (each of them will have a unique name in the Location drop down menu). It should then take very few clicks to switch between network proxies.


The reason that your file is shown as a Winrar file, because you have ISO files associated with Winrar, or you don't have an ISO program.

All you have to do is run Universal USB installer, choose Ubuntu 32bit from the drop down list, and then browse to the downloaded file, and choose it.

Once you choose it, you will notice that its an ISO file, as seen in step 2.


My keyboard only works in the last-opened window

I found out what was wrong. I needed to change this setting: Tweak Tools > Windows > Window Action Key to Alt. For some reason, this setting was blank and it was causing all my problems.


Is it possible to add middle click option to close tabs?

Middle-click is used for Paste in Ubuntu. All you have to do to Copy is select any text and then Middle-click to Paste.

There must be a way to change that behavior. Perhaps you could even do it without going into the source code and re-compiling.

Do you really want give up the middle click paste?! Middle-click paste is one of the greatest conveniences of X desktops. It saves me a lot of time and I believe it kept me from getting the Carpal tunnel syndrome.

While tiring to figure how to get the closing-tabs-by-middle-clinking behavior, closing tabs one can close tabs by pressing Ctrl-w.

Edit: Sorry, I didn't realize that the question author was talking about middle-clicking ON the tabs to close them. Both functionalities can co-exist.


There is no single shortcut for that. But on Ubuntu with Unity desktop, you have an alternative - Unity Hud.

Pressing Alt shows search menu, where you can search for specific menu entries you want ( from File, Edit, View, and others). Just search for Preferences, and you'll be presented with an option for that (if the app itself has Preferences menu; if developers didn't put it there, well . . .there's not much you can do about that)


How can two people play Minecraft on one laptop with external monitor attached?

I can not give you step-by-step instructions, but the magic words you're looking for is "multiseat linux" - if you search internet you'll find quite a few tutorials which describe how to configure a system to work in multi-seat mode.

A quick search returned this: Build a Six-Headed, Six-User Linux System

Here's a wiki page from Ubuntu documentation: MultiseatX

Also, Ask Ubuntu (this site ) has a few questions tagged multiseat - looking through them will provide more useful pointers.

The task is not for a beginner user, but it's a great opportunity to learn new stuff :).

Once you have your multi-seat machine set up, you can install Minecraft server and then run two Minecraft clients connecting to that server - that part is easy.

UPDATE: After some reading it looks like the weak link of the whole plan is the fact that you're using a laptop, which implies a single video chip with two outputs. Most articles suggest that configuring two X servers to run on a a single video card is more problematic than running them on separate cards and requires some trickery like using nested X servers etc. Which lead me to thinking that you don't really need two separate X sessions - all you need is to open 2 Minecraft instances and somehow bind a keyboard and a mouse to each of them. So I searched for different keywords and found this question: How to lock one mouse/keyboard pair to each screen? - the accepted answer describes an interesting approach with running 2 separate virtual machines in VMWare (I think VirtualBox may work too) and configuring USB filters for each of the VMs to only accept input from one keyboard and mouse. The OP also states that the solution worked for him. As they state, the soluton does not even require multiple monitors - you can just open multiple VMs and put them side by side on the same screen.


the answer to my own question:
1. the hanging / freezing of the system was caused by unstable firmware of the crucial SSD. Updating to the newest firmware solved the freezing problem. (never noticed this under microsoft windows OS)
2. for stability of the system it was necessary to raise the memory voltage from 1.35 to 1.55 of my q2900 motherboard. I also switched the intel cpu c1, c3 c7 cpu-power-saving-setting in the bios.

Although dmsg still has a few errors during boot, the system is stable: i.e. I can watch movies without having to reset my computer.


Huge difference beetween 2 versions of ubuntu 12.04

i encountered the same difference, when i installed the newest version for a friend.
it turns out, that there is a package, that you can install as an update by your own, that is not installed automatically for yout with any sort of update-procedure.

  sudo apt-get install linux-image-generic-lts-quantal linux-headers-generic-lts-quantal

should do the trick. This also keeps the newly installed kernel 3.5 up to date!

If you encounter problems with samba or proprietary drivers, simply reinstall them...


Can you use Google Suite as an alternative to Zentyal?

Can you get that function for Ubuntu with Google Suite?

JumpCloud is a third-party cross-platform solution that adds to G Suite the capability to serve as a domain controller and enables admins to use their existing G Suite credentials for user access to all of their resources. Maybe JumpCloud is too expensive to use in a non-enterprise scenario.

  If not, can you use Ubuntu Server in the same way as Windows Server?

Zenthyal is a Linux-based replacement for Microsoft Small Business Server and Microsoft Exchange Server based on Ubuntu. Zentyal can also be installed as a "package set" to an already installed version of Ubuntu Server.

As Zentyal comes with a native implementation of the Microsoft Active Directory protocols. It makes it easy to manage the domain and directory services typical to those of a Windows domain. Source


As you clearly mentioned that you dont want to see that error in future , you can use  --allow-unauthenticated flag.

--allow-unauthenticated
       Ignore if packages can't be authenticated and don't prompt about
       it. This is useful for tools like pbuilder. Configuration Item:
       APT::Get::AllowUnauthenticated.

usage:
apt-get --allow-unauthenticated install <package_name>

Hope it helps.
Credit : Ubuntu : apt-get


0% [Connecting to us.archive.ubuntu.com (91.189.91.24)]

The router had a restriction on port 80 for the IP address defined for the Ubuntu laptop which caused Unable to connect to [IP: 91.189.91.23 80] errors when trying to run sudo apt update .


How to enable desktop effects in VMware?

Both VMWare and VirtualBox limit the amount of video-RAM available to the guest OS.  As a result, the guest OS will assume that the machine isn't powerful enough to run desktop effects.  Keep in mind that the graphics card that the guest OS sees is what the emulator tells it.


Bios 'no bootable device' after Ubuntu Server 18.04.2 LTS installation

Finally I've done it!

Solution that worked for me is quite simple but has been not too obvious...
A key to success is converting from GPT to MBR.

Install Ubuntu Server to target Drive the conventional way with it's installer (it did fine with auto partitioning).
Boot from probably any other (Debian type?) Linux Live dist.
You may check:

all drive(s) partitions with sudo fdisk -l or
target Drive prtns. with sudo fdisk -l /dev/sd* (arguments may be reversed, sorry, don't have an access to terminal to make sure) exactly if you know Drive name (sda, sdb, etc.).

(for other info, see fdisk man/help/info - it's straight & simple)
Your target Drive will have most likely a 'bios_grub' prtn. and GPT OS prtn. with label 'Linux'.
Prepare the Partition for converting from GPT to MBR via sudo gdisk /dev/sd** (in my case it was sda2) and separate char commands r g p each followed by enter.
If table output is OK, then w and enter. Convertion may take some time (mine took about 2h+) with no progress UI, but continuous drive led flashing and HDD crackle might help you. As a result you'll get a 'bios_grub' prtn. left (I've decided to let it be, being afraid after so many days of headache of possible problems after deleting 1st prt. and moving 2nd) and a new MBR prtn.

You may check your OS prtn. with fdisk and, if needed, turn on is_bootable flag or change label.

Finally, you may need to install/update GRUB. Comprehensive Instructions here.

For me, with all these steps covered, Ubuntu Server installation finished with a successfull boot.


How to use "xrandr --gamma" for Gnome "Night Light"-like usage?


hwe-support-status does not tell me how to upgrade to 12.04.5

Only because no one else was able to answer this question am I posting a "fix" that worked for me.

I used the same commands to update this server as I did with other servers.

# apt-get install linux-generic-lts-trusty linux-image-generic-lts-trusty

After reboot, everything appears to work fine.

# hwe-support-status
Your Hardware Enablement Stack (HWE) is supported until April 2017.

Nothing unusual being reported in the logs.


alsamixer cannot open mixer: Invalid argument

I had exactly the same problem. Sound worked perfect in Windows 7 but not in Kubuntu 14.04. After many days of searching the Internet and trying all possible advices I have come up with a solution that finally helped me. No need to reinstall Ubuntu.

First I tried to uninstall all ALSA packages and stuff using

sudo apt-get remove --purge alsa-base pulseaudio

and install them again using

sudo apt-get install alsa-base pulseaudio

Still didn't work even after numerous attempts of

sudo alsa force-reload

I read that ALSA has master audio channel muted by defaut after install. So I tried to unmute it using alsamixer command. Unfortunately it didn't work due to Invalid argument error.

The search continued and I stumbled upon a website that has always been in search results but I paid no attention to it. It mentioned some file called .asoundrc. I looked for it and didn't find it on my system. Another website said that you should manually create it (/home/username/.asoundrc for current user only, or /etc/asound.conf if you want to keep these settings for all users) and paste the following content in there:

pcm.!default {
    type hw
    card 0
}

ctl.!default {
    type hw
    card 0
}

After that I was able to open alsamixer. However, the screen was empty and didn't show any volume settings as expected.

Then I opened list of my sound cards with

cat /proc/asound/cards

It turned out that my laptop has two sound cards:

0 [Generic        ]: HDA-Intel - HD-Audio Generic
                     HD-Audio Generic at 0xf0344000 irq 28
1 [Generic_1      ]: HDA-Intel - HD-Audio Generic
                     HD-Audio Generic at 0xf0340000 irq 16

Card 0 was set by default in the beforementioned .asoundrc file. I experimented and changed 0 to 1. Afterwards alsamixer showed the volume settings I needed.

Master channel was muted by default, as ALSA documentation warned. It was indicated by the letters MM above the Master label. I used the ↑ arrow key to increase the volume to 100%. But this wasn't enough. I also had to press the M key to unmute Master channel since increasing the volume does not unmute it automatically (taken from here). After pressing M the MM letters became OO which meant the channel was unmuted.

And the sound has FINALLY appeared! Press Esc to exit alsamixer and enjoy the variety of sounds and music on your Ubuntu, Kubuntu or whatever distro it is that you are using.

Important note: do NOT use sudo alsa force-reload command at all (as some websites suggest) because it mutes the Master channel again and you will have to repeat the unmuting procedure!

P.S.: These were a hard couple of days trying all possible things to be able to hear again. Of course I could give up and switch back to Windows 7 but my advice to you is do not look for easy ways. The Linux way is not for everyone but after completing that challenge it really feels like a hero.


Alright ... after many tears and work I have finally solved my issue, though to say the least it is akin to using a bazooka to deal with a single person. So this solution requires a live USB / live CD of Ubuntu, an internet connection and some patience:

Boot up into live USB, and use testing Ubuntu.
Open up a terminal
cd /
sudo fdisk -l

Now with the output of fdisk, determine the drive your actual ubuntu is on. The output should be something like this of fdisk http://paste.ubuntu.com/5758404/ though note there will be an extra line for the live USB/CD.
Next we'll want to mount this, so the command is sudo mount /dev/<device-ubuntu-is-on> /mnt. Now technically you can do it in a number of places but this is for simplicity.
This is where things get a bit annoying so you'll have to do some binding:

sudo mount --bind /dev/ /mnt/dev/
sudo mount --bind /proc/ /mnt/proc
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /sys/ /mnt/sys

After this ensure you are connected to the internet, and then use the following command, this along with the others giving you access to the internet for the next step.

sudo cp /etc/resolv.conf /mnt/etc/resolv.conf

sudo chroot /mnt
From here on it's pretty clear-cut through apt-get though I’ll go through it anyway.

sudo apt-get update
sudo apt-get dist-upgrade

Now what all this work should have culminated to is the upgrade of the kernel as well as practically all the packages on your hard drive, along with grub2 being updated with the new kernel and whatnot. To ensure proper practices are followed you should unmount the necessary files:

sudo umount /mnt/dev/
sudo umount /mnt/proc/
sudo umount /mnt/dev/pts
sudo umount /mnt/sys/
sudo umount /mnt/

To be honest I didn't see the point, as it was a live disk, though I am sure there is one.

I cannot credit this fix to myself as I am hardly an expert. I got a lot of help from here: http://ubuntuforums.org/showthread.php?t=1439061 and also my friendly channel surfers on the #ubuntu irc channel on freenode.net .

I'll be honest, I don't know if this helps everyone, but it got my Ubuntu working and also updated everything.


The only other way I can think of is to write to their tty directly.  Use the w or who command to find out which tty the user is on, e.g.

w joeuser
 23:10:41 up  1:46,  3 users,  load average: 0.18, 0.16, 0.24
USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT
joeuser  tty7     :0               21:24    1:46m  3:29   0.82s gnome-session -
joeuser  pts/0    :0               23:03    0.00s  0.18s  0.00s w joeuser

..and directly write a message to their tty, e.g.

echo "Hello World" | sudo tee /dev/tty7


How do i efficiently use environment variables?

If you're using bash as your default shell, you can indeed set PROMPT_COMMAND.

You usually find hints or detailed guidelines in the manual pages of a command (online from the bash man page) or by typing man bash for example:

PROMPT_COMMAND
If set, the value is executed as a command prior to issuing each primary prompt.

I did propose another solution using this env var a while ago: Adding a suffix at the end of each shell command.

Ask Ubuntu is a gold mine for who wants to learn and discover more about Linux.


Cannot boot into Linux, low graphics error, cannot boot into terminal

Steps to install Ubuntu is really simple.
After you run the ubuntu installer:
Create a partition in the installation process and make it mount to /boot size maybe 1GB Another partition for the root / or as you like your schema to be.

If you have more than one hard drive (actual hard drive not partition) then you need to make sure that it is on the top of boot order from the BIOS setup, and make sure that it is the hard drive you chose to install the boot loader.

Another important point is: remove the CD/USB that you used to install ubuntu after the installation.


How to download link with unicode using wget?

For wget, you can use:

wget http://www.example.com/файл.zip --restrict-file-names=nocontrol

if your system can handle UTF-8 or other encoding properly.

Finally, if you still have those % symbols left in your downloaded file, you can use Python module urllib.unquote(filename) that will replace %xx escapes by their single-character equivalent.


Desktop File to open terminal with an alternative prompt

This works, but may be less adopted solution.
Troubleshooting
From my observation, there are two issues: $SHELL is being called after export PS1 command, and color bash prompts are improperly coded

Running $SHELL will create a new prompt. This caused whatever done before i.e. export PS1 becomes useless, since the new prompt will overwrite the earlier ones.

Another issue is probably some typos. I couldn't find any reason for leaving the one-sided square bracket [ being opened.

This HOWTO noted that it should be enclosed.

As mentioned before, non-printing escape sequences have to be enclosed in \[\033[ and \]. For colour escape sequences, they should also be followed by a lowercase m.

The workaround
Use separate .bashrc file per different PS1 configuration. Then, run bash that calls another bash with --init-file option to run prompt using the separate .bashrc file.
Follow the steps below.

Create an empty file with different name i.e. .bashrc2 in Home directory.

Open the file in a text editor, copy and paste the following (revised).
 export PS1="\[\033[0;32m\](\$(date +%H:%M:%S)) \W$ \[\033[0m\]"

Save and close the file.

Create another empty file with different name i.e. shortcut2.desktop on Desktop.

Open the file in a text editor, copy and paste the following.
 [Desktop Entry]
 Version=1.0
 Name=Terminal 2
 Comment=Open Terminal with .bashrc2
 Exec=bash -c 'bash --init-file $HOME/.bashrc2'
 Icon=utilities-terminal
 Terminal=true
 Type=Application
 Categories=Application;

Save and close the file.

Finally, double-click the shortcut (now appears as Terminal 2 on Desktop) to run the prompt.

Repeat the steps for other configurations, if any, by giving different names i.e. .bashrc3, shortcut3.desktop and such.
The unexplained
Running bash --init-file $HOME/.bashrc2 alone will fail to include the PS1 configuration. The resulting prompt will be discolored and will fall back to [\u@\h:\w]$ format. In other words, the .bashrc2 file is entirely ignored. This is why nested shell is required.


Monitor disk activity on a per file basis

I think something based on lsof might work, but I haven't really used it.

There's a bunch of example scripts here: http://fts.ifac.cnr.it/cgi-bin/dwww/usr/share/doc/lsof/examples/?type=dir That might give you clues on how to do what you want.


Ubuntu doesn't give the intended screen resolution

You'll need to install the VirtualBox Guest Additions in order to be able to use graphics properly. See the Q&A linked below on how to do that.

  How do I install Guest Additions in a VirtualBox VM?

Background info

The graphics cards being emulated by the VirtualBox host required optimizations to run properly, smooth and providing integration with the host OS (shared folders, shared clipboard, mouse pointer integration, etc.). These optimizations are accomplished by some cooperation from the driver at the other end of the virtual graphics card: the guest operating system. The Guest Additions contain drivers for several of VirtualBox's features, including the driver (Xorg an kernel module) for the graphics card VirtualBox is emulating.

Without the driver, it's just running in a plain limited VESA mode, without any form of hardware acceleration. You'll notice it's a bit sluggish and you won't be able to use all features like high resolutions.


I believe the latest versions of Ubuntu don't use an xorg.conf file anymore.
gertvdijk makes a good point, if you want to use a file to automatically configure your display setup it might be important to know what kind of card you have.

There might be a rather universal solution to this. Nvidia and Intel support configuration of your displays through xrandr, meaning that if you could (i) save your settings to a file and (ii) automatically set that file as the defaults, you're good to go.

For (i), you can use arandr. Just sudo apt-get install arandr and set your configuration. Through File > Save as you can save the configuration as a shell file. For (ii) you could of course load the bash file at boot, but this is an ugly solution I think.

You sound like you know what you're doing, deploying computers and all, hopefully this can give you a push in the right direction. If it does helps, please append this post to briefly explain what you have done to get this to work.

If memory serves me right, Nvidia allows importing and exporting of the monitor configuration through nvidia-config. At least it did before they started supporting xrandr. This might also be of use...


I want to use java 7 but the computer acts like it is not installed?

Open a terminal and start

sudo update-alternatives --config java

Select Java 7. That's all.

Example

There are 5 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-9-oracle/bin/java              1095      auto mode
  1            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode
  2            /usr/lib/jvm/java-7-oracle/jre/bin/java          1085      manual mode
  3            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode
* 4            /usr/lib/jvm/java-8-oracle/jre/bin/java          1091      manual mode
  5            /usr/lib/jvm/java-9-oracle/bin/java              1095      manual mode

Press enter to keep the current choice[*], or type selection number:

Check with

java -version and you should see something loke this

java version "1.7.0_79"
OpenJDK Runtime Environment (IcedTea 2.5.6) (7u79-2.5.6-0ubuntu1.15.04.1)
OpenJDK 64-Bit Server VM (build 24.79-b02, mixed mode)


Applications have to be producing sound to show in the volume control.

Start a skype call. Once it appears in the list then you can set it to the headsets. Pulse will remember the setting.


This is useful when you wish to reimplement a shell builtin
as a shell function, but need to execute the builtin within the function.

$ type echo
echo is a shell builtin

$ function echo(){ builtin echo "'$1'"; }

$ echo hi
'hi'

help builtin

  builtin: builtin [shell-builtin [arg ...]]
      Execute shell builtins.

Execute SHELL-BUILTIN with arguments ARGs without performing command
lookup.  This is useful when you wish to reimplement a shell builtin
as a shell function, but need to execute the builtin within the function.

Exit Status:
Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is
not a shell builtin.


Ubuntu still identify .exe application, however I have remove WineHQ

You can try wine uninstaller GUI

uninstaller is a GUI uninstaller for all setup programs that put an uninstall entry in the registry, e.g. InstallShield or the WISE installer. It's similar in function to "Add/Remove Programs" in Windows, except much simpler.

Usage:

wine uninstaller

Reference: http://wiki.winehq.org/uninstaller


Install the missing development libraries:

sudo apt-get install libglib2.0-dev


I've solved the problem by myself

usermod -a -G USER1 www-data

chown -R USER1:www-data /home/USER1/public_html

chmod ug+s /home/USER1/public_html

this isn't the "best way" but, better then use www-data as owner and manager of all virtualhosts!!!


Which user is logged in, with likewise and Ubuntu12.4?

psutil 0.51 is ancient, even versions 1.x are deprecated. You should use some version in the 2.x branch.

Note that you should use psutil.users() instead of the old psutil.get_users() and that Ubuntu repos have version 1.2.1.


Ubuntu 18.04: No USB, WLAN, HDMI after upgrading kernel

Do you have the newest HWE stack?
Perhaps

sudo apt install --install-recommends linux-generic-hwe-18.04 xserver-xorg-hwe-18.04

helps.

Before executing you should read here: https://wiki.ubuntu.com/Kernel/LTSEnablementStack


You need to set up CLASSPATH in /etc/environment. Execute the following command in a terminal (Ctrl+Alt+T)

 sudo gedit /etc/environment

Add the following lines (all four lines at the end of /etc/environment)

JAVA_HOME="/usr/lib/jvm/java-7-openjdk-amd64/bin"
export JAVA_HOME
CLASSPATH="/usr/lib/jvm/java-7-openjdk-amd64/lib"
export CLASSPATH

Then restart your system.


Kernel panic after updating kernel on 16.04

Hopefully you have an earlier linux kernel installed that does not panic:

Press left shift key after power on to reach boot menu as described in the comments: grub2 boot menu
select earlier ubuntu linux kernel, with lower version number, than the topmost.
when the earlier Ubuntu linux kernel works as wanted, then remove the buggy one with synaptic package manager.
But beware: remove the right one and do not install the update to it afterwards.

Hope to be of help!


Battery failing on Acer Aspire One 722 when starting

Different operating systems put different loads on the battery at different times. Although, in general, Linux uses less power overall, it could be asking your machine to do multiple things at once which generate a greater load from the battery. The Linux load shows your battery's capacity is declining, and me, I have no doubt, the problem will appear with Windows 8 soon, for certain.


Cannot install Ubuntu at ext4 partition from FAT32 bootable USB stick

I was finally able to solve the issue by just using a different Flash memory. Apaprently, the one that I was using before either was damaged or had other kind of problem. Thanks everyone for their help anyway.


add a context menu option in nautilus por pdf files

You probably want Nautilus Actions - extension for Nautilus that does exactly this. Everything what follows is taken from https://www.howtogeek.com/116807/how-to-easily-add-custom-right-click-options-to-ubuntus-file-manager/.

First, install package nautilus-actions:

sudo apt install nautilus-actions

Quit nautilus:

nautilus -q

Then open Nautilus-Action Configuration Tool. It should be straightforward from there.

Hope this helps you, comment if you have any questions


Use Persistence for Ubuntu Live ISO's Booted from HDD (not USB)

Multi-Persistence Booting ISO's from HDD
For Ubuntu Flavors, Debian, LinuxMint, Elementary OS and Zorin, you can have as many Persistence files as Live OS, more even.
You can put the ISO files in a folder on an ext4 or NTFS partition. A NTFS partition allows Windows to have access to them.
The Persistence files must be located on a FAT32 partition.
Each Persistence file(s) must have it's own uniquely named folder. You can have both a casper-rw, (or writable) file and a home-rw file in each folder for a total of 8GB.
Sample grub.cfg Menuentry
 rmmod tpm
menuentry "ubuntu-20.04-desktop-amd64.iso" {
    set root=(hd0,1)
    set isofile="/isos/ubuntu-20.04-desktop-amd64.iso"
        loopback loop $isofile
        linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isofile persistent persistent-path=/Ubtu-20.04-4/ splash --
        initrd (loop)/casper/initrd
    }

Where the ISO file is located in the isos folder in the root partition and the corresponding casper-rw file is located in the persistence folder, Ubtu-20.04-4, on a FAT32 partition. The name of the FAT32 partition does not need to be mentioned in persistent-path.
Edit:
Ubuntu 19.10 and 20.04 use GRUB 2.04 when booting in UEFI mode. GRUB 2.04 has problems booting ISO files. A workaround is to add rmmod tpm above the first menuentry in grub.cfg


If you simply want Python 3.4 on Ubuntu and want to avoid the trouble of compiling from source, consider installing it from Felix Krull's Python PPA

Add the PPA

$ sudo add-apt-repository ppa:fkrull/deadsnakes

Update Apt cache

$ sudo apt-get update

Install Python 3.4

$ sudo apt-get install python3.4


First you need to install cuetools and shntool. From the terminal type:
sudo apt install cuetools shntool flac

To split a flac file back to the original files using a .cue file:
cuebreakpoints '<cue file>' | shnsplit -o flac '<audio flac file>'

You can drag the cue file and the audio flac file from the file manager into the terminal in order to autocomplete the paths for '<cue file>' and '<audio flac file>'. When you run the command, the terminal will show you the results of each new flac file as it is created, one new flac file at a time ("split-track01.flac" "split-track02.flac" ...), and then stop after all of the new flac files have been created. It only takes a few seconds to create each new flac file. If your .cue file is accurate, the results will be more accurate and less time-consuming than if you split the flac file manually in Audacity.


You can try:

sudo apt-add-repository ppa:flexiondotorg/postgres
sudo apt-get update
sudo apt-get install pgadmin3

or

sudo apt-add-repository ppa:voronov84/andreyv
sudo apt-get update
sudo apt-get install pgadmin3

Worked for me.


I am facing error with my internet connection

I've had this issue many times on new machines and I never know how to prevent it. But here's your fix.

Open /etc/NetworkManager/NetworkManager.conf with root privileges:

sudo nano /etc/NetworkManager/NetworkManager.conf

And comment out this line:

dns=dnsmasq

So it reads:

#dns=dnsmasq

Then run:

sudo service network-manager restart

This will cause NetworkManager to update your DNS server, instead of it referencing your machine for the DNS server.


Which option to choose in the advanced formatting?

You have two hard disks (one 4GB and one 16GB), and the 16GB disk has LVM set up on it.
So the structure would be like this:

NAME
sda
├─sda1
├─sda5
sdb
├─sdb1
└─sdb5
  └─ubuntu--vg
    └─ubuntu--vg-root
    └─ubuntu--vg-swap_1

The LVM volumes (the ones starting with /dev/mapper/ubuntu--vg-) are actually contained in /dev/sdb5. (You can use the lsblk command to find out.)

So you can install Ubuntu in ubuntu--vg-root (use it for /). The other partitions can be left alone.


When I boot up the computer normally, gdm won't work

If plymouth displays but gdm fails to start up at boot, the system may have left you on a blank VT (virtual terminal) and the end of the boot sequence.  You can try pressing Alt+F1 (or Alt+F2) to switch terminals and get to a text login.  (plymouth in Ubuntu boots on VT7, the same VT used for the X display; VTs 1-6 are reserved for text console logins.)

You can also try booting without any of the 'quiet', 'splash', or 'text' options.  If this allows gdm to start, then there is a bug in the interactions between plymouth and gdm affecting your system.  In that case, you should file a bug report against Ubuntu in launchpad:

https://bugs.launchpad.net/ubuntu/+source/plymouth/+filebug


emacs 27 systemd service inherit environment variables

You can run a login shell before executing the emacs binary in order to read and parse your environment. Like so:

ExecStart=/bin/bash -l -c 'exec /usr/local/bin/emacs --fg-daemon'

By default, systemd executes all commands in a clean environment, in order to provide consistency and reproducible service runtime environments. So, if you need additional environment settings, you usually need to set those up yourself.


Different amount of loss after same processing on any image in Ubuntu 18.04 vs Ubuntu 20.04

The culprit behind it is the underlying libjpeg version used by the pillow (PIL) library. Although both, Ubuntu 18.04.5 and Ubuntu 20.04.1 has the same libjpeg package, the pillow version installed by default on Ubuntu 18.04.5 has it's own binaries. So a solution for this is to remove current pillow and reinstall it via downloading and building it from source so that it guaranteedly uses the system's libjpeg.
First remove current pillow module
python3 -m pip uninstall Pillow

Then just install the dependency packages listed here:
https://pillow.readthedocs.io/en/stable/installation.html#building-on-linux
And then run:
python3 -m pip install Pillow --no-binary :all:


Take a look at this answer: windows 10 and ubuntu dual boot

Try to set prefix and root to every of the partitions. One of them should work and the system should boot.

You can also try boot-repair http://sourceforge.net/p/boot-repair-cd/home/Home/


Dropbox doesn't leave "Connecting..." state

I dont know if there is any way to actually solve this right now, but I have the same problem. You could help about with clicking on the "this bug affects me too".
https://bugs.launchpad.net/ubuntu/+source/nautilus-dropbox/+bug/1069113

For a little workaround you can check the status of your dropbox by using this from the terminal:

dropbox status


In the bug report that Clausi links there are quite a lot of workarounds.

This tip from Le Glun de net looks like the best aproach to me.

  If you have this bug (blue and red
  color in video are invert) and you
  have a nvidia, you don't have to
  install or uninstall any software.
  Just launch the "nvidia X server
  settings", choose your screen (X
  screen 0), "Xserver video settings",
  "Reset hardware defaults".

Note that it seems to correct itself as soon as you open the Nvidia setting for some people.


How to install the latest Mumble Server?

For 9.10, 10.04, 10.10 and 11.04 Install the PPA from here: https://launchpad.net/~slicer/+archive/ppa

sudo add-apt-repository ppa:slicer/ppa

Then just update the repositories and install the mumble-server package

For 11.10 and future versions it is in the official repos:

sudo apt-get install mumble-server (For the Server)

sudo apt-get install mumble-server-web (For the Server Web interface)

sudo apt-get install mumble (For the Client)


I deleted Apache and I can't reinstall it

Try running sudo tasksel and selecting LAMP from the list. It will automate the setup and installation of Apache2, MySQL and PHP.

The reason that sudo apt install apache2 doesn't work for you is because that's not technically a real package. It's a "placeholder" package that other packages can rely on because apache2 actually has many different ways it can be installed (prefork, suexec, cgi, etc.)


To run Tomcat on a port below 1024 in Ubuntu/Unix, the service needs root privileges. And that you do not want.

Use a port redirection via iptables

iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8080


Just concatenate your search like says in this answer :

find ~ -name "*.md" -o -name "*.org"

Explanation :

-name would do the search recursively (remove it if you don't want to have subdirectories result)
-o option represents an OR operator (it would execute both commands even if there is no .md file)
~ is the path where you want to start the find execution; here, you begins at ~ (so /home/user where user is your username)

P.S : if you want to use (), you need to use the escape character \ like that :

find ~ \( -name "*.md" -o -name "*.org" \)

Both of these commands works, but the first is enough in this case.

P.P.S : in case that you want to find files that would got these extensions with uppercases, use the -iname option instead of -name option, like that :

find ~ -iname "*.md" -o -iname "*.org"

You would be able to find files named like README.MD for example, which aren't shown with the -name option


How to recover an HDD after using it for SWAP

You wrote:

  So I took one of my external HDDs (total of 360G capacity with about 100G remaining) and issued the command to let it be used as a SWAP space.

The antecedent of "it" is unclear, and the answer to your question depends on that detail:

"It" = 100GiB Free Space

If "it" refers to the 100GiB of free space you mention, then the appropriate commands would have been:

Use fdisk, parted, GParted, or some other tool to create a new partition in that unpartitioned space.
Use mkswap or GParted to prepare the new partition as swap space.
Use swapon to activate the swap space.

There are variants of this. For instance, you might have created a swap file rather than a swap partition. In any event, the key point here is that only part of the disk was used as swap space, leaving the used portions of the disk untouched by Linux's swap tools.

In this case, your original data should be accessible. If it's not, further diagnostics are required, as noted below....

"It" = Whole Disk

If you did not prepare a swap partition or swap file, and simply issued mkswap on the whole-disk device (/dev/sdb or whatever it is) or on the existing partition(s) on the disk (/dev/sdb1, for example), then you've destroyed at least some of your existing data. You might be able to recover some file using a tool such as PhotoRec, but how many files you'll be able to recover depends on how much swap space your software consumed while you left it running. If little swap space was used, you might be able to get back most of your files; but if your software chewed up most of the available disk space, or if you were simply unlucky in what specific sectors it used, you could have already lost most or all of your files.

If the damaged disk used NTFS, note that there are Windows-specific programs similar to PhotoRec that do the same job, and may do it better. The times I've used it, PhotoRec has never recovered filenames for me; but some Windows-specific tools may do so. Thus, you may want to look into such tools.

In Either Case....

There are two commands that you may want to run if you're not sure what you've done:

Type sudo parted -l to learn how your disks are partitioned.
Type sudo blkid to learn how each partition is prepared (what filesystem it uses, or if it's swap space).

If you're not sure how to interpret the data, edit your question to add it or post a link to a pastebin site that holds the output.

These commands may turn up the cause of your problems if you did not wipe it all out as swap space. You might need to do something more in that case, though. For instance, if your external disk uses NTFS, you might need to run CHKDSK on it from Windows. (There are no adequate NTFS-repair tools in Linux, so a system crash when NTFS is mounted requires repair in Windows.)


How to enable Num Lock after login in 12.10?

To enable Numlock on Login

Go to System Settings → Keyboard Layout → Options → Miscellaneous compatibility options and check "Default numeric keypad keys"

Go to System Settings...

Select Keyboard Layout

Select keyboard layout on the left pane and click on Options on the lower right corner.

Under Keyboard Layout Options window, click on Miscellaneous Compatibility options and tick Default numeric keypad keys.

Click on Close.

Setting takes effect after Login.


Yes. See the Ubuntu Help page for DNS which has a step-by-step procedure for this.


How to pass a pathname with a space in it to cd inside of a script

You should use double-quotes " to surround files, folders or variables that contain special characters or whitespace.

From the example you provided, that would be as follows:

~$ mkdir "temp space"
~$ temp=$(echo "temp space")
~$ echo "$temp"
temp space
~$ cd "$temp"
temp space$


Upgrading Ubuntu 11.04 to 12.04 while having Windows 7

If your current dual-boot installation is working properly now, then NO it will not damage your Windows installation when you upgrade.

Note that you'll first have to upgrade to 11.10 and then to 12.04. You won't be able to upgrade straight from 11.04 to 12.04. For additional information the following questions and their answers will be useful:

How do I upgrade from 11.04 to 11.10
How do I upgrade from 10.04 or 11.10 to 12.04

Alternatively, you can do a clean install of 12.04 over your existing 11.04 installation. That is also possible and you can read up on the advantages of doing so by reading the answers to this question: Is a clean install better than upgrading?


If you have switchable graphics (integrated and discrete), Ubuntu will use the integrated graphics unless there's a driver installed for the discrete graphics.

In your case, you have Intel and AMD graphics and Ubuntu is using the Intel graphics because you don't have proprietary drivers. In order to use the AMD card, you would have to install fglrx.

Unfortunately for you, fglrx is no longer supported in 16.04, nor will it work if installed. There is a proprietary driver that is in development, but I don't believe it is very stable.

For now, you'll either have to wait until a proprietary AMD driver comes out for 16.04 or downgrade to 14.04 or 15.10 so you can use fglrx.


Sort FileA into FileB while actively removing lines from FileA

Simple answer: consecutive duplicate lines

For in-place editing, sed is the tool of choice. To remove consecutive duplicate lines, use this:

 sed '$!N; /^\(.*\)\n\1$/!P; D'

Not so simple: non-consecutive duplicate lines

If the duplicate lines are non-consecutive, you can use this -- but there's a risk of overflowing buffer space:

 sed -n 'G; s/\n/&&/; /^\([ -~]*\n\).*\n\1/d; s/\n//; h; P'

Because sort uses the merge sort algorithm (assuming the GNU sort usually used on Linux), the risk of running out of memory or disk remains, because merge sort can use a lot of auxiliary space in worst-case situations. Aside from that risk, @thom is correct suggesting sort -u.

If the problem is to remove non-consecutive duplicate lines, and there's a risk that sed or an in-place sort might run out of space due to a worst-case situation, the best solution is probably to move the file to some sort of external storage, such as a USB flash drive.

Note that if you don't know whether sed or sort might run out of space and corrupt your file, you really want to back up the file, one way or another. Another solution might be to sort through your filesystem for large files that can stand to be compressed, and compress enough of them to do the awk '!x[$0]++' inFile > outFile or sort -u safely, into a separate file. Then you don't lose data if the command fails.

See also "Useful one-line scripts for sed": http://sed.sourceforge.net/sed1line.txt


If you set two workspaces, these shortcuts can be helpful to switch between them: Ctrl+Alt+→ and Ctrl+Alt+←.

In CompizConfig Settings Manager these shortcuts are set in Deskop Wall plugin, Bindings tab, and you can change them as you wish:


Can byobu run with specific window size and location?

A. find out a geometry for your terminal:

/usr/bin/gnome-terminal --geometry=800x800+1921+0
                                   (width x height + x location + y location)

*x location = width of main + x location of sub
*to check width and height of a terminal, run `stty size`

B. open terminal with specific command:

right click on terminal -> profile -> profile preference
on title and command tab, check run a custom command instead of my shell
enter custom command: /usr/bin/byobu

C. add command to startup application:

run gnome-session-properties
add startup program
enter command from A /usr/bin/gnome-terminal --geometry=800x800+1921+0


How to give passwordless sudo through automated script

multipass supports cloud-init and with it you can do all those things automatically without any script.
multipass launch --cloud-init <file> ...
And in cloudinit file you can specify all users to be created and you can give them passwordless sudo.
It would look like this
package_update: true
package_upgrade: true
packages:
  - ...
users:
  - name: ubuntu
    sudo: ALL=(ALL) NOPASSWD:ALL
    home: /home/ubuntu
    shell: /bin/bash
    groups: [adm, audio, cdrom, dialout, floppy, video, plugdev, dip, netdev, libvirtd]
    lock_passwd: True
    gecos: Ubuntu

Have a look at cloudinit documentation for details.
[Edit - adding tested example]
package_update: true
package_upgrade: true
packages:
users:
  - name: user1
    shell: /bin/bash
    sudo: ALL=(ALL) NOPASSWD:ALL
    ssh_authorized_keys:
      - ssh-rsa ...
  - name: user2
    shell: /bin/bash
    sudo: ALL=(ALL) NOPASSWD:ALL
    ssh_authorized_keys:
      - ssh-rsa ...

$ multipass launch --cloud-init cloudinit.yaml
Launched: great-dalmatian

$ ssh user1@10.88.17.191
...
user1@great-dalmatian:~$ id
uid=1000(user1) gid=1000(user1) groups=1000(user1)
user1@great-dalmatian:~$ sudo id
uid=0(root) gid=0(root) groups=0(root)

$ ssh user2@10.88.17.191 "id; sudo id"
uid=1001(user2) gid=1001(user2) groups=1001(user2)
uid=0(root) gid=0(root) groups=0(root)


Apparent DNS problem in Ubuntu 17.04 in a VMWare VM

I found I could get DNS working by configuring the connection's IP4 settings manually.  Basically, on the IPv4 tab, I

set the Method to Manual
added an entry in the Addresses section, using the VMWare IP address of my connection, 192.168.32.130 as the address, 255.255.255.0 as the Netmask and the address of my LAN's router, 192.168.32.2 as the Gateway
obtained the address of one of the DNS servers, 212.23.3.100, at my ISP, Zen, and entered it in the DNS servers box and restarted the connection.

After that, FireFox etc access the internet fine.  I gues the lingering question is why the Automatic setting apparently doesn't retrieve the DNS setting correctly.


File not found on http://localhost:8080/

you need to place the war file in the correct Tomcat directory and then by default the name of the WAR file defines the context root.  Then your web.xml file (unless you are using anotations) defines these rest of the URL by way of servlet mappings.  Thus the full URL you type in the browser is:
http://localhost:8080/<context-root>/<servlet-mapping>


Is it possible to use Compiz with GNOME Flashback on Ubuntu 20.04?

The corresponding compiz-gnome package is in place.
So it should work after you install it with
sudo apt-get install compiz-gnome

and optionally set settings using CompizConfig Settings Manager (ccsm):
sudo apt-get install compizconfig-settings-manager

Then select relevant session on login screen.


Is it ok , if I install ubuntu linux mint and windows in C drive?

Partitioning should look like:
1 - primary - windows or recovery partition
2 - primary - windows or recovery partition
3 - primary - boot partition
4 - extended partition container

5+ - up to eleven logical partitions.

If you find yourself running short on logical partitions because you're hydra-booting, look in to using LVM.


Video freezes when VLC player is in full screen mode

I had the same problem and I don't know exactly what causes this bug.
But...
One (temporary) solution I found is to hide the player in full-screen mode:

Go to Interface Preferences (Tools -> Preferences) and uncheck the option Show controls in full screen mode.
This simple trick will allow you to watch your .mp4 files in full-screen mode without freeze all the system.

(I'm waiting for a definitive bug fix too)

A thread about this bug on the VideoLan Forums


Ubuntu 16.04 - VSync not enabled, screen tearing

I can't remember the link where I got these settings. I also have Intel i7-6700 but have a little newer GTX970M. After much trial and error these settings worked for me (with old settings commented out):

$ cat /etc/X11/xorg.conf.d/20-nvidia.conf
Section "Device"
    Identifier "nvidia"
    Driver     "nvidia"
#    BusID      "PCI:1@0:0:0"
#    Option     "ConstrainCursor" "off"
    VendorName "NVIDIA Corporation"
    BoardName  "GeForce GTX 970M:"
EndSection

Section "Screen"
    Identifier "nvidia"
    Device "nvidia"
#    Option "AllowEmptyInitialConfiguration" "on"
#    Option "IgnoreDisplayDevices" "CRT"
#          Dec 14 2017 - Copy from /etc/X11/xorg.conf to /etc/X11/xorg.conf.d/20-nvidia.conf
#                        Add options from: https://wiki.archlinux.org/index.php/NVIDIA/Troubleshooting
    Option         "metamodes" "nvidia-auto-select +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}"
    Option         "AllowIndirectGLXProtocol" "off"
    Option         "TripleBuffer" "on"
EndSection


A review of the app you use, Simple Screen Recorder shows it's not listed as a feature in that app.

Therefore. please use the Zoom component of the Universal Access features as described in https://help.ubuntu.com/stable/ubuntu-help/a11y-mag.html.en :

Open the Activities overview and start typing Universal Access.
Click on Universal Access to open the panel.
Press on Zoom in the Seeing section.
Switch the Zoom switch in the top-right corner of the Zoom Options window to on.

You can now move around the screen area. By moving your mouse to the edges of the screen, you will move the magnified area in different directions, allowing you to view your area of choice.


Kubuntu network-manager-openvpn not routing traffic via VPN server

I have found a "solution" (and I use this term very loosely here) based on this post: Network Manager does not set IP4.GATEWAY for OpenVPN connection - although I'm convinced this is a bug with the network-manager-openvpn module.

The problem occurs because no gateway is set for the OpenVPN tunnel:

[van@d2:~]$ nmcli device show tun0
GENERAL.DEVICE:                         tun0
GENERAL.TYPE:                           tun
GENERAL.HWADDR:                         (unknown)
GENERAL.MTU:                            1500
GENERAL.STATE:                          100 (connected)
GENERAL.CONNECTION:                     tun0
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/15
IP4.ADDRESS[1]:                         10.9.0.4/24
IP4.ADDRESS[2]:                         192.168.0.7/32
IP4.GATEWAY:                            --
IP6.ADDRESS[1]:                         fe80::cd28:e3cf:f9e6:1417/64
IP6.GATEWAY                             --

The default gateway can be obtained using:

[van@d2:~]$ ip route
default via 192.168.0.1 dev wlp3s0 proto static metric 600
...

Now use nmcli con show to obtain the UUID of the OpenVPN tunnel (tun0 in my case):

[van@d2:~]$ nmcli con show
NAME                UUID                      TYPE             DEVICE
VAN-200-5GHz        <SOME-UUID>-9c79da9597a1  802-11-wireless  wlp3s0
van                 <SOME-UUID>-484ee303d901  vpn              wlp3s0
tun0                <SOME-UUID>-2a1a14674e78  tun              tun0
Wired connection 1  <SOME-UUID>-d3935bcf886b  802-3-ethernet   --

Once you have the UUID, set the gateway using:

nmcli con mod <SOME-UUID>-b717eca7a5a0 ipv4.gateway 192.168.0.1

Now check to make sure you're using the VPN Server's IP address:

dig @resolver1.opendns.com myip.opendns.com +short
<YOUR-VPN-SERVER-IP>

One of the side effects of using this method is you'll end up with a "zombie" connection every time you add a tun0 gateway (and these will persist across reboots):

[van@d2:~]$ nmcli con show
NAME                UUID                      TYPE             DEVICE
VAN-200-5GHz        <SOME-UUID>-9c79da9597a1  802-11-wireless  wlp3s0
Wired connection 1  <SOME-UUID>-d3935bcf886b  802-3-ethernet   --
van                 <SOME-UUID>-484ee303d901  vpn              --
tun0                <SOME-UUID>-c4381868f3f3  tun              --
tun0                <SOME-UUID>-157870b81351  tun              --
tun0                <SOME-UUID>-a1bc29fb7bef  tun              --

You can remove these using:

[van@d2:~]$ nmcli con del tun0
Connection 'tun0' (<SOME-UUID>-157870b81351) successfully deleted.
Connection 'tun0' (<SOME-UUID>-c4381868f3f3) successfully deleted.
Connection 'tun0' (<SOME-UUID>-a1bc29fb7bef) successfully deleted.

Considering how complicated it is working around these issues just to be able to connect to OpenVPN using the Network Manager, you're probably going to be far better off just connecting via the terminal (assuming you have a valid OpenVPN config file).

I'm not sure how to report bugs of this nature, so if anyone knows, please chime in.


WiFi often not working after suspend on ubuntu 20.04

i have this issue as well
i wrote this script and use it when it happen
#!/bin/bash

sudo nmcli networking off
sudo nmcli networking on


By default the videos should be downloaded into the current working directory.

If you're not sure where you are, just run nautilus . from the command line where you are and that should open up a file browser. Or you can run pwd to get the path.

There's quite a good recent answer pointing out how to change the default location for youtube-dl which might help you in the future.


Unable to mount my Windows partition drives in external Hard disk

It seems the ntfs is broken. As it is Microsoft proprietary Linux can't repair it. Hook it up to a Windows computer and repair the filesystem.


It appears you have some broken dependencies. Try to purge everything to do with MySQL first with:
sudo apt purge mysql.*

Note the full-stop in front of the asterisk. This is a wildcard to say "apply to all packages starting with "mysql".
Note that the syntax is slightly different for newer releases of Ubuntu (with no full-stop):
sudo apt-get purge "mysql*"

Purging deletes not only the application but also all config, system and data files directly associated with it, so should give you a clean slate.
Then try to reinstall it:
sudo apt install mysql-server

If this is Ubuntu Server, you can also use the task selector to choose that you want to setup a LAMP server or just MySQL server:
sudo tasksel


Control mplayer with slave mode, key_down_event problem

It seems you need to send numeric keycodes to mplayer. For instance,

echo 'key_down_event 100' > /path/to/fifo

will toggle framedropping (the "d" key, 0x64 in hexadecimal). I found this by accident, but /usr/include/X11/keysymdef.h (and also xev which is hard to read though) will show the keycodes in hexadecimal, which you can convert to decimal e.g with galculator.


Try  grub-customizer latest version, you can find detailed instructions here . I had the same problem because i moved Windows 10. Then i got some problem with it and i repaired the Windows boot. With grub customizer i find the option that i used in the bios for the boot but somehow works only if directly boot into that choise.If this don 't work you can use the system System setup option (that you can set to be available with grub customizer). Unable to boot into Windows after installing Ubuntu, how to fix like karel has said may be a duplicate and you could find something useful.


Switching from an Ubuntu derivative to original Ubuntu

I suggest you to install Ubuntu on another partition.

Then install the software included in Zorin in Ubuntu. You can install these

Compiz config settings manager with sudo apt-get install compizconfig-settings-manager.
All necessary codecs, MS fonts and flash by using sudo apt-get install ubuntu-restricted-extras
Install Ubuntu-tweak : How do I install Ubuntu-Tweak?

After installing necessary software, copy the configuration folders from the old Zorin partiton to your Ubuntu home. The folders are .config, .gconf and .compiz-1 and if you want .local (this may not be needed).


Can I set the Launcher to close on mouseout

That should be default(?)

This hides the launcher when the cursor is NOT at the left side of the screen:


Install (and use) mongodb 3.4.17 on ubuntu 18.04

Try this

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.4.list
sudo apt update
sudo apt install mongodb-org

It installs 3.4.18 successfully. Not the version you're asking for, but should work none the less.

Good Luck!


Skipping acquire of configured file 'main/binary-i386/Packages' as repository 'xx/vscode stable InRelease' doesn't support architecture 'i386'

Your output ("x86_64") indicates that you are running a 64-bit operating system.

The Notification applies only to certain 32-bit (i386-architecture) operating systems.

Ignore it.


Intel HD Graphics card not recognized in System Info

It means that it cannot acquire the information because glxinfo is not installed on the system.

You can install mesa-utils with the Software Center:

Or by typing in terminal:

sudo apt-get install mesa-utils


Windows Printer via Samba - browse not available

got the very same problem here with both kubuntu 12.10 and mint 14 KDE

I found a (quite improvised) way to tweak it by installing system-config-printer-gnome (just go to Muon package manager and search for it) then running "system-config-printer" from the terminal: you'll have network printer browsing just as you have in ubuntu...
after installing it from here you'll find your network printer perfectly installed when checking back to system config>printers

by the way, when you're done with installation you can remove the system-config-printer-gnome package without affecting your new settings (that's because it's just a tool to work on CUPS in a simple graphic way)

hope it could help


Trying to clone my 500GB HDD to a 250GB SSD

First, please do not clone disks/images to SSDs using dd (regarding wear leveling, etc), especially when your source OS is running . I would recommend cloning your existing OS with CloneZilla or System Rescue CD. Both live systems offer good tools to solve your problem!


desktop wallpaper shown in the background in fullscreen mode videos on firefox 64 only in user profile

The solution is here: Strange "ghost images" / transparency effect in full-screen videos

TL;DR; -> Change layers.acceleration.force-enabled option to true in the about:config


You are confusing the password for the unix user "postgres" with the database password for the database user "postgres". These are not the same.

You've locked yourself out, because you enabled md5 authentication for database user postgres without setting a password for the database user postgres.

Add a new line to the top of pg_hba.conf:

local    postgres     postgres     peer

then restart/reload PostgreSQL and:

sudo -u postgres psql

From the resulting prompt:

ALTER USER postgres PASSWORD 'my_postgres_password';

then remove the line you added to pg_hba.conf and restart Pg again. You can now use the password you set above to connect to PostgreSQL as the postgres user.

To learn more, read the "client authentication" chapter of the user manual and the docs on pg_hba.conf.


As the duplicate question did not help, lets see if this will help....

First try to reset Unity and Compiz

Go to tty1 (crtl+alt+F1) log in (this can be done from a terminal in the desktop if that will load or recovery mode(with networking))

dconf reset -f /org/compiz/
setsid unity
unity --reset-icons

Source for above code

If resetting does not work:

Before doing a complete reinstall you can try to reinstall Unity it might fix the missing files.

sudo apt-get clean

to clear all downloaded packages, in case one is corrupted then

sudo apt-get --reinstall install ubuntu-desktop

to reinstall Unity

If after reinstalling if you still have no desktop try using dconf again and see if this time it will work.

If after all this you still have not desktop, you may need to do a reinstall or get some more competent help....


Ubuntu hangs on start on system that have Windows 7

Boot into windows and delete everything in your usb flash drive.

THen download Unetbootin(no installation is required) and make a bootable usb in two clicks.

When it has finished its process it should tell you to reboot.

Install it and everything should be fine.

If this doesn't work leave a comment behind so I know.


Can't connect to my gateway address (refused to connect.)

What brand of router do you have? You can check what the default address would be on google by looking up the product.


I can't identify partition when installing ubuntu 12.04?

It would be helpfull to edit your question and specify how you are installing it in detail. But I'm guessing your option was to "install alongside windows". In that case I believe that the existing partion (windows) is the left one.


If you run

sudo apt install gcc

you will get a prompt showing the packages to be installed and required space, asking if you want to continue.

To see the download size of a specific package you can run e.g.

apt show gcc


Epson TM-T88IV not printing from Firefox/Chrome in Ubuntu 12.04

I just installed the driver in Lubuntu 13.04 y Ubuntu Gnome 13.04 I downloaded the driver from
http://download.epson-biz.com/modules/pos/index.php?page=prod&pcat=3&scat=32&pid=30
I installed the driver from
./install.sh and then Use the PPD file for the printer and it worked great T88V


How to avoid creation of EFI system partition during installation?

You should make sure that you are booting the installation media in MBR mode, not UEFI mode. You might want to check the settings of your firmware setup screen (formerly called BIOS setup screen).


Permanantly disable Activities hot corner

Install the extension No Topleft Hot Corner and you're done.


iwlwifi on ubuntu 18.10 dns resolve issue 9560

after a fair bit of googling and just taking a few stabs in the dark I've come up with the following that seems to fix it.

1:

$ sudo nano /etc/NetworkManager/NetworkManager.conf

in the [main] section add:
  "DNS=DHCP"
then save and close

2:

$ sudo rm /etc/resolv.conf

3:

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

4:

$ sudo systemctl restart NetworkManager


Windows 8/ Ubuntu Dual Installation Problem!

Download Gparted at http://gparted.org/ (it is free) . If "Install Ubuntu alongside Windows is missing" u need to have a logical partition to install Ubuntu alongside.  Boot with USB or CD with Gparted on it, and make the necessary changes.


How to install Pinegrow 3.0 on Ubuntu 16.04.2?

Originally posted by burliway777 as part of their question instead of as an answer.

Here are the steps I have performed:

Pinegrow Linux Install on Ubuntu 16.04

Verified Install on: Ubuntu 16.04.2 LTS
*Unofficial and Not Supported method of installing Pinegrow 3.0
*Please read comments of users before doing the install as I am a hobbyist Linux user and others may provide more advanced, better or correct way of doing things.
There may be corrections to syntax or command line errors.
*I apologize in advance for using my Google drive for files and will modify the post once I get a better public repository to store the files.

This guide helps to get Pinegrow 3.0 installed, search-able via Unity Search “Pinegrow”, shows
Pinegrow Icon, and allow drag n drop of launch icon to launcher bar.
This guide does not address command line execution of Pinegrow or getting PATH set correctly.

This method of installing Pinegrow on Ubuntu Linux will:

Create a top level folder in /opt named Pinegrow to store Pinegrow Installed Versions
Create a sub folder in /opt/Pinegrow named 3.0 to hold v3.0 self-contained application
Modify the Pinegrow.desktop file in the extracted , downloaded .zip file
Add a Pinegrow “pinegrow.png” icon file to root of the extracted folder
copy extracted and modified folder contents to /opt/Pinegrow
mv Pinegrow.desktop to /usr/share/applications

Pre-install checks:

In Terminal run:
Note: This command verifies version of Ubuntu

lsb_release -a

Note-Output should be something like below.

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.2 LTS
Release:    16.04
Codename:   xenial

In Terminal run: uname -a

Output of command we are looking for:

86_64 GNU/Linux

Note: The 64 indicating 64bit

So, we now know that we are running on Ubuntu 16.04.2 and have 64bit support.

2:) Download the PinegrowLinux64.3.0.zip file
current URL is:
https://pinegrow.com/
click download button

3:) Right-Click on downloaded xx.ZIP file
select “Extract Here”

4:) Download and move pinegrow.png to root level of extracted folder
See Google Drive folder for screen-shot file structure that should be in /opt/Pinegrow/3.0 as example directory structure.

5:) Right-click and Rename extracted folder from PinegrowLinux64.3.0 to 3.0

6:) Type in terminal:

cd ~
cd /opt
sudo mkdir Pinegrow
cd Pinegrow
mv ~/Downloads/3.0 .
Cd 3.0
sudo nano Pinegrow.desktop

Copy and paste code in the example file ( Same location shared on Google drive link ) into the Pinegrow.desktop file

[Desktop Entry]
Name=Pinegrow
GenericName=HTML Editor
Comment=Create Awesome Websites with Pinegrow
Exec=sh -c "/opt/Pinegrow/3.0/PinegrowLibrary"
Icon=/opt/Pinegrow/3.0/pinegrow.png
Terminal=false
Type=Application

*Make sure to not add it, but let it be the only lines in the file

press CTRL+o to save file.

press Enter to save as default listed name (Pinegrow.desktop)

press CTRL+x on keyboard to exit and go back to command prompt

sudo mv Pinegrow.desktop /usr/share/applications

Final Notes before any revision or comments: I think all these steps are correct and it brings the desired results, excluding any typing errors.
As a novice Linux user I did perform what is believe to be un-needed steps which was changing /opt/Pinegrow and /opt/Pinegrow/3.0 permissions using chmod 777 on the folders, but not sub dirs or files.
I did not make any changes to .profile, .bashrc or other PATH related files.
So far in testing-Working as desired and expected
Someone really cool make have time to make this a lot easier and get a script made for this. If no one has time for that at least most of the steps and pain has been alleviated for others.


Trying to Change the Show Apps Button in GNOME

Ubuntu 18.10 with Suru++ Icon Theme..

just a work around to achieve what you are looking for with ubuntu-dock or dash-to-dock

files required

modified view-app-grid-symbolic.svg
modified gnome-shell.css

both the files available here https://we.tl/t-xObT0VMoAV

need to copy all the files from /usr/share/gnome-shell/theme/Yaru/ to ~/.themes folder.
if ~/.themes folder does not exist.. create the folder ~/.themes first and then run the below command to copy the folder..

mkdir ~/.themes/myshell && mkdir ~/.themes/myshell/gnome-shell && cp -r /usr/share/gnome-shell/theme/Yaru/* ~/.themes/myshell/gnome-shell/

now replace the file ~/.themes/myshell/gnome-shell.css with the downloaded file gnome-shell.css

open gnome-tweaks and select Myshell theme under User Shell themes..(I assume you have installed this extension User Themes

now, Replace the image view-app-grid-symbolic.svg in the folder where you have ..../Suru++/actions/symbolic/ with the downloaded file.

Restart gnome-shell to see your favorite icon for the show-apps button..


Brother HL-2240 Printer: Job Completed, but No Actual Printing

I was able to fix this;   first this will cost you about 480MB of space;  (if running off USB like I am, you may not be thrilled);

the DEB driver files on the brother page did not work for me;  Jet Direct, CUPS admin, and IPP setups did not work; GnuPrint Drivers did not work for me.  GUI server setting (allowing print sharing etc) did not work.
Editing the .etc --> SMB --> smb.config file,  did not completely work for me.

Don't waste your time there.

***You must use the .GZ package installer provided on the Brother site.

You must open terminal and CD (Change directory) to where you have downloaded the file. Then follow the command lines listed on the brother page.
The Brother command lines do the following 2 steps:
1.  Gunzip (unzip) the package ;
2.  Run the installer via 'Sudo Bash';

**It helps to know the Full Printer Name, URL, or IP address of the printer before you begin but not necessary.  The installer wizard will ask you questions,  I chose to select the 'Auto' install options; to let the installer decide as much as possible.


Dovecot 1:2.3.7.2-1ubuntu3.3 not logging failed authentication on Ubuntu 20.04.2 LTS server

Somehow the issue got fixed for me. Although I could not find any cause of the issue. (not an answer)


How can I enter the '€' (Euro symbol) in the TTY?

You just enter the € symbol in the same way into the TTY depending on your keyboard layout as you would do in a GUI.

The TTY is not capable of displaying non-ASCII characters, so it prints a ∎-like symbol instead. The character is properly recognized though.

I tried this out by running the following command in a TTY:

echo "€" > eurotest.txt

Although the € was displayed as ∎ in the TTY, the file contained the correct Euro symbol when opening it through the GUI.


How to add br_netfilter to an LXD container

You need to create or use an existing profile that enables the br_netfilter module

$ lxc profile create mod_br_netfilter
$ lxc profile set mod_br_netfilter linux.kernel_modules br_netfilter
$ lxc profile show mod_br_netfilter
  name: mod_br_netfilter
  config:
    linux.kernel_modules: br_netfilter
  description: ""
  devices: {}
$ lxc launch ubuntu:latest YOURcontainer -p default -p mod_br_netfilter
############ To apply to an existing Instance #####################
$ lxc profile apply YOURcontainer default, mod_br_netfilter
$ lxc restart YOURcontainer

Alternatively you can edit any profile you already use to support this kernel module

$ lxc profile edit default

edit the config section to add the configuration key
linux.kernel_modules: br_netfilter


Why does Ubuntu 18.04 come with rustc 1.18?

rustc 1.23 is in proposed repos for 18.04. If everything goes right (in development), 18.04 may be released with version 1.23. If not, you can get it by enabling proposed repos.

Package Details : https://launchpad.net/ubuntu/bionic/+source/rustc


Share connection to router from second ethernet

Thank you everybody.
However I finally found what I needed.
I just needed to configure properly, that's what I was looking for IPTABLES.
If someone else needs to solve a similar problem can take a look in here.

https://help.ubuntu.com/community/Internet/ConnectionSharing#Ubuntu_Internet_Gateway_Method_.28iptables.29


You can open a TTY by pressing Ctrl+Alt+F1.

It'll look like a terminal, just login as usual with your login name and password.

Then two options to stop the game:

type ps -aef to identify the process id of your game (it should be one of the last entries) and kill it with kill -9 <pid>
type pkill <game name>

Once the game process is killed, you can reopen the Desktop session by pressing Ctrl+Alt+F7. (Note that opening a TTY did not stop or close your active sesssion)


Why are my display settings not persistent?

So this is probably more technical than a good solution would be, but if all else fails you can execute this code in a terminal (with your external monitor plugged in):

if [ "$(xrandr|grep -c 'connected')" > 2 ]; then xrandr --output LVDS1 --mode 1920x1080 --right-of VGA1; xrandr --output VGA1 --mode 1920x1200; fi

This will use xrandr to readjust your monitor settings.

You could also look into getting this to run automatically when you log in.

I would wait a little bit to see if someone comes up with a better solution.

p.s. you can replace --right-of in the command with --left-of depending on which side you  have your laptop on.


How do I disable Virtual Consoles tty[1-6]?

I found three methods. I'm listing to help others if they need:

First Method:

sudo tee -a /etc/init/tty{1..6}.override <<<"manual"

Second Method:

Open/create the file /etc/X11/xorg.conf using the following command:

sudo -i gedit /etc/X11/xorg.conf

and add the following lines inside:

Section "ServerFlags"
    Option "DontVTSwitch" "true"
EndSection

Third Method:

sudo -i

vi /etc/default/console-setup

change ACTIVE_CONSOLES="/dev/tty[1-6]" to your choice. Lets say if you want only two TTY or virtual console then change to ACTIVE_CONSOLES="/dev/tty[1-2]"

cd /etc/event.d

Comment on all the lines in ttyX file that you don't need. In this example tty3-tty6
Reboot to see the change.


Displaying non Roman characters in Ubuntu Touch

Okay, the goal is to get additional fonts into the ~/.fonts directory.

For example, the fonts from the ttf-indic-fonts-core package (http://packages.ubuntu.com/vivid/ttf-indic-fonts-core).

Install the Terminal app on the phone or connect to the phone via ssh or adb.

Create the ~/.fonts directory:

mkdir -p ~/.fonts

Get the package (select other mirror from http://packages.ubuntu.com/vivid/ttf-indic-fonts-core if necessary):

wget http://de.archive.ubuntu.com/ubuntu/pool/main/t/ttf-indic-fonts/ttf-indic-fonts-core_0.5.14ubuntu1_all.deb

Extract the package into temporary ttf directory:

dpkg -x ttf-indic-fonts-core_0.5.14ubuntu1_all.deb ~/ttf

Move fonts into ~/.fonts:

mv ~/ttf/usr/share/fonts/truetype/ ~/.fonts

Remove temporary directory:

rm -r ~/ttf

Close and reopen the browser.

Tested in web browser on BQ phone with text তূহীন; તૂહીન; തൂഹീന; తూహీన; ತೂಹೀನ; தூஹீந. But for this one: ਤੂਹੀਨ, there is some other package needed.

(to figure out which package, I use Ubuntu desktop and gradually remove font packages until Firefox stops rendering the desirable text)


Seems some basic problems according to me:
/dev/sda6 should be mounted as '/' On this one you should install Ubuntu
/dev/sda5 is linux swap partition
/dev/sda3 is ntfs(windows partition) - why it is mounted on Linux?

Am i missing something. Could you please elaborate what you are trying to do? This may not be an answer but could help you in terms of understanding what you are doing and why?

May be start all over again and install it fresh.


This happens because upgrading from 14.04 to 16.04 causes an unsupported mysql upgrade (5.5 -> 5.7), which is not a supported upgrade path as documented by mysql. The easiest way around this is to upgrade mysql to 5.6 whilst still under 14.04. You achieve this by first (of course!) dumping all your databases;

mysqldump --lock-all-tables -u root -p --all-databases > backup.sql

then upgrading to mysql 5.6;

apt-get install mysql-server-5.6 mysql-client-5.6 mysql-server-core-5.6 mysql-client-core-5.6

This way, all your databases are upgraded in place and (on my machines so far) entirely safely and transparently to 5.6. The only issue after the upgrade may be TIMESTAMP entries. Now, after the do-release-upgrade, mysql is still left at 5.6 and the issues surrounding the non-supported upgrade from 5.5 directly to 5.7 during the release upgrade never even surface.


Change the line in your gvim.desktop that says Terminal=false to Terminal=true.


brother 7040 (all-in-one) printing works but I can't use scanner

I had the same problem with a Brother DCP7020 all-in-one printer/scanner.  I found a solution, nominally for an MFC-7420, that the original author suggested “...should work for any of the Brother models that use the brscan2 driver.”  This proved to be the case for my 7020 and, since your 7040 sounds like a closely-related model, may well be appropriate for you also.  The complete set of instructions that I used are posted at: Getting a DCP7020’s scanner to work


Single-click to open folder on desktop not working on Xubuntu

Desktop icons are displayed by xfce4-desktop, not by the Thunar file manager, unlike the gnome and unity desktops. This is due to change in future releases, but for now there is nothing you can do.

[Additional information]

If you update to Xubuntu 12.04, the option to single click on desktop launchers / files is now there. It has been back-ported from the new version of XFCE, which will be available in Xubuntu 12.10.


Ubuntu has never been iPhone friendly. Your best bet is to install VirtualBox with Windows XP and install iTunes.


Is there any alternate DVD with complete language pack?

You can find alternate DVD at  Here

GO to section

  DVD images with complete language packs


VT-x/AMD-V hardware acceleration is not available on your system

You can run lscpu and see if any virtualization is enabled. I bet it is not since VB throws this error.

Virtualization may be disabled in BIOS or may be not supported by the CPU.


Automatic backup of Mysql database to Amazon s3 server using script and crontab

Some Basics

cron

A user can utilize the crontab utility to edit his/her crontab. The cron daemon will consume all crontabs and run the commands at the defined interval.
A crontab entry basically looks like this:

* * * * * /path/to/some/command

mysql backup

Backup of a mysql database can be achieved through various methods; depending on database engine and amount of data different tools and variants are applicable.
The most basic way of backing up a database would be to use mysqldump:

# mysqldump -u USERNAME -pPASSWORD -h HOSTNAME -P PORTNUMBER DATABASENAME > DATABASENAME.sql

How To Backup MySQL Using Cron

To have backups on every saturday evening at 10 pm use those two tools together (and additionally transfer it to s3) to form a crontab entry like this:

00 10 * * 1 /usr/bin/mysqldump -u USERNAME -pPASSWORD -h HOSTNAME -P PORTNUMBER DATABASENAME > DATABASENAME_$(date '+%F').sql && aws s3 cp DATABASENAME_$(date '+%F').sql s3://BUCKETNAME/db_backups/DATABASENAME_$(date '+%F').sql


Here is my solution:

Remove the old installation of plex:

sudo apt-get remove plexmediaserver
sudo apt-get purge plexmediaserver
sudo rm -r plexmediaserver/

Download plex from the website

Go to Downloads folder

Install plex:

sudo dpkg -i plexmediaserver_0.9.7.22.511-4b5280f_amd64.deb

change user to you instead of plex:

sudo nano /etc/default/plexmediaserver

Run once

http:// localhost:32400/web/index.html#!/dashboard

Stop:

sudo service plexmediaserver stop

add user to group:

sudo addgroup plex youruser

sudo addgroup youruser plex

start:

sudo service plexmediaserver start


Raspberry Pi server image for focal missing modules needed for docker (ip_table)

You are not alone, this seems like similar, in fact it is exact same cause as
iptables not working on Ubuntu Server / Raspberry Pi 4: "Module ip_tables not found"
I tried to post an update to my original reply (mojibake), but askubuntu was not playing nice as a guest, so back as a signed up user...
So the real cause you ask?
All the modules are in the linux-modules-5.4.0-1012-raspi package and if you force as re-install of the package(sudo apt install linux-modules-5.4.0-1012-raspi --reinstall) the ip_tables modules and a whole lot more will be available in /lib/modules/5.4.0-1012-raspi/kernel/net/ipv4/
But as soon as you reboot, poof, all gone... and you can't docker to you..
It is interesting you mention your setup, SD card for boot, and system on USB stick, that is same setup as me.


How to compile .deb file from package archives?

Use the apt-build command. In short:

sudo apt-get install apt-build
sudo apt-build update
sudo apt-build build-source <package>

That assumes that you have added the repo you want to build in your sources.list.

Good luck!


Flickering screen with Kubuntu 13.10 on XPS 13 (Ivy Bridge)

OK, I tried the latest kernel as specified here: https://wiki.ubuntu.com/Kernel/MainlineBuilds and the flickering went away.  However then the backlight didn't work.  I'll assume it's an ongoing problem that will fix itself when 3.12 makes it into Saucy and the devs get a chance to play with it (I can't be the only one dual-booting Windows 8.1 with Ubuntu).


ubuntu 18.04 do not reconize monitor samsung19

I solved the problem:
1. Disable Wayland and enable Xorg (Wayland was my problem to boot ubuntu)
    https://linuxconfig.org/how-to-disable-wayland-and-enable-xorg-display-server-on-ubuntu-18-04-bionic-beaver-linux
2. Eliminate the option "nomodeset" in the GRUB.

and Ubuntu run OK


Try including nomodeset as a boot option in grub. From the main grub bootloader press 'e' to edit the boot parameters. Find where it reads:

quiet splash

Edit to look like this:

quiet splash nomodeset

Hopefully this will solve your boot issue. If so, try changing your graphics driver from the 'Additional Software' app.


Try to increase swap in such way https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04 . It is pretty easy and safely. Then test hibernate or etc.  Maybe reason of your problem not in swap size.


Openstack on MAAS error when upload images

I've never used cloud-publish-tarball; I generally use the glance CLI tools directly to create images in OpenStack:

glance image-create --name ubuntu-12.04 --file precise-server-cloudimg-amd64-disk1.img --is-public True --disk-format qcow2 --container-format bare --property architecture=x86_64

The -disk1.img files from cloud-images.ubuntu.com are bootable on OpenStack without providing a separate kernel/initrd etc...


To add your username back to the sudo group, please follow the steps below:

Reboot your machine and hold the Shift key as soon as you pass the BIOS logo to access the GRUB boot menu. You might need to repeat this a few times until you succeed and see the boot menu.
Select advanced options and hit Enter.
Select the second option with (recovery mode) in front of it and hit Enter.
Wait until the machine boots and another menu appears. Choose the option with drop to root shell prompt in it and hit Enter.
Press Enter when it says press Enter for maintenance.
Once you are presented with a command prompt, write the following command and hit Enter (this will give you read and write access to your system):

mount -o rw,remount /
Write the following command ( where joont is your username ) and hit Enter:

sudo usermod -a -G sudo joont

or

sudo adduser joont sudo
Reboot your system.


What are the SIP connection parameters for an ekiga.net account?

If you are using the ekiga user agent (UA) to register yourself with the ekiga.net sip server, the connection parameters are:
registrar: ekiga.net
username: <your username> (the bit before the "@ekiga.net")
password: <your password>

If you are using the linphone UA to register yourself with the ekiga.net sip server, the connection parameters are:
username: <your username> (the bit before the "@ekiga.net")
password: <your password>
domain: ekiga.net
(the transport MUST be UDP)

Note that if you are using the linphone UA (in fact, if you are using almost any UA other than the ekiga UA), the UA MUST be running on a machine with a public ip address. If your sip UA is running on a machine with a private ip address (i.e. if it's behind a standard domestic NAT router) then your UA's registration to the ekiga.net sip server WILL FAIL.
The reason for this failure to register from a private ip address is explained at https://jitsi.org/Documentation/FAQ#ekiga.net:

"The ekiga.net SIP servers are configured in a way that prevent Jitsi (and many other SIP user agents for that matter) to register with the service. Please use iptel.org or ippi.com instead.
Slightly Longer Answer: The service at ekiga.net is configured to only accept SIP REGISTER requests that contain a public IP address in their Contact header. This means that registration from Jitsi would fail unless you actually have a public IP address. The Ekiga client circumvents this by using STUN to learn the address and port that have been allocated for the current session."

tl;dr: if you want to receive voip calls using the linphone UA and you are, like most people, using a private ip address, sign-up for a free sip address from any one of:

getonsip.com
ideasip.com
iptel.org
linphone.org
opensips.com
sip2sip.info
sipgate.co.uk


What other commands does command passwd involve?

crypt is a Unix utility. From the link:

Linux distributions generally do not include a Unix compatible version of the crypt command. This is largely due to a combination of three major factors:

crypt is relatively obscure and rarely used for e-mail attachments nor as a file format
crypt is considered far too cryptographically weak to withstand brute force attacks by modern computing systems (Linux systems generally ship with GNU Privacy Guard which is considered to be reasonably secure by modern standards)
During the early years of Linux development and adoption there was some concern that even as weak as the algorithm used by crypt was, that it might still run afoul of ITAR's export controls[citation needed]; so mainstream distribution developers in the United States generally excluded it[citation needed] (and left their customers to fetch GnuPG/GPG or other strong cryptographic software from international sites, sometimes providing packages or scripts to automate that process).

Source code for crypt can be found on the Unix Archive Sites.

mcrypt is the successor/Linux version of crypt and we have been using this (at least) since Lucid. Replacement for old unix crypt(1) it states at the package details.

Source code for mcrypt can be found here: mcrypt_2.6.8-1.3_i386.deb on Intel x86 machines

But this is not installed in a default Ubuntu.

But what you are looking for is probably registered in ...

/etc/login.defs

This is the place where Linux systems store what to use. By default, for Ubuntu, this is SHA512. So this is not an encryption but a hashed password starting with $6$.

Example using sha1sum:

$ echo hello|sha1sum
f572d396fae9206628714fb2ce00f72e94f2258f  -

--

Regarding comment see: http://packages.ubuntu.com/raring/makepasswd That is the one called to make the password from the plain text one.

Here is a source: http://people.defora.org/~khorben/projects/makepasswd/

Partial code:

switch(encryption)
    {
        case PE_BASE64:
            return _hash_base64(password);
        case PE_BLOWFISH:
            return _hash_blowfish(password, salt, iterations);
        case PE_DES:
            return _hash_des(password, salt);
        case PE_MD5:
            return _hash_md5(password);
        case PE_NONE:
            return _hash_none();
        case PE_SHA1:
            return _hash_sha1(password, salt, iterations);
        case PE_SHA256:
            return _hash_sha256(password, salt);
        case PE_SHA512:
            return _hash_sha512(password, salt);
        case PE_SHMD5:
            return _hash_shmd5(password, salt);
        default:
            errno = ENOSYS;
            _error("encryption", 1);
            return NULL;
    }

all the functions used are below this bit of code.


I installed Ubuntu 16.04.2 on Virtualbox and logged in but nothing happens. What could be the reason and how can I resolve this?

That is ubuntu "server". It is ubuntu 16.04 simply without all the nonsence packages.

If you do not want to restart your machine you can install the ubuntu-desktop package to get the GUI up and running. See here : How do you run Ubuntu Server with a GUI?


What is "linux-tools" package? Is it needed for "average" desktop user?

The linux-tools package contained three optional utilities: a utility for sharing USB devices over network connections, KBuild infrastructure components, and performance analysis tools. (In more recent versions of Ubuntu the tools seem to have moved to the linux-tools-generic package.)

No, you don't generally need them, and you probably don't want them. The utilities were separated into a different package because they are not DIRECTLY used by many folks, and not essential to the operation of most systems.

On the other hand, on the laptop I am using right now I DO have the linux-tools packages installed because they are a suggested package used by the TLP utility, which I installed to manage power and battery issues. If you are running a system with a different energy management package it might also install the linux-tools package to operate.


Expanding disc partition of system running in vmware

Okay so the solution for me was to use gparted, that allows you to move and resize partitions.

A nice tutorial of how to do it can be found here: https://www.youtube.com/watch?v=cDgUwWkvuIY


In terminal I entered sudo ufw allow from x.xx.xxx.xx where these are the gateway numbers. I can now use VPN with the firewall on.


Linux uses a Unified file system. So in have there is only ever one file system (/). Your partitions are there as mount points. So partition 1 is mounted as / and partition 2 is mounted as /home (etc.).

This can be a bit confusing at first, because Windows has two drives as C: and D: but Linux will have them as their mount points.

There are certain strengths and weakness to this setup. The largest single strength is that you never have to worry about where something is. Configuration is in /etc it doesn't matter if /etc in on a hard drive, a usb key, a pocket calculator, or a wrist watch, it's always /etc (and don't think for a second that mounting drives is not that diverse because it is). Some would say the single biggest downside is that it's more work if your run out of space on /usr then it is if you ran out of space on C:. However apples and oranges and better partition schemes solve that problem, and to be honest I find it actually easier to deal with.

Now as to your partitioning scheme I am going to assume you read that some where, and did some kind of recommendation. The truth is that is pretty horrid, and will likely cause issues with no benefits.

You probably should have done either

Partition 1 /
partition 2 /home

or

Partition 1 /

Having a separate /home is a bit easier on re-installs though I prefer backups. What you have done is made an artificial boundary (around /usr) that server no purpose (your not going to gain any speed or redundancy cause there on the same physical disk).

Try reading: http://www.tldp.org/LDP/Linux-Filesystem-Hierarchy/html/Linux-Filesystem-Hierarchy.html for more info.


How can I use wobbly windows effect on Cinnamon?

To put it simply, you can't. Cinnamon uses a custom Window Manager called Muffin, which does not feature the wobbly windows and cube of Compiz. It may be possible to achieve these with a plugin, but you would have to write it yourself or ask someone on the Mint forums to do it.


Nautilus script - Bash script to extract current folder

The bash command pwd can do this for you! Use that in your script like so

#!/bin/bash
python3  /path/to/my/file.py $(pwd) -optarg 1


Creating windows 8 bootable usb stick under linux with Winusb (saucy) changes my iso file hashes - is it normal, bug or harmfull behavior?

It's normal. Winusb adds some data to iso before writing it to USB .
Don't worry. You should be able to install windows from USB device written by winusb.


How do I set 'nomodeset' after I've already installed Ubuntu?

You should add this option to /etc/default/grub, firstly:

sudo nano /etc/default/grub

and then add nomodeset to GRUB_CMDLINE_LINUX_DEFAULT:

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nomodeset"
GRUB_CMDLINE_LINUX=""

And then save by hitting Ctrl+O, then exit nano with Ctrl+X, then simply run:

sudo update-grub


How to download a driver on Windows, install on Ubuntu?

The quickest/safest way to do it is to download the driver file in Windows. Then copy the driver file to a flash drive. Boot into Ubuntu. Copy the file from the flash drive to the Ubuntu desktop. Double-click on the driver file icon to begin the installation.

If you don't have a flash drive, download the driver file in Windows. Place the file into your Documents folder. Boot into Ubuntu. Start Files (Navigator) and mount the Windows C: drive by clicking its name in the left pane. Be careful here... do not make any changes on the C: drive, and don't leave it mounted for more time than it takes to copy the file to your Ubuntu desktop. Then unmount the Windows C: drive by clicking the eject icon next to its name in the Files window. Then proceed with the driver install.

In the future, it would be better to create a separate NTFS disk partition that can be shared between Windows and Ubuntu (both Windows and Ubuntu can read/write to NTFS partitions).

WARNING! Do NOT install a Windows driver that says it'll read/write to ext4 partitions! It WILL corrupt your Ubuntu installation.


The config file option, if specified, needs to point to the config file for the ceph cluster, which has a working cephfs filesystem, that you want samba to work with.

If you don't already have a running ceph cluster, with a cephfs filesystem, this samba vfs module isn't for you.


To me this strongly suggests an incorrectly wired jack or the pin header connector. I would not expect this to be software related.

Regardless of the cause, the fix is pretty simple if you're happy opening up the computer. There should be a 4-pin female connector coming off the headphone jack, connected to the motherboard (or the sound card - if sound isn't onboard). Occasionally — when the manufacturer is a sadist — these connectors will be individual.

Anyway, the game is simple: reverse the connector(s). They need to plug into the same pins, just the other way around.

Very occasionally these cables are part of a bigger-than-4-pin block. These carry other things (like USB, microphone, etc). In this case it's not suitable to reverse the block and it's likely that won't be possible. You're left with two choices:

Rewire the block: Most of these blocks are just compression jibs. Just poking them out from the connector side should work. Reverse the headphone wires.
Resolder the jack: Possibly the hardest route. Swap the left and right terminals.

Both these options could invalidate your warranty if something goes wrong.

If when you look at things this 4-pin thing I'm warbling on about doesn't exist at all or is part of something else I haven't described, get the motherboard make/model and get a manual for it.

Every motherboard I've ever owned (and I'm in double figures) has had details about how the audio is wired in. Just note that this has nothing to do with the "PC Speaker" header; that's just for beeps and squeaks.

Oh and if it's a new computer (bought from somewhere who have real, on-site people) you could take it back in and have them sort the connector. If it's a box company, you'll be without a computer for weeks so I'd just do it myself.


The messages are not showing a real problem, only limited  log from soundcard  .
As you have sound before login, then Alsa driver layer is ok. So the problem is with pulseaudio configuration in your session. Install pavucontrol (pulse audio volume control) and when sound is not ok , look in output device tab if  correct sound output is selected (en general you don't want  HDMI sound output). Look also "configuration" tab  and test other profile.
If it stills not good,  when sound stops, copy and run this in a terminal:

killall -9 pulseaudio

Close and reopen audio apps and test.
If not good, copy and run that commands in a terminal:
killall pulseaudio; rm -r ~/.config/pulse/* ; rm -r ~/.pulse*; ~/.config/pulse
and reboot


Preparing a partition on which to restore a disk image using gnome disk utility

An image of a partition should be restored to a partition, and an image of a whole drive should be restored to a whole drive.
You need not format the partition, because it will be overwritten anyway by the cloning process.
Yes, exactly the same size or bigger, but not smaller. But it is a waste to make it bigger unless you intend to edit it afterwards (to increase the size of the file system).

Edit: In response to the edit of the original question, I add the following.

For a 'cloning restore' operation in general, you need not format the partition, that you intend to be the target (where to restore from the image file). This is possible, if you create the target partition with another tool than gnome-disks, for example gparted. But you can also format the partition (it will be overwritten anyway, so the final result should be the same).
The restored file-system will have its original size, but it is possible to increase its size afterwards, with a suitable tool.


How do I disable all spectre/meltdown/l1tf mitigations on kernel 4.15.0?

I can't answer your VPS provider side of the question, but in my grub I use:

GRUB_CMDLINE_LINUX_DEFAULT="noplymouth loglevel=4 fastboot acpiphp.disable=1 pcie_aspm=force vt.handoff=7 i915.fastboot=1 nopti nospectre_v2 nospec mem_sleep_default=deep nouveau.nomodeset=0"

# Aug 16/2018 - i915.edp_vswing=2 comes from Ask Ubuntu Dell XPS 15 9350 screen flickering:
#               https://askubuntu.com/a/1064747/307523
# Aug 11/2018 - 10% performance boost eliminating Meltdown & Spectre support:
#               "nopti nospectre_v2 nospec"

I left some of the grub comments in this answer in case that helps.