How does the shutdown button works without asking for password?

A window manager can be configured to ask (like gnome-power-manager), but the system itself does not ask (e.g.: via init or shutdown). Most computers now have an electronic power switch that sends a signal to the computer. The computer receives the signal and does whatever it was configured to do with it.

You didn't say which version. I think... I am not entirely sure, but I think I remember this being slightly different on different versions...

So... what's doing it? Open a terminal...

Is the button kernel module loaded? (lsmod | grep button)

Yes? The kernel is receiving the signal and passing it to another program.

Is acpid running? (ps -A | grep acpi)

Yes? ACPI (Advanced Configuration and Power Interface) handles the signal.

So let's look in /etc/acpi/... You should have a "powerbtn.sh" file or something similar depending on your version of Ubuntu and/or ACPI. At the end of that script you see what happens:

/sbin/shutdown -h -P now "Power button pressed"

And if we do a man shutdown from a terminal, we can see the meaning of switches...

-h Halt or power off after shutdown.
-P Halt action is to turn off the power.

If you want to configure the button... this seems to be a good post if you are using Gnome. I am fairly certain that this is a version-specific question, but these I hope are good clues.


What's the downside of choosing  in resolvconf's configuration dialog?

If you want to use resolvconf (which an Ubuntu user normally does) then you normally choose Yes here. Choose No only if you want to install resolvconf but not activate its control of the glibc resolver. Some people do this for special reasons that I need not go into here.

The question was originally added in order to try to remain in compliance with Debian policy which is very fussy about what packages may do to configuration files.

The default answer should be Yes. If the default answer is No in your case and you don't know why, then ask a question about that or file bug report against resolvconf.


Fonts are not properly displayed in X applications

Restart. (these are some additional characters to satisfy the 30 char minimum)


What's the easiest way to configure GRUB in a more user friendly way?

Last selected entry

To configure grub2 to remember the last selected entry, put these parameters in /etc/default/grub :

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

and save this configuration using the command :

update-grub

Specific entry

If you want to select a specific entry and don't want it to change if a new kernel is installed, you have to use the name of this entry instead of its index number. You took the name in the file /boot/grub/grub.cfg :

menuentry 'Ubuntu, avec Linux 3.2.0-30-generic' --class ubuntu --class gnu-linux --class gnu --class os {
    recordfail
    savedefault
    gfxmode $linux_gfx_mode
    insmod gzio
    insmod part_msdos
    insmod ext2
    set root='(hd0,msdos1)'
    search --no-floppy --fs-uuid --set=root 35b16ba3-50a4-4832-bd60-644db6670637
    linux   /boot/vmlinuz-3.2.0-30-generic root=UUID=35b16ba3-50a4-4832-bd60-644db6670637 ro   quiet splash $vt_handoff
    initrd  /boot/initrd.img-3.2.0-30-generic
}

And use it in the file /etc/default/grub :

GRUB_DEFAULT='Ubuntu, avec Linux 3.2.0-30-generic'

Save configuration with :

update-grub


How to know what version of PHP is shipped in a release version?

There is the packages.ubuntu.com website. It's pretty handy for this stuff.

Here is the current output:

lucid (php): server-side, HTML-embedded scripting language (metapackage)
5.3.2-1ubuntu4.20 [security]: all

lucid-updates (php): server-side, HTML-embedded scripting language (metapackage)
5.3.2-1ubuntu4.20: all

precise (php): server-side, HTML-embedded scripting language (metapackage)
5.3.10-1ubuntu3.7 [security]: all

precise-updates (php): server-side, HTML-embedded scripting language (metapackage)
5.3.10-1ubuntu3.7: all

quantal (php): server-side, HTML-embedded scripting language (metapackage)
5.4.6-1ubuntu1.3 [security]: all

quantal-updates (php): server-side, HTML-embedded scripting language (metapackage)
5.4.6-1ubuntu1.3: all

raring (php): server-side, HTML-embedded scripting language (metapackage)
5.4.9-4ubuntu2.2 [security]: all

raring-updates (php): server-side, HTML-embedded scripting language (metapackage)
5.4.9-4ubuntu2.2: all

saucy (php): server-side, HTML-embedded scripting language (metapackage)
5.5.1+dfsg-1ubuntu1: all

As of Xenial Xerus the keywords string to search is "php". (the version is PHP7)

xenial (php): server-side, HTML-embedded scripting language (default)
1:7.0+35ubuntu6: all
also provided by: php7.0

xenial-updates: Virtual package
provided by: php7.0

yakkety (php): server-side, HTML-embedded scripting language (default)
1:7.0+42: all
also provided by: php7.0


How to install kernel tools in Ubuntu Server 18.04?

They're not identical, but the gpiod package provides gpio discovery and control tools via the newer character device ABI:

sudo apt install gpiod

It is available in bionic. gpiodetect and gpioinfo are the basic discovery tools, while gpioset allows you set GPIO values.


Is there a way to create a script and make it executable in less code than this?

The install command (part of GNU coreutils along with cp, mv, rm, etc.) can copy a file while also setting its ownership and permissions and creating parent directories as necessary. By default it will make the new file executable. It doesn’t understand ‘-’ but /dev/stdin can be used instead:

install /dev/stdin script.sh <<< "echo Hello World"

The above uses a ‘here string’ to provide the text on stdin, which is slightly shorter than piping it in. The arguments to echo don’t need quoting unless they contain characters with special meaning.


What happens to elementary OS if Ubuntu discontinues its Desktop?

Canonical is not going to stop making the desktop version. They are no longer going to be spending money on Unity and convergence. All this means for the end user is that future versions of Ubuntu will be gnome (as well as the other official flavors) there will just be no more of the Unity DE.

See this article from mark shuttleworth (Founder of canonical) specifically paragraph 2.
https://insights.ubuntu.com/2017/04/05/growing-ubuntu-for-cloud-and-iot-rather-than-phone-and-convergence/


Is there a caching DNS proxy I can add local records to?

pdnsd is a fairly simple server that can do this. Notes:

Enable in /etc/default/pdnsd
Switch server_ip to eth0 (or other), and enable serve_aliases in /etc/pdnsd.conf
Point computers' DNS settings at this computer and win.

There is one thing causing me pain now and that's Netgear home routers being absolutely awful. Thanks to some crazy decision, you can't host your DNS server within your network. It treats it like an IP conflict for no good reason.

If you have a router that doesn't suck, you should be able to spread the internal IP of the DNS server over DHCP and you're there.


In the Ubuntu's Build Your Own Kernel guide it is stated that you have to install following programs :

sudo apt-get install libncurses-dev flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf

to be able to compile the kernel from source successfully.


Is it a multi-homed machine? What's on the 192.168.122.0/24 CIDR? Is there an interface listening on one of the IPs from within that range? I'd probably try to look at the output of:

grep -R 192.168.122 /etc

to find out if there's any configuration related to it and also check cron entries in /etc/cron*


How to get google search to default to local country site, not com site?

I can't give you an exact answer for your specific country as it's not in your profile. Be that as it may, Simply point firefox to https://addons.mozilla.org/en-US/firefox/search/?atype=4 and search for google.countrycode where country code is your country code such as google.fr for france or google.de for Google Deutschland. This will add that specific search engine to your available engines by clicking the Add to Firefox button. and allow you to choose it as default by checking the box and clicking Add. See below:


I am not an expert so I guess that in a standard Ubuntu install the Additional Driver utility looks in pre-determined repositories which are on-line. In your case it is not looking on the CD. Would setting Software Sources to include the CD fix this issue?

(Comment by grahammechanical, which worked. Mark this as an answer and edit away this comment to remove the question from unanswered section)


How can I permanently change the text size for gnome-terminal?

You can manually set the size of the text in a terminal by :

opening a terminal
Edit -> Profile Preferences
select Custom font (or unselect Use the system fixed width font in older versions)
Choose your font and size

You can also choose the size of the terminal by selecting Use custom default terminal size and setting a number of rows and columns.


To fix it, create this folder:

mkdir -p ~/.pulse/equalizerrc

Then run:

/usr/share/pulseaudio-equalizer/pulseaudio-equalizer.py


Terminal: binding hotkeys to textual commands

You can use the bash bind command as seen in the linked Stackoverflow answer.

In your case, the command would be:

bind '"\C-b":"git branch\n"'

To make it stick from session to session then add it to your ~/.inputrc

Bash bind reference. (also available as man bash)


Needed help for Ubuntu download and installation

According to the Ubuntu Wubi Guide wiki Windows ME is not supported for installing Ubuntu inside Windows using Wubi. See the section of the Ubuntu Wubi Guide wiki called Which Operating Systems are supported.

Because you are running Windows ME on it, it is likely that your computer is more than ten years old, but it might be able to run Xubuntu in a dual boot setup with Windows ME if it has at least 512MB RAM and at least 5GB of free hard disk space. Otherwise you can't install any *buntu flavor except for Lubuntu, assuming that your computer has at least 128MB RAM and at least 5GB of free hard disk space. Because your computer is old, you should download the 32-bit version of whatever *buntu flavor you want to install, NOT the 64-bit version.

This answer by Mitch will take you through the process of installing Lubuntu step-by-step with screenshots illustrating what to do at each step.


Changing (reducing) the quality of an ogg file?

There are two excellent choices here:

Adjust your FFmpeg command line to produce a smaller Ogg Vorbis file
Use FFmpeg to create a small file using libopus

Details of both are below:

1. Adjust your FFmpeg command line...

The key issue is that FFmpeg will not automagically change the audio sampling rate to appropriately match your selected bitrate. But then FFmpeg usually does not do a lot of hand holding I guess!

Bear in mind that an Audio CD will normally have a sampling rate of 44100 Hz while simple telephony would normally have a sampling rate of slightly greater than 8000 Hz. So you have a choice to make for the best sampling rate for your 32k Ogg Vorbis audio. The following are some guidelines:

44100 Hz: Typical Audio CD sample rate. Rejected by FFmpeg for a 32k file.
32000 Hz: Adequate for speech and also adequate for other audio files where a smaller file size is required with an expected small loss of quality. Rejected by FFmpeg for a 32k file.
22050 Hz: Adequate for speech and usable for other audio with the expectation that there will be audio quality loss. Accepted by FFmpeg for a 32k file.
11025 Hz: Very poor sound quality. Accepted by FFmpeg for a 32k file.
8000 Hz: Slightly lower sampling rate than a modern telephony system, not recommended for most recording tasks. Accepted by FFmpeg for a 32k file.

With this in mind my own testing suggests that you would be best to use a sampling rate of 22050 Hz, note that this should be perfectly adequate for speech, and thus your command line should be:

ffmpeg -i filename.ogg -c:a libvorbis -ab 32k -ar 22050 new-filename.ogg

And this produced a quite reasonable outcome on my own setup...

2. Use FFmpeg to create a small file using libopus...

If you are perhaps not all that set on using Ogg Vorbis an excellent alternative is to use Opus, which in my tests shaved a reasonable number of kilobytes off each file in comparison to the Ogg Vorbis 32k encode. Try something like the following which has been tailored for your speech files:

ffmpeg -i filename.ogg \
-c:a libopus -b:a 16k -ar 16000 -ac 1 -application voip \
new-filename.ogg

You will be pleasantly surprised by both the resulting output file size and audio quality. I have included a link to a great HydrogenAudio resource in the 'References' which should guide to an even better command line for Opus...

References:

Sample Rates: A nice page from the Audacity developers that demonstrates the best settings for audio sample rates.
Speech encoding quality: The definitive HydrogenAudio page to guide Opus settings for speech.
15.8 libopus: FFmpeg options for use with libopus encoding. Note the -application voip setting that I used above and which does not have an equivalent with opusenc (unlike the other settings).


How to chose specific folder to save custom screenshot to for each screenshot?

One way would be to use the scrot utility to take screenshots. Just pass the full path of the file to be saved in the command line.

You have a number of useful options: you can choose to capture the whole desktop or just the window that has the focus. If you want to manually select the area to capture use the -s option.

So it's quite easy to automate captures and you could even run scrot minimized in a loop with a delay between each capture to speed up your work.

It even does thumbnails and you can also pipe another command.

Scrot: A Command Line Tool to Take Desktop/Server Screenshots Automatically in Linux


Note: This would remove all the custom settings, bookmarks, history, cookies, saved passwords and co.

Open a terminal and run rm -rf ~/.mozilla
Open Firefox and go to Facebook again.

This might help: http://chat.stackexchange.com/rooms/7296/discussion-between-alen-and-michael-tanner, which is a chat link from the question: https://askubuntu.com/q/248963/83046.


Fresh Ubuntu unable to find internet connections

As of now, this is the first instance of the device 14e4:41a0 that we have seen. The first suggestion I have is to try the proprietary driver. With a working internet connection, by ethernet or otherwise, open a terminal and do:

sudo apt-get install bcmwl-kernel-source

Reboot. If the wireless is not working, check the log for clues:

sudo modprobe wl
dmesg | grep wl


Download

Unity is providing official support for Ubuntu

You can always get the latest releases of Unity3D:

Unity on Linux: Release Notes and Known Issues

scroll down the page for the latest release.

Install

How do I install a .deb file via the command line?


Nvidia prime integrated GPU shown as llvmpipe (LLVM 6.0)

For me (only integrated graphics) helped setting i915.alpha_support=1. Try using instuction below:

Run sudo nano /etc/default/grub (you may use whatever editor instead of nano)
Add i915.alpha_support=1 nouveau.alpha_support=1 to the existing line GRUB_CMDLINE_LINUX_DEFAULT= after quiet splash.
Run sudo update-grub
Reboot

P.S. My backgound with this problem:

Initially I had a blackscreen after splash, so I had to add nomodeset (afterwards replaced to i915.modeset=0). Doing this I could boot the desktop, but it was rendered by LLVMpipe (software rendering using CPU capabilities).


Move all files and directories to destination directory

There are three ways I'd consider doing this.
Hacky and error-fuelled, "MOVE ALL THE THINGS"
mv ~/MYDIR/* ~/MYDIR/DESTINATIONDIR

This will try to move the destination into itself and will explode:
mv: cannot move ‘~/MYDIR/DESTINATIONDIR’ to a subdirectory of itself, ‘~/MYDIR/DESTINATIONDIR/DESTINATIONDIR’

But it will move [almost] everything else. So it works but it's a bit of a mess. If you need to match hidden files, run shopt -s dotglob beforehand and it'll work.
Moving a list of files manually
Given the short list of things, we can quite easily just list them out with a little bash expansion:
 mv ~/MYDIR/{DIR{1,2},file{1,2}} ~/MYDIR/DESTINATIONDIR

If you  need hidden files with this method, just include them in the list.
If this list is coming from something else (eg find) it can be tough to ensure the destination is the last argument. You can move the destination to the front with the -t argument. This is a horrible example but highlights when you need it:
find ~/MYDIR/ -maxdepth 1 ! -name DESTINATIONDIR -exec mv -t ~/MYDIR/DESTINATIONDIR {} +

Inverse globbing with shopt, elegance defined.
So let's strike the balance between manually listing and wildcards. By turning on the extended globbing features in Bash, we can select [almost] everything but the destination directory.
shopt -s extglob
mv ~/MYDIR/!(DESTINATIONDIR) ~/MYDIR/DESTINATIONDIR

If you need to match hidden files, run shopt -s dotglob beforehand and it'll work.


X1 Carbon Mini Display works with External Monitor but not Projectors

I had the same problem. I also tried it with a Mac adapter, which I luckily borrowed from a friend, which did work for displays but not projectors. Due to this fact, I then bought a Lenovo adapter, which works fine. All under Linux, don't have a Windows installation any more.


Is it possible to issue redeem codes for commercial apps in the Ubuntu Software Center?

No, there are no such redemption mechanisms in Software Center.

However, for games that are in Steam, if you bought them via Steam on Windows or Mac OS, and they are available for Linux, you can install them there without purchasing again (because the platform in that case is actually "Steam" and not "Linux").

The Humble Bundle delivery via Software Center was a special case done only for Humble Bundle, as Software Center doesn't have support for arbitrary values of payment decided by the purchaser rather than the seller.


Openbox changes aren't taking effect at all on Ubuntu 16.04

Your rc.xml file should be in ~/.config/openbox. Back it up first and then please try:

<keybind key="W-Left">        # HalfLeftScreen
  <action name="Unmaximize"/>
  <action name="MoveResizeTo"><x>0</x><y>0</y><height>100%</height><width>50%</width></action>
</keybind>
<keybind key="W-Right">        # HalfRightScreen
  <action name="Unmaximize"/>
  <action name="MoveResizeTo"><x>-0</x><y>0</y><height>100%</height><width>50%</width></action>
</keybind>

Note: make sure that you are working in the <keyboard> section and not anywhere else!

After you've edited and saved the modified rc.xml, open a terminal and run openbox --reconfigure. (You shouldn't get a pop-up informing you of parsing errors. If you do, you'll probably need to fix those.) Only then will the changes take effect. There's no need to restart anything.

Addendum:

The following keybinds can be used to minimize (aka Iconify) and maximize the active (in focus) window:

<keybind key="C-W-Up">        # Minimize
  <action name="Iconify"/>
</keybind>

<keybind key="C-W-Down">        # Maximize
  <action name="Maximize"/>
</keybind>

(I already use W-Up and W-Down for snapping to the top half and bottom half. You need to ensure that you don't use the same key combos twice! So do run through rc.xml before making your shortcut choices.)


Upgrade R 3.2 to 3.3 using tar.gz file on Ubuntu 16.04

You downloaded the R source code therefore you need to unpack and compile it:

tar xf R-3.3.1.tar.gz (filename is depending on the version you have)
cd R-3.3.1
./configure
Now comes the tricky part. Configure might stop with some error messages and now you need to install some additional packages. On my machine it was

apt-get install gfortran libreadline-dev bzip2-dev liblzma-dev libcurl4-gnutls-dev

If you have errors in running configure you need to search the needed packages by your own. Then what I do is for an example apt-cache search readline dev because you need the development files of the library. Then restart configure to see if it helps.
The output line "R is now configured..." shows success, so you can start compiling with a make.
Hopefully you got no errors you can then install the package with sudo make install (you need admin rights to write to /usr/local/ -> therefore you need sudo with your user password)
Start your newly compiled package with /usr/local/bin/R to be sure you are using the right version.
With sudo make uninstall you can again delete it from /usr/local/


"Cannot open: Permission denied" when creating a tar file

The problem is that you are executing the command inside /usr/src to which you do not have write permissions with your credentials. Therefore you do not have write permissions for the .tar file you are trying to create. Use tar cvf /tmp/rtl_archive.tar /usr/src to create a tar-file where writing is possible.

Generally you can give any path that you have write access to, such as:

tar cvf $HOME/rtl_archive.tar /usr/src

to create the .tar file in.


If you don't already have ksh installed, enter sudo apt-get install ksh in the terminal.
After installation you can enter a ksh session by entering ksh in the terminal. When you are finished with ksh just type exit.


Unable to create partition for Android installation in VMWare

I had the same problem. It was saying there is no hard drive to edit partitions.
I just restarted my PC and everything worked OK after that.


Some laptop Fn key combinations are multimedia keys (appearing to the OS as ordinary keys with nonstandard codes), while others trigger ACPI events that eventually reach the OS, and some are just handled by the BIOS and never seen by the OS. The information paths are explained on the Hotkeys/Architecture page on the Ubuntu wiki, complete with diagrams.

The KeyTouch program should handle anything that is seen by the OS, and has a friendly GUI for describing your model and configuring what the keys should do (install the keytouch-editor package as well as keytouch).

If the OS can't see anything when you press the brightness keys, it could be because they're handled directly by the BIOS. The battle is not completely lost — it is in principle possible to hack the BIOS — but the difficulty level is considerably raised.


Ubuntu 18.04 WiFi Networks are not displaying even though there are 3 nearby

This will be a partial answer until we uncover more facts.

I recommend that your regulatory domain be set explicitly. Check yours:

sudo iw reg get

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

sudo iw reg set IS

Of course, substitute your country code if not Iceland. Set it permanently:

sudo nano /etc/default/crda

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Reboot. Run and post:

sudo iwlist chan

We are confident that channels above 66 will now be available.


I think with virsh you need to explicitly tell it where to connect to as well, so the correct command, given that the qemu instance you want to connect to is local, would be

virsh -c qemu:///system list --all

or with xen, I guess it might be (unsure here)

virsh -c xen:/// list --all

It's likely possible to configure virsh to use this a the default location, I don't know if there's a reason the virsh package does not do that automatically.


How to use netplan to create two separate routing tables?

ens2f1:
        addresses:
        - x.x.x.x/x
        routes:
        - to: 0.0.0.0/0
          via: y.y.y.y/y
          table: 200
        routing-policy:
        - from: z.z.z.z/z
          table: 200
          priority:

Hope this answers both of your questions


I can't authenticate to remote host with password using 2FA

I found the problem, at the /etc/pam.d.sshd i had set the auth required pam_google_authenticator.so with the extra option nullok, after removing this I was able to ssh to the machine using the password and the 2fa generated codes.


There’s a line in gtkrc which includes a workaround for a problem of ComboBox menus. The workaround replaces the colors of ComboBox entries with text color which is dark:

widget "*.gtk-combobox-popup-menu.*" style "menuitem_text_is_fg_color_workaround"

To fix the problem, a # mark should be inserted at the beginning of the line in order to be ignored and make menu entries colored in dark_fg_color which is light:

#widget "*.gtk-combobox-popup-menu.*" style "menuitem_text_is_fg_color_workaround"

Here’s an screenshot of the result:


I just found a solution elsewhere to just this question that worked for myself. As ist happened, xfreerdp indeed tried to share the USB device, but the Windows 10 Host was not configured to accept it.
There are a couple of policy entries that configure this behaviour.
After setting the entries as described below I now have an audio device and a imaging device for my shared webcam.
The camera does NOT show up amongs cameras, but it is usable in "Teams" on the remote host. Performance is not that great, but even the Logitech settings app does recognize it and I can configure the behaviour. Probably the double transport of video data from the client to the host and back through the RDP session to make it available in the session is not the greatest idea.

Run gpedit.msc on the target VM (the target windows 10 Virtual
Machine) to start the Group Policy Editor. gpedit.msc can be typed
in from a run dialog (use WinKey+R) if you have administrator
access, or start an elevated CMD.EXE and type gpedit.msc from the
command line.

Locate the item *Computer Configuration \ Administrative Templates
Windows Components \ Remote Desktop Services \ Remote Desktop
Session Host \  Device and Resource Redirection* Do not allow
supported Plug and Play device redirection from the treeview of the
Group Policy Editor.

set this item to Disabled.

Run gpupdate /force from an elevated command prompt.

At least disconnect RDP session and connect again, if this does not
work reboot target VM.

https://stackoverflow.com/questions/33719489/how-to-enable-usb-redirection-in-windows-10/46628854


Can I distinguish specific instances of Gnome Terminal in the switcher?

This is a hack!

sudo cp /usr/bin/gnome-terminal ~/bin/detly-terminal

Now change your Irssi.desktop file to use detly-terminal

Tested and works on Unity

If that would fail and you're ready to program something anyway, I would: download the source code, do a sed and replace gnome-terminal with detley-terminal, and recompile...


Ubuntu 17.04 installer unable to find SSD (only HD available) on a MacBookPro11,1

Unfortunately I still don't know what caused this very odd behaviour. However I was able to fix it simply by using the OS X Recovery Mode and re-installing OS X (to a USB stick in my case) once the installer reached the point of restarting the machine everything started working normally again. I was then able to install Ubuntu 17.04 without a hitch (which works really nicely the Mac).

If anyone knows what the OS X installer did to fix this/what the cause was I would love to know.


Creating a .deb that just places/updates config files?

Effing Package Management https://github.com/jordansissel/fpm is one of my favorite tools for creating packages.

Create the directory tree you want and use https://github.com/jordansissel/fpm/wiki/Source:-dir


Follow this instructions for install docker-nvidia and docker-compose :
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt-get update
sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
sudo apt-get install docker-ce=18.03.1~ce~3-0~ubuntu
curl -s -L https://nvidia.github.io/nvidia-docker/gpgkey | \
  sudo apt-key add -
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L https://nvidia.github.io/nvidia-docker/$distribution/nvidia-docker.list | \
  sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update
sudo apt-get install -y nvidia-docker2
sudo pkill -SIGHUP dockerd
sudo systemctl start docker
sudo systemctl enable docker
sudo groupadd docker
sudo gpasswd -a $USER docker
sudo usermod -aG docker $USER
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose
sudo chmod +x /usr/bin/docker-compose


Getting the version number after library's name and extension in Bash

I won't guarantee that it will catch every corner case, but how about

grep -Po '\.so\.\K([0-9]+\.)*[0-9]+'

match and discard literal .so. on the left (using the PCRE \K modifier)
match zero or more occurrences of one or more digits followed by .
match one or more digits

Note that we don't want to anchor it to the end of the string ($) as your original expression does, to allow for a trailing string such as -PRE-GIT


I installed a custom .deb file that provided a package named "python" but now need to remove it

I think I have found the answer. I downloaded the real "python" package from Ubuntu Packages and installed it:

cd /tmp
wget http://nl.archive.ubuntu.com/ubuntu/pool/main/p/python-defaults/python_2.7.5-5ubuntu3_amd64.deb
sudo dpkg -i python_2.7.5-5ubuntu3_amd64.deb

To complete the whole process, I ended up recreating my custom .deb file (with python3.3) with a new non-clashing name ("python-to-remove"), and then installed and uninstalled it:

sudo dpkg -i python-to-remove_3.3.5-1_amd64.deb
sudo dpkg -r python-to-remove

This removed all the files from this package, while the files from other packages seem to not have been affected. I ended up deleting a bunch of documentation files as well, but I had never used them before, so I think I'm OK with that.


I was able to install dh-modaliases with:

sudo apt-get install dh-mod*


You can use dd over SSH.

dd makes a literal copy of whatever you point it at and puts it in a file at whatever destination you specify.

Here's an article with details:

http://karlherrick.com/dev/2008/09/12/dd-backups-over-ssh/

The amount of time copying the drive image will probably significantly less than the amount of time you would spend figuring out which files need to be copied, and you can tar/gzip the file if you want to reduce transfer overhead.


The Qt4 packages can still be obtained from third party PPA:
sudo add-apt-repository ppa:rock-core/qt4
sudo apt-get update

Then you have to download python-qt4 binding from previous Ubuntu 18.04 LTS release manually:
cd ~/Downloads
wget http://archive.ubuntu.com/ubuntu/pool/universe/q/qt-assistant-compat/libqtassistantclient4_4.6.3-7build1_amd64.deb
sudo apt-get install ./libqtassistantclient4_4.6.3-7build1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python-qt4/python-qt4_4.12.1+dfsg-2_amd64.deb
sudo apt-get install ./python-qt4_4.12.1+dfsg-2_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/python-pyaudio/python-pyaudio_0.2.11-1build2_amd64.deb
sudo apt-get install ./python-pyaudio_0.2.11-1build2_amd64.deb

As the result the Python2-Qt4 binding will be installed. Then you know what to do.
Also note that there is fresh version of lucaschess here with Qt5 as dependency.


All ports on DELL xps-13-9380-laptop don't work anymore

fwupdmgr will not upgrade your BIOS.

First, we will check what is the version of the BIOS installed on your system:

sudo apt install dmidecode
sudo dmidecode

This will reveal all the BIOS related information to you.
The BIOS is DMI Type 0 (and usually the first entry). Look out for "BIOS Information". For me, it looks like this:

# dmidecode 3.1
Getting SMBIOS data from sysfs.
SMBIOS 2.8 present.
29 structures occupying 1999 bytes.
Table at 0x000E6F90.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
        Vendor: Insyde Corp.
        Version: V1.04
        Release Date: 05/06/2014
        Address: 0xE0000
        Runtime Size: 128 kB
        ROM Size: 6144 kB
        Characteristics:
                PCI is supported
                BIOS is upgradeable
                BIOS shadowing is allowed
                Boot from CD is supported
                Selectable boot is supported
                EDD is supported
                Japanese floppy for NEC 9800 1.2 MB is supported (int 13h)
                Japanese floppy for Toshiba 1.2 MB is supported (int 13h)
                5.25"/360 kB floppy services are supported (int 13h)
                5.25"/1.2 MB floppy services are supported (int 13h)
                3.5"/720 kB floppy services are supported (int 13h)
                3.5"/2.88 MB floppy services are supported (int 13h)
                8042 keyboard services are supported (int 9h)
                CGA/mono video services are supported (int 10h)
                ACPI is supported
                USB legacy is supported
                BIOS boot specification is supported
                Targeted content distribution is supported
                UEFI is supported
        BIOS Revision: 1.4
        Firmware Revision: 1.4

You will see the Version information in Version:

If you have verified that the BIOS is, in fact the latest, then send the unit to Dell for repair.


Cannot move windows side-by-side join after updating 20.04

The problem is with Pixel Saver extension.

After turning it off everything works as expected : )


Are there plans to make a screensaver for Unity?

The closest thing I can find to reimplementing a screensaver are these blueprints:

https://blueprints.launchpad.net/ubuntu/+spec/desktop-o-screensaver
https://blueprints.launchpad.net/ubuntu/+spec/security-o-compiz-screenlocking


Does with ubuntu 15.04 the problem with fans on dell laptop is fixed?

You can try fancontrol. I've posted a solution here:

http://askubuntu.com/questions/186426/how-do-i-control-the-fan-on-a-apple-mac-mini/614011#614011


Unable to auto rotate screen on Lenovo FLex 5

Try using Ubuntu 18.04? Screen-rotation works fine on my Flex 5.


Try to change the phpmyadmin port to 8080

(default) nano /etc/apache2/conf.d/phpmyadmin.conf

Since your Apache is running on that port.


How to print columns from file with delimiter?

Here's one way:

$ awk -F: '{print $1 FS}' file
pa:
mo:
va:

and

$ awk -F: '{print $1 FS $2}' file
pa: Pensilvania
mo:Misuri
va:Virginia

If you prefer cut, the second one is straightforward:

$ cut -d: -f1,2 file
pa: Pensilvania
mo:Misuri
va:Virginia

To get the trailing delimiter that you want in the first case, you could use paste:

$ cut -d: -f1 file | paste -d: - /dev/null
pa:
mo:
va:

OTOH this one is easy with sed:

$ sed 's/:.*/:/' file
pa:
mo:
va:

while the second takes a bit more thought:

$ sed 's/:[^:]*//2' file
pa: Pensilvania
mo:Misuri
va:Virginia


Guidance for partitioning for 2 distros with encryption

First of all, try all this in a VM as you said you have practice with.

In the installing process, you could use LVM (the setup force you to if you want encryption) with multiple LVM groups so you could set a different password for each.

That said, personally I dislike LVM, it adds another layer of complexity I disagree with (even if others said it "helps" you, I only faced problems, specially with some privative drivers) so I could recommend you to setup Ubuntu A and B normally, and encrypt the data partuition with LUKS via cryptsetup.


First a general comment. In stacking window managers, your windows open in a default size or in the size the window was previously in. They are placed, depending on the window manger settings, according to a "smart" algorithm or in the center (for Ubuntu 18.04, this depends on the setting of org.gnome.mutter center-new-windows), eventually overlapping existing windows. In this context, automatically providing gaps between adjacent windows makes less sense because windows are not systematically placed adjacent to each other.

That said, such effect could in principle be achieved using a theme where the Window borders are relatively wide and transparent. You may or may not be able to find such theme that suits your taste. Eventually, an existing theme could be edited this way, but it may not be that simple, for example, see this Reddit discussion. .css files must be be edited in various places. An added complication is that some window borders may be drawn by the Window manager, others by the client.


Converting Ubuntu Legacy with Windows installed

Several options

Convert Windows to UEFI boot (GPT) in command  prompt (search cmd in taskbar -> right click run as admin -> type in using mbr2gpt.exe /convert /allowfullOS in Windows ,  make sure you switch your bios settings to  uefi boot! , othewise it wont boot (may need to select windows efi boot on efi partition  driveletterwitharound100mbspace:/EFI/Microsoft/Boot/bootmgfw.efi)

Reinstall grub(on linux) on mbr  (legacy) to enable dual boot windows + linux , note  you will loose windows boot loader .

**Highly recommend having a live linux live usb + windows usb installer (make one now) just incase it goes pear shaped.


Ubuntu PPC Powerbook g4 wont boot live cd

I'm pretty sure your computer has a Broadcom b43 Wifi card, which isn't compatible with some livecds.  Try the 11.10 cd and use the b43-fwcutter.  I have a pc with a b43 and this is how I got Ubuntu to work.  You can also try pressing esc wen you get to the splash screen.  You can see if it stops for any errors.


Removing faulty links from /var/lib/apt/

Like @Jos said you need to find the bad entry in /etc/apt/sources.list and /etc/apt/sources.list.d.

To do it easily without explore all the files and the lines you can make a search with grep :

grep -nri "repository.spotify.cofy.com" /etc/apt/sources.list /etc/apt/sources.list.d

Parameters:

-n  Prefix each line of output with the 1-based line number within its input file.

-r  recursive

-i  ignore-case


trouble finding/installing cpu driver for AMD FX 8350

Yes, it does matter if you run cpufrequtils  on a virtual machine vs. on bare metal.

Virtual Box and other virtualization software will use the real CPU but not all features of the host CPU are exposed to the guest.

Controlling the CPU frequency is one of the CPU feature that is not available in a virtual machine created with Virtual Box. CPU settings you make from the host OS will likely be respected in the guest.


How to change mac address of my WiFi device?

This might already have an answer here.

You can try this:

Install macchanger sudo apt-get install macchanger macchanger-gtk
sudo ifconfig wlan0 down

NOTE: wlan0 my change according to your card, please check ifconfig.
sudo macchanger -a wlan0
sudo ifconfig wlan0 up
now I suggest once disabling and enabling of Wifi.

done.


How to invert colors in preview pdf option of mozilla Firefox?

You are looking for an extension like this one.

It will make pages dark and text white, it even has some customization options and can be used on all pages or just one, I see no reason it would not work on PDF preview too, just open the menu and choose invert.


I encountered the same problem. To track back its origin I looked into
/var/log/cups/error_log
In my case, I discovered that the problem was caused by icc profiles used by ghostscript. I had the following error:
Started filter pstops (PID 26489)
./base/gsicc_manage.c:1244: gsicc_open_search(): Could not find default_gray.icc
./base/gsicc_manage.c:2261: gsicc_init_iccmanager(): cannot find default icc profile
./base/gsicc_manage.c:1244: gsicc_open_search(): Could not find default_rgb.icc
./base/gsicc_manage.c:2025: gsicc_set_device_profile(): cannot find device profile
**** Unable to open the initial device, quitting.

So what worked out for me has been to manually remove the icc profiles and then re-install libgs9-common (following this link: Broken ghostscript configuration):
sudo rmdir /usr/share/ghostscript/9.25/iccprofiles
sudo apt-get install --reinstall libgs9-common

Hope this helps


How to generate a private-public key using ssh-keygen and make it authorized?

Run ssh-keygen -f filename.
Run scp filename username@server:filename-on-server
Log in to the server and run cat filename-on-server >> ~/.ssh/authorized_keys

You could also replace steps 2 and 3 with ssh-copy-id -i filename username@server.


When using mozc to input Japanese, it's using the last selected keyboard layout to input romaji - can I fix which one it uses?

First click on this Mozc icon and bring

this window and click on the red arrow, preference button,

Pull-down the menu from Input Method Default to your favorite.


According to your ifconfig results, the ethernet connection is "UP", which means that it can definitely see your switch.  Please detail what switch it's plugged into.

The most likely problem here is that the ethernet connection isn't connected to anything that can see the DHCP server.  Try manually setting an IP address :

Right click on the network manager applet and choose "Edit Connections..."
In the "Wired" tab, click the "Add" button.
Enter a Connection Name like "Manual Ethernet"
Click on the IPv4 Settings tab.
Change the "Method" to "Manual".
Under "Addresses" click on "Add"
Put 192.168.1.20 for Address.  Put 255.255.255.0 for Netmask.  Put 192.168.1.1 for Gateway (I'm assuming that this is the gateway - check it with netstat -rn | grep UG - it should be the address listed after 0.0.0.0.
For nameserver, put 192.168.1.1 and 208.67.222.222 (the second address is openDNS, a free DNS server that anyone can use).
Click on the "Add" button at the bottom.
Now activate your newly created profile - left click on the network manager applet, then choose your newly created connection.

Now try pinging your gateway with ping 192.168.1.1.  You should see something like this :

scaine@GroovyTosh:~$ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_req=1 ttl=255 time=0.378 ms
64 bytes from 192.168.1.1: icmp_req=2 ttl=255 time=0.358 ms
64 bytes from 192.168.1.1: icmp_req=3 ttl=255 time=0.546 ms

If this works, you'll need to troubleshoot why your DHCP device isn't serving addresses to your ethernet connection.


I believe that you have encountered the following problem:

Bug 678831 - Partition End Overlap when Resizing Extended Partition

This bug was fixed in GParted 0.13.0.

Since many problems have been fixed since the 0.12.1 release of GParted, would you be able to try the latest release (currently 0.16.1)?

An easy way to do this is by booting from media containing GParted Live.

Curtis


When to run "sudo apt update" and when "sudo apt update && sudo apt upgrade"?

You run sudo apt update to refresh the list of available packages.

You run sudo apt upgrade to upgrade all installed packages.

Obviously you always run update before upgrade to use the latest list.


Kernel path error during VMware player 3.1.6-744570x86_64

The first thing you should do, is download a more current version of VMWare Player.  Version 12 (VMware-Player-12.0.1-3160714) of the player available at this link works well with Ubuntu 15.04


Linux systems don't use the "drive letter" convention that you are familiar with from Windows devices.  You can easily access the file system on Ubuntu by clicking the folder icon in the Unity launcher.

If there are no additional drives mounted, you will not see anything under Devices except Computer.  Under Computer you should see a list of folders with some familiar names like Documents, Pictures, Videos.  To access these folders just click on them under Computer.  Home will bring you back.

This answer is rather general but so was your question.  If you specify all the steps you took to copy and paste something and describe in what step it failed, people may be able to offer more specific guidance.


No Unity dash and bars - existing solutions not working

Ok, so I managed to partially solve the issue (that is to revert to the original settings and dirver (Nvidia 331.79), but the black border issue remains) and wanted to let the community know in case anyone happens to encounter the same problem.

So in order to revert to the original settings I

1) purged all nvidia drivers:

sudo apt-get remove --purge nvidia*

2) Reinstalled Ubuntu desktop

sudo apt-get install ubuntu-desktop

3) Reinstalled the nvidia driver through the xorg-edgers repository:

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

I will keep looking into the black border issue, but have seen some posts on this so there must be an answer somewhere out there!

Hope this may help!


When the computer first boots, do you see the BIOS/POST screen ok? Then what happens, and how long is the "input not supported" message displayed? Like 1-3 seconds, or a half-minute plus?

If it's a second or three, maybe Ubuntu/Xubuntu has changed display modes too fast for your monitor to keep up, but it catches up when the login screen shows up. My monitor flips & flickers for about two seconds right before it logins in.

Update: 30 second delay... That is a long time, sounds about as long as the startup messages would take (like the log messages if you boot without the quiet splash options) - As if your splash screen were in an unsupported resolution. What happens if you boot without the quiet splash options? There are other boot options that are often used for troubleshooting or unsupported hardware, like nomodeset might apply here, but then your regular display might be affected, but could be worth a try to check?

Holding shift while booting used to get you to the grub menu, (if it wasn't already visible) but that may not work anymore, see these Q's for how-to's if you can't get to the grub/boot menu to change boot options:

I can't get grub menu to show up during boot
How to get to the GRUB menu at boot-time?

Or it may be the grub and splash screen resolutions that are unsupported, in which case you couldn't change the boot options yet. These answers may help with that:

https://askubuntu.com/a/6040/129271
https://askubuntu.com/a/362998/129271


Ubuntu installation: restart doesn't work but shutdown works

I tried the following command to resolve all the issues:

sudo ubuntu-drivers autoinstall


Sort from terminal is not working properly

You have the options swapped around, you need:

sort -k2,2gr filename

k2,2 sets the key to sorting as the second field only; g,r is analogous to -g and -r, only difference is that this works only on the key when used like this


You have a VIA graphics card, it's one of the worst supported graphics chipsets.

What is happening is that the hardware cursor (that's a special part of the graphic card capability that produces a nice smooth cursor) has been corrupted. Normally this is because all of your video memory has been used.

If you can go into the bios and increase the amount of RAM given to the onboard video device. This may solve the issue for you.

It may still be a driver issue, as I said at the start, VIA isn't well supported so you may want to upgrade to an nvidia, intel or ati graphics card.


For anyone who is still having some doubts about this topic, I found the info on how to solve it from here. This is what I worked for me:

I have Ubuntu 16.04.3 LTS

I checked what unrar version I had installed.

$ dpkg --list | grep unrar

I found out that I had installed unrar-free
I uninstall unrar-free and install unrar

$ sudo apt-get remove unrar-free -y && sudo apt-get install unrar -y


sane-find-scanner could not open USB device ..... Access denied -- running Ubuntu 20.04 & 20.10

Probably you must define a UDEV rule to add a permission for you if the scanner is plugged.
Here you can find out how to set a rule of UDEV to add permissions for USB device:
https://stackoverflow.com/questions/22713834/libusb-cannot-open-usb-device-permission-isse-netbeans-ubuntu

For example you can write a file /etc/udev/rules.d/scanner.rules with the following line:
SUBSYSTEMS=="usb", ATTRS{idVendor}=="07b3", ATTRS{idProduct}=="0c3b", GROUP="scanner"
The rule above sets a scanner group for usb device file that represents your scanner. You must reload UDEV using
sudo udevadm control --reload-rules
You can verify the group and permission by checking:
ls -l /dev/bus/usb/*/* . Watch for a bus number and a device number of your scanner from lsusb . For details see https://wiki.debian.org/Scanner#perms .
Now you need to add users that should have access to the scanner to the scanner group. sane-find-scanner should work now.


Turns out that you now have to use meta+drag (ie win-key, or "windows key", with drag), which raises the menu - in dolphin on KDE, for me running Kubuntu 19.04 - which offers the choices of making a plain copy or creating a link/soft-link/symbolic-link.

For some ctrl+shift+drag may work too, that's what the little pop-up menu suggests but it's not working for me somehow (which might be a bug).

Hope that helps someone because it took me an hour and I couldn't find the right words to get the search engines to return anything useful!


Icons on second monitor positioned above the screen on second monitor UBUNTU 17.10

While we await a definitive answer, I've been exploring possible answers.  I was able to resolve the issue by logging out and logging back in using X instead of Wayland.
If using Wayland is a requirement, then the best result is obtained thusly:
[USING WAYLAND]
I had a very similar result until I adjusted the external monitor's dimensions to more closely match those of the built-in monitor.  I did this using the GUI sequence:

(1)<right-click> on the display
(2)choose Display Settings.

I adjusted the resolution of my external monitor from 1920x1080 to 1360x768.  Now that the vertical resolution of both monitors is 768, all works as expected.  Hope this helps.
I vaguely recall having done the same thing when I first set up my dual-monitor solution under 17.04. So, I think it's the case that the 17.04 -> 17.10 upgrade process failed to retain those earlier settings.
If you're more of a command-line user, then gnome-control-center display is the command that will enable you to adjust the resolution of your display.


Don't know if you've sorted this out yet but I had a similar problem this worked for me.
Specifically, going into  Software & Updates -> Additional drivers and selecting Nvidia proprietary fixed the problem.


Iomega 335 GB USB Drive not being recognized

There is a useful tool called ntfs-config which you can use to mount NTFS external drives.

Plug in your external drive.

Then install the following:

sudo apt-get install ntfs-config

Start the application - the application should recognize that your USB external drive is available to use:

gksudo ntfs-config


How to install arduino-1.0.3-linux32.tgz?

What exactly do you mean when you say that you can not run ./configure?

It does not run, or it produces an error message?

Anyway, there are better ways to install arduino in Ubuntu. Please see http://playground.arduino.cc//Linux/Ubuntu.

If you still want to install (run) from the tgz file, please see the end of this answer. That part was added later on.

If you are impatient, press Ctrl-Alt-T. This will give you the command terminal.

Then type,

apt-cache search arduino

Press Enter.

After running the above, you will get a screen like this,

and then run,

sudo apt-get install arduino*

This is supposed to give something like,

Press Y and then Enter. Things should go all right from this point. It went fine for me.

Added Later On, "For Installation from the tgz File"

Download the tgz file from http://arduino.googlecode.com/files/arduino-1.0.3-linux32.tgz

Unpack the file

tar xvzf arduino-1.0.3-linux32.tgz

Move to the extracted directory

cd arduino-1.0.3

Run the shell script in that directory

./arduino

It ran perfectly in my machine, Ubuntu 12.04


I can find multiple wi-fi networks but I can't find mine

https://help.ubuntu.com/stable/ubuntu-help/net-wireless-connect.html.en

«If the name of the network is not in the list, try clicking More to see if the network is further down the list. If you still do not see the network, you may be out of range, or the network might be hidden.»


So, the trace_printk() was not in the kernel itself, but in a (proprietary) module.

In my case, the sep5.ko module was responsible for this kernel notice, and this module is part of the Intel VTune Amplifier suite.

The vtune software had nested itself in /etc/rc0.d/K01sep5 and /etc/rc0.d/K01sep4_1 and after removing those, the kernel notice disappeared.


How can I connect to an ubuntu 19.10 server with gui?

You can install and run a VNC server (x11vnc) on your Linux box, and then connect to it from your windows machine using a VNC client..

I dont know if you are asking about vnc/remote desktop/etc, or if you are talking about x11. and doing it all through ssh (cause you just tagged ssh).

Sorry, you weren't too clear.

Either way, look up SSH X11, and VNC..

One of those two should be what you are looking for.

Cheers!
-Booey


You only have to run sudo if you change the owner or the group to a group you don't belong to. You don't need sudo to change the group to a group you already belong to. Note that this is specified in the POSIX standard.


Go to a terminal:

ctrl + alt + f1 (f1 -> f6 will get a terminal)

Find spotify pid:

ps -ef | grep spotify | more

resulting in something like:

sergio   19510  1962  2 15:43 ?        00:00:02 /usr/share/spotify/spotify
sergio   19515 19510  0 15:43 ?        00:00:00 /usr/share/spotify/spotify --type=zygote --no-sandbox --lang=en-US --log-file=/usr/share/spotify/debug.log --log-severity=disable --product-version=Spotify/1.0.28.89
sergio   19533 19510  0 15:43 ?        00:00:01 /usr/share/spotify/spotify --type=gpu-process --channel=19510.0.1439192124 --no-sandbox --lang=en-US --log-file=/usr/share/spotify/debug.log --log-severity=disable --product-version=Spotify/1.0.28
.89 --supports-dual-gpus=false --gpu-driver-bug-workarounds=2,51,63 --disable-gl-extensions=GL_ARB_occlusion_query GL_ARB_occlusion_query2 --disable-accelerated-video-decode --gpu-vendor-id=0x8086 --gpu-device-id=0x0a16 --gpu-driver-vendor --gp
u-driver-version --lang=en-US --log-file=/usr/share/spotify/debug.log --log-severity=disable --product-version=Spotify/1.0.28.89 --v8-natives-passed-by-fd --v8-snapshot-passed-by-fd
sergio   19548 19515  4 15:43 ?        00:00:06 /usr/share/spotify/spotify --type=renderer --disable-pinch --no-sandbox --lang=en-US --lang=en-US --log-file=/usr/share/spotify/debug.log --log-severity=disable --product-version=Spotify/1.0.28.89
 --disable-extensions --disable-spell-checking --num-raster-threads=2 --content-image-texture-target=3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553,3553 --video-image-texture-target=3553 --disable-accelerated-video-decode --channel
=19510.1.1432446137 --v8-natives-passed-by-fd --v8-snapshot-passed-by-fd
sergio   20233  7137  0 15:46 pts/1    00:00:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn spotify

there you will have the process id to kill it:

kill -9 19510

And go back to UI:

ctrl + alt + f7


Gnome-Tweak-Tool erronously deleted gnome-tweak-tool-lid-inhibitor from autostart

Why don't you try the most obvious first? Quit Gnome Tweaks, start it again then disable "Suspend when laptop lid is closed".


While you technically can use Wine or VirtualBox one has you running in a broken and probably vulnerable state and the other has you running a full-blown copy or Windows.

You might not be able to see the technical issues with those but as somebody who can, I'm begging you: don't do these!

The direct everyday answer to the question is: No, you can't install Internet Explorer [in a native, good performing, non-buggy and safe way]. Microsoft never made a version of Internet Explorer for Linux. That's the problem and that's certainly one reason it's not in the Ubuntu App Store.

The best outcome here is getting used to another browser. I sympathise that change is hard (we all went through it when we moved to Ubuntu) but in this case, it's sincerely worth it. IE was technically —again— rubbish and MS are killing it off the brand in newer versions of Windows.

Both Firefox and Chrome are heavily customisable. If there's a particular behaviour you're missing, there's probably a plugin for it:

Firefox Add-ons
Chrome Web Store


You can check if a mirror is down by visiting Down For Everyone Or Just Me, however there isn't a central website where you can select an Ubuntu mirror from a list of mirrors and check the status and report problems with that mirror. Report the issue to the mirror that is down or else either wait for the mirror to come back up or temporarily use a different mirror.

Immediately after a new version of Ubuntu is released, Canonical temporarily adds more Ubuntu iso image servers, so that everyone who wants to download the newly released Ubuntu iso image can download it quickly.


Packard Bell TS11HR-068GE brightness control doesn't work

You can add to grub config an acpi command.

Issue following command to edit /etc/default/grub,

sudo gedit /etc/default/grub

modify the following lines adding "acpi_backlight=vendor"  like below

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_backlight=vendor"
GRUB_CMDLINE_LINUX="acpi_backlight=vendor"

then  run

 sudo update-grub

After that restart your system.


How to format a USB drive for Startup disk?

The error "Failed: Error synchronizing after initial wipe: Timed out waiting for object" comes up with a bug report at ubuntu launchpad see - https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/1307627. Try using another usb just to eliminate a hardware fault.


Ubuntu made my second HDD disappear from the BIOS!

You are mistaken. The official specifications for the Asus 1015PX show that it ships with only one hard-drive, which can be either 250/320/500GB.


How to display ALSA raw MIDI connections and devices?

I can now answer half of my question, and may be the second half will never receive a positive answer.

One can list raw MIDI devices using amidi -l.

I don't see a way to list connections and it also only lists devices, not clients. Maybe there is nothing comparable to the ALSA's sequencer subscription mechanism with ALSA's raw MIDI, hence this part of the question will never receive the expected answer.

Please, people, still feel free to add your own answer, as I'm not fully happy with my own.


Ubuntu 20:04 boot logo image after costumazation

I am still positive about "update-initramfs -u"  try again after you have edited everything.
In your chroot:

apt update && apt upgrade

gtk-update-icon-cache Yaru || your theme

update-alternatives --config default.plymouth

update-initramfs -u

Wait till its done.


Why doesn't Gnome Terminal support dark theme?

Why? Because Ubuntu GNOME developers decided to rip off that option saying "It's more trouble than it's worth" . But it will be available from Gnome Terminal 3.19, which means we will see it in 16.10. (Thanks to egmont for correcting me on that it wasn't Ubuntus decision)

But you can enable Dark theme variant using

GTK_THEME=Adwaita:dark gnome-terminal

command.

If you want you can even change the EXEC line in .desktop file of gnome terminal

Exec=env GTK_THEME=Adwaita:dark gnome-terminal

Another option is to enable Dark variant for all applications using Gnome Tweak Tool. Install it, open, and in General Tab select Use Dark Theme option

Check this question for more

GTK - Enable/set dark theme on a per-application basis


How to Automatically save terminal command output to file

Yes.

Use tee on your terminal.

$ bash | tee /abc.txt

Explanation

bash will start another shell inside the one that you are currently
using. It will look like nothing happened but, if you try to close
the terminal you'll be prompted with something like :

There is still a process running in this terminal. Closing the
terminal will kill it.

That process, it's bash. It will read your command like your other
shell without any issue because your first shell is already, most
probably, running bash too. It's just an example. There are other shells and you can find out about them here : [Reviewer, insert link 1 here]

When you'll be done, you may want to type exit to close it.
| is the character used to represent pipes. M. Jackson explains what they are here : http://www.dsj.net/compedge/shellbasics1.html

  Pipes. UNIX philosophy urges the use of small yet highly focused programs that can be used together to perform complex tasks. So, learning how to string together a number of small commands on the commandline is an intrinsic part of being comfortable with Bash. To do this, we direct the standard output of one program into the standard input of another program, but we don't use redirectors, we use the pipe operator, ``|''. In UNIX, processes connected by pipes run together dynamically as data flows between them.

And tee, for the sake of completeness : [Reviewer, insert link 2 here]

  [reads] from standard input and write to standard output and files

  This means that the output of bash (more precisely the output of the commands run inside it) will be handed to tee as its input. Effectively removing the need of using | tee /abc.txt after each of your commands to see their output on the shell as well as saving it on your file system.


How to backup all the data of my Ubuntu system?

Instead of using Remastersys you can use dd, it is a command line tool mostly used to make backups
To back a Hard Disk/Partition use following command.

           dd if=/dev/sda of=~/disk1.iso

If there is no enough space you can compress your backup using gzip or bzip2


Update making any/all emails sound notification

It seems after OTA-10, users would get notifications for all the mails landing in inbox. So an obvious workaround to get notifications only for "primary" emails is to make others skip inbox. You might want to try this workaround. You'll get almost everything as before except the tabbed inbox feature.

Step 1:

Open Gmail in browser and go to cogwheel > Settings > Labels tab and create a new label

Step 2:

Name the new label Promotions

Step 3:

Now go to Filters and Blocked Addresses tab and create a new filter

Step 4:

In Includes the words field enter category:promotions and then Create filter with this search

Step 5:

Check the boxes titled Skip the Inbox (Archive it), Apply the label: and select Promotions and then Create filter

Step6:

You will see the label Promotions appearing in the side menu and from now on all your incoming mails in promotions category will skip inbox and land here

Step 7:

Now repeat the process for other categories, e.g. Social, Updates etc.


The answer is given in the documentation about startup files and the more command. You just need to run more off on startup. To do this you can create the file .octaverc (the dot is important) in your home directory (~/.octaverc) and add the more off command to it. Now Octave should always start with more switched off.

(There's also the file /usr/share/octave/site/m/startup/octaverc if you have more than one user on the computer who want this configuration.)


Extract string from `pactl` output and pass as variable to shell script

There are two ways to do it. This is all assuming that you want to pass one number to the script in the arguments and to change the volume of the first sink to the argument.

Your original suggested way (remove the echo after you verify it works):

#!/bin/bash

pactl list sink-inputs | grep -hPo '^Sink Input #\K\d+$' | head -n 1 | xargs -n 1 -I{} echo pactl set-sink-input-volume "{}" "$1"

Remove the echo once you've verified that the commands that would be executed are correct.

Or, @steeldriver points out in the question's comments, there's a short form that's faster and easier to parse (again, remove the echo):

#!/bin/bash

pactl list short sink-inputs | head -n 1 | awk '{print$1}' | xargs -n 1 -I{} echo pactl set-sink-input-volume "{}" "$1"


You will probably need to install the VirtualBox Extension Pack that is relevant to your version of VB. https://www.virtualbox.org/wiki/Downloads - hope this works for you.


32bit UEFI better support than a year ago?

I installed Ubuntu 15.10 on my Liva X (which uses Bay Trail).  I was following the same instructions, and got the same error.

To fix it, I booted to "Try Ubuntu without installing".  I pulled up the Terminal, and typed

  sudo apt-get install sbsigntool

Then I picked the "Install Ubuntu 15.10" icon on the screen.  The sbattach error is now gone.


"Ubuntu One discontinuing" annoying message

You need to remove the python-ubuntuone-storageprotocol package, you can do this via the Software Center by clicking the following button and then removing it:

Or via the command line:

sudo apt-get autoremove --purge python-ubuntuone-storageprotocol


Problem: "npm ERR! cb() never called! npm ERR! not ok code 0" when installing etherpad

For those seeing this 2013-09-27, there's an bug with the latest release of npm. Downgrading nodejs to 0.10.17 seems to solve the issue.

StackOverflow


Yes, Ubuntu will run reasonably well on an external drive, as long as you use a reasonably fast interface.  I have actually survived for a few weeks on a 8GB USB 2.0 flash drive as my boot drive, and although it was slow, it was not that horrible.  Now, if you have the choice, you should absolutely go for either USB 3.0 or (e)SATA, as USB 2.0's performance, while rated at 480 Mb per second, is going to be a lot slower in real life.  You will experience some speed issues, but only during hard disk access.  Linux has pretty good file caching, and after the program loads/file opens you are going to have the same performance as you would otherwise.


Installing Ubuntu, It cannot find the root file?

Windows only works with NTFS file system,when i try to to install 12.04 LTS,I faced the same problem.
Go back and choose Ubuntu to install in a new partition i.e) it creates automatically creates a new partition
                          or
Create a  new partition of your choice, greater than minimum requirement size and specify the type of file system and specify your root folder i.e).given in a toolbar with option (/,/root,/home and etc....like that).choose any one from that,and try to install from that partition


How to install Ubuntu using internet from proxy defined by a PAC file

You don't need a PAC file.  The purpose of the PAC is to have different proxy configurations for different hostnames/domains.  Assuming your installing over the internet, use the actual proxy server that you need to use.  In the case of this PAC file, _IP_:8080


Building Awesome WM, missing dependencies

Looks like you need to install libxcb-icccm1-dev package.


how can we install Aria Maestosa on Ubuntu 18.10?

to add the repositiry open a terminal and

sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu xenial-getdeb apps" >> /etc/apt/sources.list.d/getdeb.list'

then setup keyring

wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -

then install the ariamaestosa

sudo apt install ariamaestosa


How to hide / remove "postgres" user in Ubuntu 14.04?

Hide a specific user by creating a file in /var/lib/AccountsService/users/ named with the username, in this case: postgres.

$ sudo vim /var/lib/AccountsService/users/postgres

And add the following two lines:

[User]
SystemAccount=true

If it happens that your system dosen't use AccountsService then hide the user by editing the /etc/lightdm/users.conf file and add the username to this line:

hidden-users=nobody nobody4 noaccess postgres

Then restart lightdm (this will restart the current session so be sure to save your work):

$ sudo service lightdm restart


Technically, it is possible to do, but realistically, no.

You might find this possible duplicate of value:

https://security.stackexchange.com/questions/80285/do-webcams-generates-logs-on-operating-system


Terminal shows menu in panel but window is missing

I switch to ROXterm to replace gnome-terminal.
It works well. But I'm still wondering if I can use gnome-terminal in Natty.


What are the advantages and disadvantages of installing 12.04 or 13.10?

Ordinarily I would be indifferent between installing Ubuntu 12.04 and Ubuntu 13.10 because either release can be upgraded directly to the Long Term Support version of Ubuntu 14.04 when it is released in April, 2014. In your case however I would prefer Ubuntu 13.10, because as a programmer you would benefit by having the latest packages available from the Ubuntu Software Center.


Problem when changing permissions of a folder in a NTFS filesystem

Please have a look at man mount:

  Mount options for ntfs
  [...]

  uid=value, gid=value and umask=value

  Set the file permission on the filesystem.
     The umask value is given in octal.
     By default, the files are owned by root and not readable by somebody else.

The solutions is to set the right mount options.

If you use the option umask=0002 the files can be read by everyone.
But only the owner and group members may write to them.

Note: 774 <--> ug=rwx,o=r is not what you want. If there is no "executable" bit for a folder you can't access it (e.g. cd folder will fail).


First of all PHP is platform independent so nothing to do with unix or windows.

Now coming back to you problem reason could be:

You are including some php file (that contains some error) using 'include' or 'require' statement in the file that you are trying to access.
Do you have some javascript written in header of PHP page? If yes, error in that javascript page can also cause a blank response.

Try to create a new simple php file having nothing more than an echo statement. And try to access it & see if the problem persists.


It is possible to use ssh shared connections and preventing getting them closed?

Yes. Use ControlPersist. For example, my ~/.ssh/config looks like this:

Host *
  ControlMaster auto
  ControlPath ~/.ssh/control/%r@%h:%p
  ControlPersist 3600

(if you use this, you'll need to create the directory ~/.ssh/control)

Using this, shared connections stay open and get reused.


Please visit; Brother Drivers for Linux® distributions and read Linux Informations for system requirements, installation procedures etc.

After you have done so proceed as followed:

Choose either:

  Printer (CUPS): Driver Install or
  Printer (LPR) : Driver Install

Depending on your choice, proceed to follow the commands to install the required driver or (easy way) download the .deb file and install your drivers through USC (Ubuntu Software Center).


How to change brighness on Lubuntu desktop?

execute any of these inside root terminal

echo 1 > /sys/class/backlight/acpi_video0/brightness
 sudo echo 1 | sudo tee /sys/class/backlight/acpi_video0/brightness

if /sys/class/backlight/ folder is empty

nano /boot/grub/grub.cfg
 add this to kernel line

acpi_osi=Linux acpi_backlight=vendor

or

nano /etc/default/grub

see a line like GRUB_CMDLINE_LINUX_DEFAULT
and add

acpi_osi=Linux acpi_backlight=vendor

save and run

update-grub

to save changes to grub

reboot

......


pip raises ImportError: cannot import name HTTPSHandler

After some struggling I figured it out. In short (not really sure if the first command is necessary):

sudo apt-get install libssl-dev
sudo apt-get --reinstall install libpython2.7-stdlib

The long explanation is that, based on the places Python is looking for libraries:

python -c "import sys; print sys.path"

and seeing that there was an _ssl.so file in /usr/lib/python2.7/lib-dynload on a "healthy" other 14.04.1 server, I figured out that the package responsible for this is libpython2.7-stdlib:

$ dpkg -S /usr/lib/python2.7/lib-dynload/_ssl.x86_64-linux-gnu.so
libpython2.7-stdlib:amd64: /usr/lib/python2.7/lib-dynload/_ssl.x86_64-linux-gnu.so

After reinstalling libpython2.7-stdlib on the original machine, the file was recreated and the problem went away.

sudo apt-get --reinstall install libpython2.7-stdlib

(I really don't know how or why was this _ssl file missing from the system - I'm not the only person using the server...)


It is not exactly the same question but you may have an answer in this ticket: How to fix "sudo: unable to open ... Read-only file system"?

A file system can be switched to read only by the system if there is a consistency problem detected. You can switch it back as mentioned in the ticket above.


Start with changing the date to a format that you can easily increase by 30 seconds, e.g. Unix timestamp:
timestamp=$(date -d 2021-05-02T04:10:00 +%s) # --> 1619921400

then you can increase the timestamp like this:
timestamp=$((timestamp+30))

To get your preferred filename, use date:
date -d @$timestamp "+Garden%F_%H-%M-%S.wav"

Now loop your files and combine the commands:
timestamp=$(date -d 2021-05-02T04:10:00 +%s)
for f in *.wav; do
    echo mv "$f" "$(date -d @$timestamp "+Garden%F_%H-%M-%S.wav")"
    timestamp=$((timestamp+30))
done

Once you're happy with the output, remove the echo.


Dual nVidia GPUs (3 monitors) not working in 11.10

it turns out that Unity and Xinerama do not play nice together anymore, as Xinerama and Composition cannot be run simultaneously.  until rrandr takes over multi-gpu stuff, or until twinview gets much smarter, multi-gpus will not be possible for most newer window managers (Gnome3 suffers from this same problem).

i tried backing down to ubuntu classic to get it to work, but i'm tired of screwing with it.  it would replicate the same screen on all 3 screens, but wouldn't treat them as one big one.  sadly, there's no real great examples of how to get this to work in xorg.conf.

so for anyone else trying this, you're pushing a rope in respect to Unity/Compiz.  you can probably get it to work in Ubuntu Classic, but be prepared for a fight.

this is pretty sad.  if i could get Windows 7 running on this box, i'd use it and run linux in a VM.  that's what people are going to have to do to get this stuff running on multi-GPU systems.


Ubuntu 18.04 /w Macbook Pro: Kworker keeps hogging up my CPU

According to this : https://www.reddit.com/r/Ubuntu/comments/7uwz3r/1604_lts_vs_1710_on_2015_macbook_pro/dto1mtb/

this following "tricks" works fine for me (same machine, same problem, same gpe) :

sudo -s
crontab -e

and add this following line at the end :

@reboot echo disable > /sys/firmware/acpi/interrupts/gpe06


How to close the mouth of chromium for asking gnome-keyring password?

As described here you can set the keyring password to blank.

  Go to System/Preferences/Password and Encryption keys, right click the appropriate folder and click Change Password. Put in your old password and leave the new one blank.

Answer taken from here


postgresql vs postgresql-server-dev package

postgresql-server-dev contains the header files and other components required to compile PostgreSQL extensions. Extensions are add-ons that get loaded into the PostgreSQL server. The majority of people only use extensions from postgresql-contrib or those like PostGIS that're already packaged, so you probably don't need this package. It's harmless if installed though.


Will the Hard Drive be ever used for temporary storage when running Ubuntu from a USB bootable drive?

AFAIK temporary files are written to a /tmp directory on the USB drive and application specific stuff usually gets put into your /home directory. Unless you explicit created a persistent partition on the drive then all of this gets removed when you reboot.

Based on the nature of your question it sounds like tails would be a good option for you to look into: https://tails.boum.org/

I think it does some extra stuff like scrubbing RAM.


Netbeans cant run project anymore after taking the power from my computer?

I found out that the project got corrupted, so I made a new one and copied the sourcecode. Now it runs fine.


MAAS / Juju bootstrap - node installation via PXE loops at partitioner step

So I managed to fix this, turned out it wasn't properly detecting my raid configuration.

During the install I pressed CTRL + ALT + F2 and opened up another console, then I ran the command dmraid -ay and everything continued as it should


Error while running 'glance image-create' command

Try this:

Open a terminal,Press Ctrl+Alt+T

Run it:

$ sudo -i
# nano /etc/glance/policy.json

In the open file change the following line:

"publicize_image": "role:admin",

With:

"publicize_image": "",

Ctrl+O Save file. Ctrl+X Close nano.

Then restart glance:

# glance-control all restart

Source


Terminator: shortcuts don't work after switching the keyboard layout

This also might be because you have german keyboard which physical layout is different than US or polish (for example the ? symbol on US software layout on nordic and German keyboards is typed by holding shift and pressing - symbol.

All regional keyboards have different layouts (with exception of modifier, function, cursor, system command and numeric keys)

Here is example of US keyboard layout


Problem running .jar as excetutable-- i'm confused

What about (opening a terminal) and running:

java -jar /path/to/externalJarFile.jar

If you want to be able to double click: Check Here

And to make the jar file executable:

chmod +x /path/to/the.jar


Package held back by apt despite being marked install

I found the problem. When I went to run apt-cache as requested in the comments, I discovered there was an old version of wine installed from the Ubuntu repositories in parallel to that from winehq. When I removed the old version, it removed my entire wine installation, so I reinstalled and now everything is working.
Not sure how the two got installed in parallel, but I'm not the only admin on the machine in question.


Linux in general (and Ubuntu specifically) have no problems booting from a logical partition, therefor its safe to use these for all partitions you choose to create. The Ubuntu installer will always create logical partitions anyways and its not a good idea to override this behavior since you can only create up to 4 primary partitions.

(The only operating system still in use today that has problems with booting from logical partitions is Windows XP by-the-way)


Can't create a folder on my newly created partition

You can not read/write directly to block devices--/dev/sd? devices.

You need to format and mount partitions.

Ubuntu automounts most partions under the /media folder with a GUID mount point.

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


Use to install all in one packet mysql + apache2

sudo apt-get install lamp-server^

if you need ruby + passanger use it (download and install rvm+ruby)

    sudo su
      apt-get install mysql-server libmysqlclient-dev git-core subversion imagemagick libmagickwand-dev libcurl4-openssl-dev

  curl -L https://get.rvm.io | bash -s stable --ruby=2.0.0

Activate ruby

 source /usr/local/rvm/scripts/rvm

Auto activate ruby rvm

  echo '[[ -s "/usr/local/rvm/scripts/rvm" ]] && source "/usr/local/rvm/scripts/rvm"' >> ~/.bashrc

Install webserver with passanger mod ngnix/apache2

gem install passenger --no-ri --no-rdoc
passenger-install-nginx-module

Configiure ngnix

 git clone git://github.com/jnstq/rails-nginx-passenger-ubuntu.git
    mv rails-nginx-passenger-ubuntu/nginx/nginx /etc/init.d/nginx
    chown root:root /etc/init.d/nginx
    update-rc.d nginx defaults
    nano /opt/nginx/conf/nginx.conf


If you don't know what parameters a command takes type

man command

e.g. man dconf.

NAME
       dconf - Simple tool for manipulating a dconf database

SYNOPSIS
...

dconf reset [-f] PATH

...

COMMANDS

...
reset
           Reset a key or an entire directory. For directories, -f must be
           specified.
...

In this case, the man page tells me that -f specifies a directory.

While the use of -f in dconf has a specific meaning in dconf.  -f in other commands may mean something else entirely.

For example, in the ps command it means "Do full-format listing.  And in other commands it is used to reference a filename. (not a directory).


Using RTL languages with MS Office in Wine 1.4

If I recall correctly, you can use usp10.dll to make RTL fonts to display properly. This dll can be downloaded via winetricks. Also, if you install office using PlayOnLinux, this dll will be included by default.

If you want to make the RTL and LTR icons appear in office programs, you should first install Arabic, Herbew, ... language pack in Ubuntu, then you can run wine with proper LANG environment. For instance:

LANG=en_us.utf-8 wine /path/to/office/executable

replace en_us.utf-8 with your desired language.


How can I set up hourly Deja-Dup backups?

Install Scheduled Tasks:

Add a job to it with the following parameters (replace every minute with every hour or the schedule you want to use):

You can even hide the pop-up window by using deja-dup --backup --auto as the command or use X-Application: suppress outup in the default behavior drop box, it will hide the window while deja-dup runs.


This functionality is available by enabling the Apache userdir module with:

sudo a2enmod userdir

Your next step is to configure how you want Apache to handle the URIs.

Some examples:

If you want the URL http://localhost/~user1/site1 to load from the /home/user1/site1 directory, you need to use

UserDir ./

If you want the URL http://localhost/~user1/site1 to load from the /home/user1/sites/site1 directory, you need to use

UserDir sites

To add the configuration, and assuming you are using Apache 2.2, create the following file  /etc/apache2/conf.d/userdir.conf and add the following to it:

# This is just a safety measure to make sure the root user isn't used.
UserDir disabled root

# Swap the following line with whatever configuration you require.
UserDir sites

# If you chose "UserDir ./" instead of "UserDir sites",
# remove the "sites/" part in the next line
<Directory /home/*/sites/>
    Order allow, deny
    Allow from all
</Directory>

Once you're done, you will need to restart Apache:

sudo apache2ctl restart


Intel X4500 + 8GB RAM = no more MTRRs available and X freeze

Solution:

apt-get install linux-generic-lts-vivid

This installs the latest kernel and Intel graphics drivers, which do not seem to be affected.


How to remove the TWM desktop environment?


How do I free up space to install software updates?

Use sudo apt-get autoclean

Also FSlint is a utility which scans the entire FS (filesystem hence the name FSlint) for anything that can be removed including whitespaces (there might be a better one)

there is also remove orphaned packages tool which does you know what


Java 6 is no longer supported by Oracle (some updates are still available through Java SE Support program, but that's not available publicly - from Wikipedia). Install Java 8 or newer instead.


Is there a good text editor for VHDL(GHDL)?

The absolute easiest way to go would be gedit with plugins (specifically, the code snippet plugin)

sudo apt-get install gedit gedit-plugins

gedit has the benefit of working well with GHDL.

Emacs (which should come pre-installed on your machine) has a very useful VHDL mode documented here.

If you want something more full-featured, Scriptum is very full-featured and comes with support for other languages such as Verilog, C/C++, and Xilinx UCF. Its download page is here. (You have to fill out a form, but it's free and doesn't require a license.)


What is the difference between these commands for removing all partitions and which is preferable?

The value provided for block size options is base 10. The default value for both input and output block sizes is 512 bytes.  A larger block size results in more memory being used by dd, and is usually faster.

count=BLOCKS
      Copy BLOCKS `ibs'-byte blocks from the input file, instead of
      everything until the end of the file.
notrunc'  Do not truncate the output file.
sync'     Pad every input block to size of `ibs' with trailing zero bytes.

dd Manpage


Trying to start nginx on VPS, I get "nginx: unrecognized service"

The nginx: unrecognized service error means the startup scripts need to be created.
Fortunately the startup scripts have already been written.

We can fetch them with wget and set them up following these steps:

# Download nginx startup script
wget -O init-deb.sh https://www.linode.com/docs/assets/660-init-deb.sh

# Move the script to the init.d directory & make executable
sudo mv init-deb.sh /etc/init.d/nginx
sudo chmod +x /etc/init.d/nginx

# Add nginx to the system startup
sudo /usr/sbin/update-rc.d -f nginx defaults

Now we can control nginx using:

sudo service nginx stop
sudo service nginx start
sudo service nginx restart
sudo service nginx reload


Using the *.run installer makes your updates depend on manual operations.

I suggest you instead have a look in

  System Settings > Software and Updates > / Additional Drivers \

Selecting:

  (*) Using NVIDIA Binary Driver - ...

... in here, will have you get updates automatically, without manual intervention.

The updates might not happen for every bleeding edge driver release, but instead you have a stable hassle free time using the computer.

If you REALLY wish to install the *.run driver; make sure you put it in a place you can find it when using the recovery console; e.g. put it in the root home directory:

  sudo -i
  cd; mv /the/path/<...>/*.run .

Then reboot into the recovery console and run the installer from there

  bash NVIDIA<...>.run

Due to the way this installs; you may, at a later point in time, encounter problems in case of kernel & gui driver (e.g. xorg) updates.

If that happens, the "easy" fix is to use the recovery console to
--uninstall the driver and then immediately
--install it again,
after having made sure you booted with the NEW software active (i.e. using the new kernel).

Caveat: That strategy worked well on 14.04, haven't tried it since...

Note:
bash NVIDIA<...>.run --help | less
will tell you a lot.


The package is not available in the 20.04 LTS repository, but you can still install it manually by downloading packages from 18.04 LTS manually:
mkdir -p ~/Downloads/emma
cd ~/Downloads/emma

wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-gtk2_2.24.0-5.1ubuntu2_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/p/pygtk/python-glade2_2.24.0-5.1ubuntu2_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/p/python-mysqldb/python-mysqldb_1.3.10-1build1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/main/m/mysql-5.7/libmysqlclient20_5.7.33-0ubuntu0.18.04.1_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/e/emma/emma_0.6-5_all.deb

sudo apt-get install ./*.deb

and then use it as before.


Where can I download GNOME Shell themes?

There's a GNOME Shell group on Deviant Art, where you can find a lot of useful stuff. GNOME Shell Themes Gallery on Deviant Art.


Change Login Manager with face recognition

Face Recognition isn’t technically one of the most secure ways to unlock your desktop. There is a software called howdy
Using the central authentication system (PAM), this works everywhere you would otherwise need your password: log in, lock screen, sudo, su, etc

Step 1: Install via PPA on Ubuntu by opening a terminal and typing:

sudo add-apt-repository ppa:boltgolt/howdy
sudo apt update
sudo apt install howdy

Step 2: After installing you need to let Howdy recognise your face, by entering:

sudo howdy add

Note: It is recommend doing this a few times to adjust for different lighting, distance from the camera and other enviromental variables.

Note: If you want to install directly using a .deb file download the file https://github.com/boltgolt/howdy/releases/download/v2.5.1/howdy_2.5.1.deb


Lenovo X131e Chromebook Xfce4 USB Read and Write Problem

Are you trying to install games with root access account?

Also it depends on how you have formated the USB drive.. often they are FAT32 and if so, it may cause this problem.

If you format your USB to extX then you and simply use chmod and chown to set permission and owner for you USB.


This is a bug in upstream ("upstream" means, like, "original") Firefox. According to some sources this can be worked around by putting MOZ_USE_XINPUT2=1 to /etc/environment file, and rebooting (I tried exporting it directly in bash and running Firefox, but it didn't work for me, putting it to environment seems to work at least for the OP here).

For some reason I haven't found the upstream report about scrolling. I found though this report on launchpad that asks Ubuntu to package Firefox with MOZ_USE_XINPUT2=1 by default, which in turn has comments with links to some related upstream bugreports. FWIW, the reason they don't package it with the env. variable by default is summed up in one of comments by Nate Graham:

  The problem is that setting the envar just substitutes some problems
  with different ones:

  Without this envar set, there is no touchscreen scrolling, and touchpad scrolling goes three lines at a time rather than
  pixel-by-pixel
  With this envar set and a notification appears, touchpad scrolling is interrupted and mouse wheel scrolling stops working entirely until
  Firefox is de-focused and re-focused

  The correct solution is to fix these bugs, not toggle between two
  broken states


There is some problem which I don't know the technical details of with the drag and drop option but you still can use the shared folders you can access them by host or virtual OS on virtualbox check the link  for more details


An outstanding challenge to get my Wifi to work on my Laptop... I need a new fresh idea do you have it?

Here is a fresh, new idea. Please get a temporary wired ethernet connection, open a terminal and do:

sudo apt-get install linux-firmware-nonfree

Detach the ethernet, reboot and let us hear your report.


Is there any meaning to version names does not starts with *.01

Ubuntu releases are yy.mm in format, so 18.04 means the 2018.April release of Ubuntu (and flavors).

Most releases are made in April (.04) and October, though the first release of 2006 occurred in June, so it was 6.06 (2006.June).

The LTS releases are generally the first release of the even year, so Ubuntu 18.04 LTS was a long-term-support release, but you should still check the release notes (esp. for flavors, eg. Ubuntu Studio 18.04 was not a LTS release, but with PPA added you can still get 3 years of extended support by adding the PPA - https://ubuntustudio.org/2019/04/ubuntu-studio-18-04-extended-support/)

https://wiki.ubuntu.com/Releases

As added in comments: this makes it very easy to calculate when a release goes EOL.  eg. Ubuntu 14.04 LTS was released in 2014.April with 5 years of supported life, so it's EOL is 2019-April (14+5).04.  The math for non-LTS releases isn't much harder just involving 9 months :)


It is sufficient to reinstall the Windows bootloader. From that moment on, the machine will directly boot into Windows. See the manual of MS Windows to learn how to reinstall the Windows bootloader.

To free the disk space occupied by the unused linux system, you simply could reformat the Ubuntu partition with a file system supported by MS Windows so you can use it for data storage under Windows. Alternatively, you could repartition the drive. Then, you could delete the Ubuntu partitions and create partitions as you see fit.


HP Printer stopped working with 18.04 upgrade

StackExchange works great! No sooner than I post my question, I find the diagnosis and solution.

This is not an issue with my printer or its drivers! This is an issue with broken Ghostscript dependencies. Several people have encountered this. If you're facing this problem, go check the following post: Broken ghostscript configuration

This has the diagnosis and the solution.


Managed to sudo -u bob -- ssh bob@node
Seems that sudo was passing the scp commands.


I am not able to access any wireless network

Try this command on terminal,

sudo rfkill unblock all

And then search for wifi networks.


sudo grep -ir WKS00355-root /var/log/ ; dmesg | grep WKS00355-root

It would certainly appear that SOME kind of error is causing your root partition to go read-only, so you'll need to look through the logfiles to try to figure out why.  The above command should return something relevant.

If it doesn't, the error in question might be in a logfile that's already been compressed and archived.  Easiest thing to do, if uptime isn't an issue, is just to reboot and then immediately issue the command above if root is still read-only.

What happens if you issue the command sudo mount -o remount,rw / ?


Same issue here in Ubuntu 19.10, apparently because of the new clipboard manager on the mutter 3.34.  This bug already has been reported on launchpad (https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/1852183) and should be fixed in gtk3 3.24.13 and mutter 3.34.2.


Found this regarding Ryzen Stability on Linux https://cialu.net/how-to-make-a-ryzen-build-stable-on-linux/

The issue on bugzilla

Haven't tried it yet the fix seems to involve fiddling with bios settings.

** UPDATE **

Ryzen Segfaults

It seems a number of Gen 1 Ryzen Chips are inherently flawed and likely to produce segmentation faults specifically in Linux(or any unix-based kernel I assume).

You can test this with a simple script named at github Kill_Ryzen which you can run from a live-(cd/usb/dvd).  I believe you can then RMA it to AMD for a replacement, not sure if the RMA is valid right now though.

** Update #2 ** Solution?!?

For anyone with a first-generation Ryzen experiencing these issues, this solution 'should' work.

Update Motherboard bios,  Then set Power Supply Idle Control from
Auto to Typical Current Idle.  The setting should but somewhere under CPU settings, possibly under overclocking.

Tracking with uptime 'tuptime' ( sudo apt install tuptime )

  Current uptime:         4 hours, 40 minutes and 3 seconds   since   05:55:31 PM 07/26/2019

We'll see it stays stable


I had this problem with one of my usb stick some time back, this is what i did.

Install HP usb disk and format the usb with file system as FAT using this tool.
Download and use Rufus to create a bootable Ubuntu usb.

This should do the trick.


Reinstall 14.04 fails to recognise separate /home. Can I recover old home?

The answer depends on whether you want to keep the separate partition for /home or you are fine with having everything on one partition (assuming your "new /home directory" is not on a separate partition).

If one big partition is okay or your new /home is on an additional new partition, then do this:
Copy the files from the old home to the new one, log out and back in (so settings you made in files you copied back get applied) and delete the old home afterwards.
There are lots and lots of ways to copy those files, probably just using the file manager would work if you set it to display hidden files and copy those too. Other ways include "cp" and "rsync" (see their manpages).
Deleting the old /home partition could be done using "gparted" (easiest) or various other tools.

If you want to keep the separate old partition, then you need to edit your /etc/fstab file so the partition is automatically mounted to /home at boot. Afterwards the unwanted new /home directory is hidden behind the other one, or you can delete it.
For information on how to edit that file, look at: https://help.ubuntu.com/community/Fstab


All of my files have disappeared from ubuntu one

If you are using Ubuntu 11.04 your files are moved to the trash rather than deleted by Ubuntu One. If you are on a different version of Ubuntu then we may be able to recover your files if they were in your Ubuntu One folder. Please contact support at https://one.ubuntu.com/support/contact

Ubuntu One should never delete your files without being told to do so. One scenario where files are deleted is when there is a new install of Ubuntu and the ~/.local/share/ubuntuone folder from an old backup is copied to the computer. There is an FAQ about this. Other times when files are being synced between multiple computers, there is confusion about what happens when you delete all the synced files from one computer. This will delete files from the server and all connected computers.


Icons too big after migration from 14.04 to 16.04

You can try to open unity-control-center, then select Displays in it and set other screen Resolution (preferable native for your monitor):

from terminal with

unity-control-center display

from GUI by clicking on Gear in top right, select System settings and then Displays (you can move window by clicking Alt+F7).
or programmatically (change '1920x1080+0+0' below to your resolution, second part resets scaling which may be the problem too)

sudo apt-get install dconf-cli

dconf write /org/compiz/profiles/unity/plugins/core/outputs "['1920x1080+0+0']"

dconf write /org/gnome/desktop/interface/scaling-factor 'uint32 0'
dconf write /org/gnome/desktop/interface/cursor-size 24
dconf write /org/gnome/desktop/interface/text-scaling-factor 1.0
dconf write /org/compiz/profiles/unity/plugins/unityshell/icon-size 48

if above does not help try XRandr - xrandr -s 1920x1080.

If you do not have personal settings of Unity and/or GNOME you may want to backup

dconf dump / > dconf_backup

and then reset them with:

dconf reset -f /org/compiz/
dconf reset -f /org/gnome/
dconf reset -f /com/ubuntu/user-interface/

also try

unity --reset


I get an error when trying to convert video

You're doing a two pass encoding, but you haven't made a first pass yet (which would have created the log file). Besides, you're using some options which are ambiguous.

If you don't need a specific target file size, a two pass encode is unnecessary.

Try this:

ffmpeg -i 10.mp4 -c:v mpeg4 -vtag xvid -qscale:v 3 -c:a libmp3lame -b:a 128k -vf scale=640:360 10.avi

-qscale:v 3 specifies the desired video quality, 1 would be very high quality / big file size, 31 the lowest quality / small file size

For a 2 pass encoding, see the example in the ffmpeg wiki.


Networking.service takes 5 minutes after uninstalling network-manager

This solved the problem.

Opened /etc/init.d/networking and set CONFIGURE_INTERFACES=no


I can use my Java SDK Ubuntu installation when Wine need it?

Why can't Wine use my JRE installation instead of installing Windows JRE?

Linux executables are generally not compatible with Windows (they do not run in Windows). In particular the Linux versions of JRE are not compatible with Windows programs. Only Windows versions of JRE are compatible with Windows programs, so you need to install the Windows JRE in order for it to be compatible with Windows programs running in Wine.
Installation
The link to download the Java file you want is: Java Downloads for Windows. Download an Offline Java version. The installation instructions are available at the official What is the offline method for downloading and installing Java for a Windows computer? webpage.