Formatting USB stick with 11.10 is unreadable with Windows 7

Open up Disk Utility, insert your USB stick. It should list under Peripheral Devices (left side). Click on it.

On right side click unmount volume and then Format Volume (not Format Drive). If only format drive appears and Format Volume does not appear read till last.

A window pops up. In type select FAT, give a name and then hit format. It asks for confirmation, press format.

After formatting press Mount Volume again.

Go to home using the File Explorer (gui, nautilus, home button), or select the drive using unity lauch bar. See if you can create new file or directory. Right click on a blank area inside file explorer (file manager) inside your drive and select properties.

If Filesystem type: says msdos. It is perfect (FAT32), it should work on windows or linux (unless you are trying to copy a file larger than 4G). 4G being limit for FAT. In Disk Utility if you don't see Partition Type: w9 FAT32 and options like Unmount Voulme or if not mounted Mount Volume, Format volume, Check Filesystem, Edit Partition, Delete Partition read on. These options should be shown in lower half below Volumes(thick black above your driver partition gui).

If you only see buttons above Volumes like Format, Safe Removal and Benchmark you have only Formatted the Drive but not created a Volume. You have to create a filesystem in a drive before you can use it.

These all steps seems lame, but if you have missed anything, it might help, if not your USB stick is damaged, get a new one.

Warning: Don't just vaguely format drives under Local Storage (you might have no os to boot into).


Wi-Fi doesn't work with Bluetooth on Ubuntu 15.04

I finally got the problem. Correct me, if I am wrong.

Your built-in bluetooth Atheros adapter works, but when you use headphones, wireless disconnects.
Logitech usb dongle does not work at all.

If that is correct, then there is a solution. Logitech dongle is supported by kernel, but it conflicts with internal bt chip. You can disable internal bluetooth by

echo '"SUBSYSTEM=="usb", ATTRS{idVendor}=="0cf3", ATTRS{idProduct}=="0036", ATTR{authorized}="0"' | sudo tee /etc/udev/rules.d/81-bluetooth-hci.rules

And reboot.


There is another package in the Ubuntu official repository/universe with the same name mdm, see packages.ubuntu.com

  Package mdm

xenial (utils): Utilities for single-host parallel shell scripting [universe]
0.1.3-2.1: amd64 i386

Possibly, you have installed the wrong package. Check:

sudo apt-cache policy mdm
which mdmsetup

I think this should be reported to Mint dev as bug.

Well now it is clear that you don't have mint mdm installed.

Remove mdm got from official repository

sudo apt-get purge mdm

Download mint mdm and its related themes from a mirror or the Mint official repository:

http://packages.linuxmint.com/search.php?keyword=mdm&release=Sarah&section=any
Install it using software center (double click) or command, example:

sudo dpkg -i mdm_2.0.7+rosa_amd64.deb


How to setup an intranet in ubuntu using wifi?

Does this help?  The answer in this question points to a few methods to get set up.

How to get a VPN for Ubuntu


Can't save files in /var/www using lamp installed with tasksel

If you are going to be the user maintaining the site, then make it so that your userid can edit the files.

cd /var/www && sudo chown -R `whoami`:`whoami` .

If you do this, then you will be able to modify the files under /var/www because the files will belong to you and your personal group.  The -R runs the command recursively - it runs on the current file (the directory) and all the files in and under the directory (included the hidden files)

If you have not run a sudo command recently (a few minutes), it will ask you for your personal password.

It is also possible to set up groups and all that.  However, this is the simplest way.

Make sure that the files are readable by the web server.  If this is a problem, then - because you own the files now you can use chmod command:

cd /var/www && chmod -R o+r .

If this does not make the directories executable, you may want to also do:

find /var/www -type d -print0 | xargs -0 chmod o+x

This will (find) collect the list of directory names and pass them on (as a null delimited list) to xargs, which will execute the chmod to make the directories executable.

As reported at related: Whats the simplest way to edit and add files to "/var/www"?, – Desmond Hume Nov 12 '12 at 14:42 suggested to
@DonFaulkner

For security reasons, it's probably better keep /var/www owned by root:root, so instead of sudo chgrp -R www-data /var/www it better be sudo chgrp -R www-data /var/www/*


Pf kernel on ssd is it worth it (Ubuntu 13.04)

According to the BFQ page, that IO scheduler has lower latency (than cfq noop deadline and android-only sio) and identical throughput on SSDs.  The kernel is also more recent than the 13.04 default, always a plus for performance and functionality.


Which files contain information about the physical partition?

To my knowledge, there are no files in Ubuntu which store or are dependent on the physical characteristics of the hard drive. All the information about the partitions is stored in the MBR and other data structures, which are outside of any filesystems (doing otherwise would create a chicken-and-egg problem, right? :)).

The only file which comes to mind is /etc/fstab, which contains UUID of partitions - if those UUIDs changed then obviously you should not override that file.

Also, /dev, /proc and /sys are virtual filesystems - they don't contain real files, rather they provide a view into kernel's internal data and configuration. You should not backup those directories and you definitely should not attempt to restore them from a backup.

If your system boots, I would also probably avoid touching /boot, just in case.


Any way to enable dynamic/automatic brightness adjustment?

You could have a look at WildGuppy which will adjust your brightness according to the light it gets from your webcam (not according to your screen content though).


Missing Maximize, Minimize and Close buttons in Chrome - Ubuntu 18.04.03

This morning I sudo apt-get upgraded my machine and with that chrome was upgraded to the latest version (subversion .111 over .75) and now my buttons have returned. Guess it was just a chrome bug. Hope this helps another ubuntu user.


Finally found the solution here at the "Balance cannot run because the filesystem is full" paragraph

Turns out the metadata was full and I had to add an empty device in order to rebalance the FS. No idea why this happened.


How do I run a command using libertine-container-manager exec

Use

libertine-container-manager exec -i container-id -c "setxkb dk dvorak"

or any ways -c "and the command you want to run"


How to use scroll lock as a keyboard shortcut [18.04/GNOME]?

Answer: gsettings set org.gnome.settings-daemon.plugins.media-keys volume-down "['Scroll_Lock']"
Explaining to myself (for future reference):
Ubuntu comes with xev, that capture input from keyboard and mouse.
Open xev and press scroll lock, there you can see what is the command associated with the key

"Scroll_Lock" is the string that represents the key scroll lock.

Observation:
Some popular media keys can be found inside /usr/share/glib-2.0/schemas/org.gnome.settings-daemon.plugins.media-keys.gschema.xml
For example, there you will find that XF86Calculator is the media key that open the calculator and XF86AudioPause is the media key to pause. You could make this keys do another command or action, for example:
gsettings set org.gnome.settings-daemon.plugins.media-keys volume-down "['XF86AudioPause']"

Custom keybindings:
Very annoying... I recommend you to create a custom keybinding empty and add the key using the terminal.
gsettings set org.gnome.settings-daemon.plugins.media-keys.custom-keybinding:/org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/custom0/ binding 'Scroll_Lock'
custom0 is the first custom keybinding
custom1 is the second custom keybiding
custom2 is the third custom keybinding...

References:
https://wiki.ubuntu.com/Keybindings
https://techwiser.com/custom-keyboard-shortcuts-ubuntu/


Ubuntu Detects 2 monitors when I only have one

This seems to be an issue with certain motherboards that have an HDMI and a Display Port. I figured out that either my Gateway ZX6800 Touch-Screen is using a certain Laptop motherboard with the on-board Intel HD chipset that supports this or it is seeing the IR Blaster or TV Tuner and driving it as a monitor.

Either way the fix is:
Edit /etc/default/grub
add "video=VGA-1:d" between the quotes in the GRUB_CMDLINE_LINUX line
update-grub

Look in /sys/class/drm for a list of your computers outputs.Mine was labelled as "card0-VGA-1". Just remove the "card0-" and that's the name of the output in question.


installing ubuntu on my windows 10 laptop

The steps to create a dual boot system with win 10 and ubuntu are:
 Steps For Dual Booting Windows 10 And Ubuntu
The steps required for dual booting Windows 10 and Ubuntu are as follows:

Backup your Windows 10 operating system (optional but highly recommended)
Create a Ubuntu USB drive
Enable booting from a USB drive
Shrink the Windows 10 partition to make space for Ubuntu
Boot into Ubuntu live environment and install Ubuntu
Amend the boot order to make sure Ubuntu can boot

source


After upgrade to Ubuntu 13.10, system is very slow

Just found the issue for me.  I unplugged my webcam and it's now starting and logging in faster than expected.

Can you test this and see if it makes a difference?


You can't disable the firewall remotely. Disabling a firewall remotely (without using ssh to get into the console) defeats the purpose of the firewall!

I'm afraid you are going to have to use Amazon's EC2 control panel to get into it. I'm not familiar enough with EC2 to guide you exactly how to do it, but I'm sure they have some kind of recovery process or console connection to it.

If you give me a little bit, I can try logging into my EC2 and see how to do it.


The Ubuntu Hashes page  doesn't list SHA256 hashes but only MD5 hashes.

See http://releases.ubuntu.com/14.04.1/SHA256SUMS for SHA256 hashes of the 14.04 images.


KDE - run particular commands in particular workspace at startup

1) Install wmctrl

sudo apt-get install wmctrl

2) Create a file with the following content and make it executable

#!/bin/bash
wmctrl -s 0 #Switches to workspace 0 [workspaces are numbered from 0]
gnome-terminal & #Say you want a terminal in the 0th workspace
nautilus & #Maybe a file browser too
sleep 2 #Windows take some time to open. If you switch immediately, they'll open up in wrong workspaces. May have to change the value 2.
wmctrl -s 1 #Switches to workspace 1
firefox & #You get the idea. Continue for all workspaces
sleep 2
wmctrl -s 0 #You will be left at this workspace when the script finishes executing

3) Call this script from .xsessionrc in your home directory [if you may have to create this file] to automate the process at each login. Or you can just call it from a terminal when needed. EDIT: Put it in "Startup Applications", not .xsessionrc. .xsessionrc will execute even before the desktop environment has finished loading.

You may want to create a custom xsession so that you have two sessions to choose from, one which opens these applications automatically and one which doesn't. But that seems unnecessary to me.

If you feel that switching to a workspace, opening appropriate applications and then switching to the next is time consuming you can open all applications in one shot, and then move the windows using wmctrl. For example

wmctrl -r 'Firefox' -t 1

will shift a window with Firefox in it's title to workspace 1. If more than one window exists, the first in the list of windows managed by wmctrl will be moved. You'll need to know the title of the windows that will be created by the applications to use this. That's why I didn't suggest this as the primary option. If titles will be unambiguous as is the case with most commonly used apps then this is the way to go.

Opening applications in fullscreen:

Some applications like gnome-terminal have command-line arguments to open a window in maximised state or in fullscreen mode. If such options exist use them. Otherwise use wmctrl as follows

wmctrl -r 'username@machinename' -b add,maximized_vert,maximized_horz

This maximises my (already existing) terminal window.

wmctrl -r 'username@machinename' -b add,fullscreen

This sends the window to fullscreen mode.

Go through wmctrl's man page. You may find use for more of its functionality.

This answer was taken from this source.


Install pycharm-community on ubuntu 16.04

The pycharm-community snap package can be installed from the terminal in all currently supported versions of Ubuntu with the following command:

sudo snap install pycharm-community --classic

Note that a snap in classic confinement behaves as a traditionally packaged application with full access to the system, and PyCharm plugins are installed into the user's home directory.

I tested the pycharm-community snap package, and the Snap Store is working. There may be a problem with Ubuntu Software not being up to date. I have experienced problems installing snap packages from Ubuntu Software that were immediately solved by installing that snap package from the terminal. I prefer to install snap packages from the terminal, because I like to run a command like snap info pycharm-community to get information about a snap package before I install it. For example pycharm-community has 3 stable installation channels, as well as 3 candidate, beta and edge channels, for a total of 12 channels.


How to optimize power consumption for Ivy Bridge?

You can use powertop, which is not specifically for Ivy Bridge, but in general will help.

 To install, open a terminal and enter

sudo apt-get install powertop
sudo powertop

It will give you some interactive way to look high power consumers.


Get the packages with apt-get download and extract files that you need.

Or set up an armhf chroot on Ubuntu/Debian desktop (using schroot) and build ghc there. Then take files that you need.


How to get out of /opt folder using cmd line?

You can not get "out" of a folder.

Well, you can, but only by changing to a different directory.

In the terminal, you always have a current working directory. The cd command changes this working directory to the specified one.

Running the cd command without any arguments brings you back to the default working directory, which is your home directory /home/USERNAME (or short ~).

So probably you just want to go back to the default working directory by simply typing cd.

However, if by "get out of a folder" you meant to go to the directory one level above in the hierarchy (e.g. from /usr/bin to /usr or from /opt to /), this can be achieved by changing to the special directory .. which always represents the directory a level above.

Note that unlike in Windows/DOS, you may not leave the space between cd and .. out!

cd ..


Hardening my Ubuntu 10.04 OS against ungraceful shutdowns

Most embedded devices will split their storage into several sections.  You could mount the OS partition read-only with a read-write ramdisk overlay -- any changes are not written to disk, so nothing to corrupt, and no possibility of the state changing on boot up.  Add an additional partition for any data you need to write persistently, and use (if you're using ext3/4, data=journal will help ensure data consistency beyond the normal journaling.)

Note: you'll need the ramdisk overlay as many applications write various state files into /tmp or /var.


sharing drives, folders, and files between kububntu and windows running in virtualbox

You should be able to set up the shares in Virtual Box under "Shared Folders".  If it is running, there is an icon on the status bar (if you're not running full screen), or if not, in the settings dialog.

Choose "Add Share", fill in the path and name, select "permanent" and "auto mount" if you always want it mounted.

In Windows, use Explorer to share it normally.  It may be under "VBOXSVR" in the network, depending on how networking is set up.  If you don't see it, you may need to change the way you set up the network under Virtual Box.


What do I do with the ubuntu-16.04-desktop-amd64.iso?

amd64 denotes that it is suitable for 64-bit processors, either Intel or AMD.  On Linux, 64-bit installation files use either amd64 or x64, both meaning exactly the same thing.

You have to create an installation DVD with the .iso file you have downloaded and then boot your system with that DVD.  The installation procedure will start automatically after that.  Alternatively, you can create a bootable USB stick by using software that's designed for this purpose, such as LinuxLive USB tool.


How to configure home router from terminal?

Xou can do this by using links2 which is a pure text based browser for terminal.

To install links2:

sudo apt-get install links2

Then you can call your router by its normal adress he has in the network example (taken from my network):

links2 192.168.0.1


Due to the mentioned page in your question

  Usage

  … A helper script named Magick++-config is installed under Unix which
  assists with recalling compilation options required to compile and
  link programs which use Magick++. …

I believe, you looking for the following:

% apt-file search Magick++-config
graphicsmagick-libmagick-dev-compat: /usr/bin/Magick++-config

and

% apt-file search Magick++.h

graphicsmagick-libmagick-dev-compat: /usr/include/Magick++.h

                                               and here is your header file:   ↑                                                            ↑

Therefore install graphicsmagick-libmagick-dev-compat

sudo apt-get install graphicsmagick-libmagick-dev-compat

Or simpler:

sudo apt-get install libgraphicsmagick1-dev

because:

% apt-rdepends graphicsmagick-libmagick-dev-compat | grep magick
Reading package lists... Done
Building dependency tree
Reading state information... Done
graphicsmagick-libmagick-dev-compat
  Depends: libgraphics-magick-perl
  Depends: libgraphicsmagick++1-dev
  Depends: libgraphicsmagick1-dev
libgraphics-magick-perl
  Depends: libgraphicsmagick3 (>= 1.3.5)
libgraphicsmagick3
libgraphicsmagick++1-dev
  Depends: libgraphicsmagick++3 (= 1.3.20-4)
  Depends: libgraphicsmagick1-dev
libgraphicsmagick++3
  Depends: libgraphicsmagick3 (>= 1.3.15)
libgraphicsmagick1-dev
  Depends: libgraphicsmagick3 (= 1.3.20-4)

% apt-rdepends libgraphicsmagick1-dev | grep magick
Reading package lists... Done
Building dependency tree
Reading state information... Done
libgraphicsmagick1-dev
  Depends: libgraphicsmagick3 (= 1.3.20-4)
libgraphicsmagick3


I had the same issue where about 3 - 5 of my 20 installed games had no sound on Ubuntu 18.04.

I followed the advice given by Peyto here and installed PulseAudio Volume Control.

After opening PulseAudio I started my game (Kingdoms and Castles in my case). In the playback tab a new item was listed but it was muted. I clicked the button to toggle muting and I could hear the music from the game!


Find/Replace special characters in text file using Bash script

sed text process is strictly line oriented, so it's pretty difficult to replace newlines with sed.
Untested:

cat file |
  tr '\n\t' '  ' |
  sed -e 's/ CP /\n/g' \
      -e 's/Mr[.] Mime/Mr.Mime/g' \
      -e 's/   */ /g' \
      -e 's/%//g'


Brightness key not working Acer ASPIRE v15

At first we need some information about the video card. Just to make sure the right one is working. For example it is a APU (CPU+GPU in one processor). Intel or AMD does not matter. In my example it is an i5 470U processor. For further use we need the ID of the graphic card:
$ sudo lspci | grep VGA

--> 00:02.0 VGA compatible controller: Intel Corporation Core Processor
    Integrated Graphics Controller (rev 02)
The ID is 0:2:0

For further information about the vide device use
$ sudo lshw -c video

We need to edit/create a config file for xorg:
/usr/share/X11/xorg.conf.d/20-intel.conf
For our example the following section has to be inserted:
Section "Device"
      Identifier "Intel Graphics"
      Driver "intel"
      Option "Backlight" "intel_backlight"
      BusID "PCI:0:2:0"
      EndSection
Section "Device"

Source: https://wiki.ubuntuusers.de/Grafikkarten/Intel/
Then the grub bootloader has to be edited to rewrite the list of supported OS.
This Bios option was introduced during the time of windows vista.
Source: https://wiki.ubuntuusers.de/Bootoptionen/
Grub editieren and extend the following line with acpi_osi=Linux in
/etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi=Linux"

Close file and update grub
$ sudo update-grub

Reboot the System.
$ reboot

The keys (with the sun symbol) on your keyboard for regulating the brightness should work now.


Ubuntu 13.10 onwards, the mount points are to be found in:
/run/user/$UID/gvfs/


Ubuntu Server 18.04 Intel RAID (RST) can't detect the RAID

Seems that Ubuntu 18.04 doesn't support it. I am heaving the same problem. One solution is to set all the disks in non-RAID mode at Bios and furing the installation you create the RAID than install it.

Also, be aware that for you to be able to create the RAID during the installation, you can't use the live version, you will need the Bionic Beaver installer (http://cdimage.ubuntu.com/ubuntu/releases/bionic/release/)

Please let us know if you succeed.

Cheers,
Lucas


Installation kit modified during install. Is this a security issue?

The answer is here: https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2020-September/018786.html
(Body must be at least 30 characters; you entered 20.)


Remove optional ubuntu packages for speeding up release-upgrade

The term "optional" will have specific meaning for you and for others. So in general to make the download size smaller, you could follow these steps:

1) I noticed that the maximum space is occupied by the "debug" symbol packages. They are used to help developers find out crash points easily.

You can uninstall these safely without any risks. They usually have a "-dbg" at the end of their name, e.g., python2.7 package has a corresponding debug symbol package "python2.7-dbg"

This process of selecting dbg packages should be done manually by you and it will save the maximum space.

2) Remove any unwanted softwares that you don't use. We usually have multiple browsers, multimedia apps etc. Go the "1 app per utility" way to reduce space.


How to get Magic-NS adapter working with Linux?

In my case, I am using manjaro with an xbox one controller.
I'm using in xinput mode (green light), and works well.
When lsusb is run: Bus 002 Device 002: ID 0079:18d3 DragonRise Inc. MAGIC-NS
Hope it helps.
The MAGIC-NS software update is 1.32, don't know if it works in an older versions or if it can be updated in something other than a windows machine.


First install cmake:

sudo apt-get install cmake

Or install the latest version of cmake by visiting cmake.org and downloading the latest source distribution.

sudo apt-get install build-essential
tar -xf cmake-3.10.2.tar.gz
cd cmake-3.10.2
./configure
make
sudo apt-get install checkinstall
sudo checkinstall

And you need these to be able to compile DNSCrypt-Proxy-GUI:

sudo apt-get install extra-cmake-modules
sudo apt-get install qtbase5-dev
sudo apt-get install libkf5auth-dev
sudo apt-get install libkf5notifications-dev
sudo apt-get install qtbase5-private-dev

Download the latest DNSCrypt-Proxy-GUI from here

tar -xf  dnscrypt-proxy-gui-1.11.11.tar.gz
cd dnscrypt-proxy-gui-1.11.11
sudo cmake ./
sudo checkinstall

Now run DNSCrypt-Proxy-GUI with:

DNSCryptClient

Helpful links:

How to install cmake 3.2 on Ubuntu

https://github.com/psifidotos/Latte-Dock/issues/485

What package do I need to build a Qt 5 & CMake application?


Always better to do a new install than an install by upgrade.

If you have a lot of applications downloaded, never fear. The easiest way to retain them is  first to make a text file of all apps on your system - sudo dpkg --get-selections > MyApps.txt. Keep this file in your Home folder, which should be backed up. Then download and install the new release.

To retrieve your apps - sudo dpkg --get-selections < app-backup-list.txt, sudo apt-get update and sudo apt-get upgrade


To open a file with a specific program in a directory other than the current working directory, put the command you use to open the file first, then the path to the file. In your case:

subl break/main.cpp

You can also use an absolute path, which will work regardless of the current working directory

subl ~/Desktop/break/main.cpp

You can use wildcards in the path. For example I have a file in

/home/zanna/Dropbox/Writings/journal02/Capoeira

I open it like this

vim ~/Dr*/Wr*/j*2/Cap*

If you often open a specific file with a particular program you could make an alias to open it

alias capedit='vim ~/Dropbox/Writings/journal02/Capoeira'

As @Serg suggested you can also make a symlink to a file buried deep in a directory tree to make it more accessible

ln -s ~/Dropbox/Writings/journal02/Capoeira ~/new-writing/Capoeira

Now I can just

vim ~/new-writing/Capoeira


move main menu from top panel to top of the window?

You will need to remove the package indicator-appmenu.

sudo apt-get remove indicator-appmenu

If you remove this package your menus will go back to normal.


Need to connect to the internet from private Virtual Machine on the cloud through a local server with internet access

If anyone ever has the same problem. All you need to do is to change the NAT rules in /etc/ufw/before.rules add the following line

*nat
-A POSTROUTING -s /IP address here/ -o em1 -j MASQUERADE
COMMIT

this has to be added to the local server trying to connect to the cloud and you have to change the DNS lookup in the virtual machine to 8.8.8.8, this allows the private virtual cloud to access the internet through the local server. Security settings of your local server serves as the firewall.


Cairo Dock - Chrome Browser - Unity Launcher Icon and Application sync

you can use an existent icon of the launcher. In example, i used Firefox launcher, right click on icon and changed his settings.
I downloaded google chrome icon from internet in PNG format, then i put it into launcher config.


Immediate issue

This is a problem with your usage of FFmpeg, not its compilation from source. The last line of the program output reads:

  The encoder aac is experimental but experimental codecs are not enabled, add -strict -2 if you want to use it.

If you change the invocation options as suggested in the error message the operation should run as intended (with the given caveat):

ffmpeg -i test.avi -vcodec libx264 -s 640x360 -threads 4 -movflags faststart -strict -2 test.mp4

Lord Neckbeard points out that the option needs to be applied to the output, not the input.

Alternative solution

There is little benefit in transcoding the lossy MP3 audio stream to a lossy AAC audio stream unless the target device doesn't play back MP3 for some reason. Instead you can instruct FFmpeg to copy the audio stream as it is with the -codec:a copy setting:

ffmpeg -i test.avi -codec:v libx264 -s 640x360 -threads 4 -movflags faststart -codec:a copy test.mp4


Here's a solution you can use if you have dual-boot with Windows on this laptop:

Boot into Windows and use Toshiba System Settings. Go to Keyboard and change the settings for Function Keys.

When you reboot into Ubuntu, the setting will be carried over.

(As described in a Toshiba forum post).


problem new with ubuntu and i cannot install

maybe your CD have defects you should try to install it via usb.

if you have a windows machine you can use this software:
http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/

its easy and you will manage to create a USB to boot it.


In short:

  cpuset - confine processes to processor and memory node subsets

In addition to the above pseudo-files in each directory below /dev/cpuset, each process has a pseudo-file, /proc/<pid>/cpuset, that displays the path of the process's cpuset directory relative to the root of the cpuset file system.

Also the /proc/<pid>/status file for each process has four added lines, displaying the process's Cpus_allowed (on which CPUs it may be scheduled) and Mems_allowed (on which memory nodes it may obtain memory), in the two formats Mask Format and List Format as shown in the following example:

Cpus_allowed:   ffffffff,ffffffff,ffffffff,ffffffff
Cpus_allowed_list:     0-127
Mems_allowed:   ffffffff,ffffffff
Mems_allowed_list:     0-63

The "allowed" fields were added in Linux 2.6.24; the "allowed_list" fields were added in Linux 2.6.26.

From man 7 cpuset.


Install gigabyte ATI Radeon™ HD 4670 in Ubuntu 20.04.1

You'll want this driver for the ATI Radeon HD 4670. Hope this solves your issue.


Unfortunately there seems to be no way to get it running.

Have a look at the hardware compatibility wiki of mixxx:
http://www.mixxx.org/wiki/doku.php/hardware_compatibility

and the corresponding internas, where the technical problem for a linux driver seems to be:
http://www.mixxx.org/wiki/doku.php/hardware_compatibility#fn__16


How to take screenshot on Ubuntu-guest (Virtualbox)

Ok guys! I have found out the problem and the solution. :P

The problem is Compiz and the solution is to disable it using the command:

metacity --replace &

Now, I can take screenshot of any window inside the VirtualBox.


How do I fix 'dkpg-divert: error: mismatch on package'?

Looks like this is a bug with Ubuntu. package libnvidia-gl-390 (not installed) failed to install/upgrade: new libnvidia-gl-390:amd64 package pre-installation script subprocess returned error exit status 2 (NOT FIXED)

The workaround I did was #5, Yuri's improvement of Alexandre's suggestion

  Try

  # for FILE in $(dpkg-divert --list | grep nvidia-340 | awk '{print $3}'); do echo $FILE; done

  first and choose the correct number for substring {print $3}

  For example for Russian locale it will be $2:

  # for FILE in $(dpkg-divert --list | grep nvidia-340 | awk '{print $2}'); do dpkg-divert --remove $FILE; done


How do I make firefox hello recognize my usb webcam?

It looks like you need to add a rule to allow the detected device to operate

sudo nano /etc/udev/rules.d/10-local.rules

alternately you can use gedit or vim

ADD this piece of text with the appropriate bus, Vendor ID and Device ID
and your hardware will be up and running.. You can enable the rules yourselves or you may want to reboot..


Does Ubuntu have an alternative to Windows File Protection?

The answer is no; Ubuntu does not have an equivalent to MFP/MRP.
In Unix, if you have root access, there is no limit to the destruction you can wreak upon the filesystem.  Most of us understand and accept this.
In Windows, Administrator logins start with a limited set of rights assigned, via tokens, to their logon process.  But they have the ability to create new tokens and processes with elevated rights and to impersonate any security principles; including localsystem and trustedinstaller.  Once that is accomplished, they can destroy the filesystem just as effectively as root on Linux.  There are just more hoops to jump through (the Microsoft way).
Consequently, for those of us that have deep understanding of both environments, MFP/MRP feel more like marketing than actual protection.
Don't listen to the marketing!
Windows or Linux, you simply must assume your system will get trashed (or at the very least, pick up annoying behavior) from time to time - for any number of reasons.  Real protection only comes from a robust backup/recovery strategy.
"Be prepared!" - Japeth the Goat, Hoodwinked


How to pause GIF animation at specific frame

The simplest way to do it is play your gif animation in mplayer

Open your gif file in mplayer using following command

  mplayer -loop 0  -speed 0.2 your_gif

Here

-loop 0 means it will run your gif image untill you are not closing it and
 -speed 0.2 means it will decrease the animation speed to 20%.

You can pause your animation by pressing the Space button .
mplayer will also show the frame information of your running gif in terminal.


The best way I have found to manage the GRUB screen / resolution / text-size is to use "Grub_Customizer"

It works for GRUB and BURG both

Open a terminal and enter:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer

sudo apt-get update

sudo apt-get install grub-customizer

then you can fully manage the GRUB screen

source


GCC Issue with Building an Old Linux Kernel

As requested, here's the script I use for my ARM development of a web server on my Ubuntu Intel host.
MY_ARM_BASE=${HOME}/dev/toolchain/arm-2008q3
C_INCLUDE_PATH=${MY_ARM_BASE}/lib/gcc/arm-none-linux-gnueabi/4.3.2/include:${MY_ARM_BASE}/lib/gcc/arm-none-linux-gnueabi/4.3.2/include-fixed
LIBRARY_PATH=${MY_ARM_BASE}/arm-none-linux-gnueabi/libc/lib:${MY_ARM_BASE}/arm-none-linux-gnueabi/libc/usr/lib
CPLUS_INCLUDE_PATH=${MY_ARM_BASE}/arm-none-linux-gnueabi/include/c++/4.3.2
#OBJC_INCLUDE_PATH
COMPILER_PATH=${MY_ARM_BASE}/bin
#LD_RUN_PATH
#GPROF_PATH
#######
CC=${COMPILER_PATH}/gcc
CXX=${COMPILER_PATH}/g++
RANLIB=${COMPILER_PATH}/ranlib
STRIP=${COMPILER_PATH}/strip
export C_INCLUDE_PATH LIBRARY_PATH CPLUS_INCLUDE_PATH COMPILER_PATH
export CC CXX RANLIB STRIP

And another script, looks like for running the configure script for the web browser:
GCC=${COMPILER_PATH}/gcc RANLIB=${COMPILER_PATH}/ranlib \
STRIP=${COMPILER_PATH}/strip ./configure --build=arm-linux \
--disable-static --enable-shared --prefix=/mnt/usb/lighty

And here's the actual bin for that ARM code, I probably added the links myself for the short names, don't remember after so many years.
GCC=${COMPILER_PATH}/gcc RANLIB=${COMPILER_PATH}/ranlib
STRIP=${COMPILER_PATH}/strip ./configure --build=arm-linux
--disable-static --enable-shared --prefix=/mnt/usb/lighty
ls $HOME/dev/toolchain/arm-2008q3/bin
addr2line                         arm-none-linux-gnueabi-cpp        arm-none-linux-gnueabi-gprof    arm-none-linux-gnueabi-size     cpp        gprof    size
ar                                arm-none-linux-gnueabi-g++        arm-none-linux-gnueabi-ld       arm-none-linux-gnueabi-sprite   g++        ld       sprite
arm-none-linux-gnueabi-addr2line  arm-none-linux-gnueabi-gcc        arm-none-linux-gnueabi-nm       arm-none-linux-gnueabi-strings  gcc        nm       strings
arm-none-linux-gnueabi-ar         arm-none-linux-gnueabi-gcc-4.3.2  arm-none-linux-gnueabi-objcopy  arm-none-linux-gnueabi-strip    gcc-4.3.2  objcopy  strip
arm-none-linux-gnueabi-as         arm-none-linux-gnueabi-gcov       arm-none-linux-gnueabi-objdump  as                              gcov       objdump
arm-none-linux-gnueabi-c++        arm-none-linux-gnueabi-gdb        arm-none-linux-gnueabi-ranlib   c++                             gdb        ranlib
arm-none-linux-gnueabi-c++filt    arm-none-linux-gnueabi-gdbtui     arm-none-linux-gnueabi-readelf  c++filt                         gdbtui     readelf


There is similar question in Launchpad, which says (@2013) that this is not possible.

As this does not work, I suggest to install Norwegian keyboard layout and  use shortcut to switch between layouts. I use it (for Russian) all the time. If you use standard Ubuntu, there is default shortcut Shift+Caps Lock and it is very convienient for me.


Blank Cursor after Installing Ubuntu 12.10 on laptop with Nvidia GeForce Graphics Card

Replace your hard drive. You need a new one based on your edit 4. It would appear that you have bad sectors at the location of the partition table (first 63 blocks or so as I recall) If you have any necessary data on the drive you should look for answers regarding data recovery here.


How can I change an Atheros wireless NIC region (regulatory domain) in Ubuntu?

I did have the same problem as yours yesterday.  After some experiment, I found a solution:

sudo apt-get install crda
sudo vi /etc/default/crda

then change the line REGDOMAIN= to your country code, eg.

REGDOMAIN=AU

and restart.

BTW, my system is Ubuntu 12.04 with 3.2.x kernel and AR9485 wireless.


How to `read` and echo whatever the user typed?

The specifics aren't given by you but generally you capture name like this.

#!/bin/bash

regex='[Mm]y(\ name\ is\ )(\w*)'

read -p "Say something: " response

echo $response

if [[ "$response" =~ $regex ]]; then

        name=$(echo $response | cut -d' ' -f4)

        echo "Hi $name"
else
        echo "I didn't understand that"

fi


Ubuntu can not use Intel SSD during installation

I use gparted to delete all 3 partitions of SSD(sda) and build the SSD to ext4, then Ubuntu can use SSD to install.
I think the reason is the initial file system format or the partition of SSD.


Did you install the package called ubuntu-restricted-extras? You can do this in the Software Center or, if you prefer the to use the command-line, then by running sudo apt-get update followed by sudo apt-get install ubuntu-restricted-extras.

If you have ubuntu-restricted-extras, then verify that a Flash plugin is actually installed by checking for the adobe-flashplugin or flashplugin-installer packages. If neither is installed, install one of them. If you're running the 64-bit version of Ubuntu, installing adobe-flashplugin is preferable. (But don't have them both installed at the same time.)

If you're running the 64-bit version of Ubuntu and you find that you have flashplugin-installer installed and the problem continues, then try removing it and replacing it with adobe-flashplugin.

If none of the above works, check to see if you're using the HTML5 beta on YouTube! by going to http://youtube.com/html5. Theoretically, and eventually, this should perform uniformly better on Ubuntu. But right now, it might not work well. So if it's turned off, you can try it and see if it works better. If it's turned on, try turning it off and seeing what happens.

If you have trouble doing any of the above, please post a comment here. If you do the above but it doesn't work, please edit your question to indicate that it didn't, and also to include the output of this command (which you should run in the Terminal): dpkg -l | egrep 'flash|gnash|swf|spark'


E: unable to locate power managment interface

You have mistyped the package name .You typed in power management interface when in actuality it should be: powermanagement-interface.

Type the following to install:

sudo apt-get install powermanagement-interface


Upgraded from 11.10 to 12.04 now no network access

you should open the network-configurator and check, if there is a connection configured. if not you should choose the wlan tab or the network tab (dunno if your card is wlan or ethernet) and configure network. its an easy and self explaining job

2nd Try:

maybe your ethernet-car is defect. do you have another one to test? otherwise i would buy a new one. they are usually very cheap hardware.


name of the file from /proc that is used to pass information from boot-loader to kernel

Most likely they want /proc/cmdline as an answer


If I downgrade gwibber, will it still work with twitter?

What version are you downgrading to?

I believe maverick-updates has a backported OAuth fix. Either way, it's had several version bumps since maverick-proper.

If it's before Maverick, again it may have been backported in the updates repo but I can't say for certain.


Triple boot to dual boot: how do I uninstall Lubuntu without screwing up GRUB?

Maybe not the exact answer to your problem, but when I had similar problems with grub, I got help by this guide. Especially the part about the mounting was important.


And I had http://localhost:631/admin/?ADVANCEDSETTINGS=YES set to 1d (I suppose this means 1 day) not working. I set it to "Don't keep history" and now the jobs seem cleared immediately.


swapon has no effect, /proc/swaps remains empty

First, erase your original swapfile:

sudo rm /myswapfile

Next, run the following commands one by one:

sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
ls -lh /swapfile

The output should be similar to the following:

-rw------- 1 root root 1.0G Aug  3 18:20 /swapfile

Now, run the following commands:

sudo mkswap /swapfile
sudo swapon /swapfile
sudo swapon -s

Now, edit /etc/fstab to make the changes permanent:

sudo nano /etc/fstab

and add the following line to the end of the file:

/swapfile    none            swap    sw              0       0

Press CTRL + o and then press ENTER to save the file.

Press CTRL + x to exit nano.

source: https://www.digitalocean.com/community/tutorials/how-to-add-swap-on-ubuntu-14-04

If that still doesn't work, you may want to check swappiness:

cat /proc/sys/vm/swappiness

This command should return a number. The default should be 60.

If no output, run the following commands one by one:

sudo sysctl vm.swappiness=60
echo "vm.swappiness = 60" | tee -a /etc/sysctl.conf

The -a is important after tee or you will overwrite the entire file!!!


14.04 wifi has disappeared, only have wifi in house

Forced update (without internet) and the updater managed to sort out the problem. I still don't know how the driver managed to become unattached (I'd lost sound, too) but things are working now.


Check your sudoers privilege. Sometimes permission might be over written. Do the follow:

cd /etc/sudoers.d
sudo visudo

I will assume you will have

# User privilege specification
root    ALL=(ALL:ALL) NOPASSWD:ALL

Change it to

# User privilege specification
root    ALL=(ALL:ALL) ALL

Hope it help :)


Easiest way to set up an IMAP mail server

You can use Dovecot for mail server

Install the packages

sudo apt-get install dovecot-imapd dovecot-pop3d
Configure the protocol you need to be used by appending the protocol in the file /etc/dovecot/dovecot.conf:

protocols = pop3 pop3s imap imaps
Choose the mailbox you would like to use. Dovecot supports maildir and mbox formats. Edit the file /etc/dovecot/dovecot.conf and change the line

mail_location = maildir:~/Maildir # (for maildir)

or

mail_location = mbox:~/mail:INBOX=/var/spool/mail/%u # (for mbox)
Restart the service

sudo /etc/init.d/dovecot restart
Use telnet to check that dovecot is working properly.

telnet localhost imap

That's it.

PS. Also make sure your firewall is configured properly to accept connections on the appropriate ports.

Source : Official Dovecot Server Documentation


Prevent users from viewing var/www/html back end files

I solve the directory listing in my Ubuntu 14.04 by following editing,

In the apache2.conf file, under

 <Directory /var/www/>,

there is a line 'Options Indexes FollowSymLinks'. Just delete the word "Indexes" and save the file. Restart the apache to take effect of the change.


Data of Windows Formatted during Ubuntu how to recover?

Try  testdiskto recover datas from deleted partition.


Yaml files are very picky about correct indentation. Place two spacebars before the bridges keyword and the error message should go away.


Ubuntu Translation, Confused (Key to give keyboard-focus to the Launcher)

If a program has "keyboard focus", keys you press will be sent to that application.
So, if the Launcher has keyboard focus "so it can be navigated with the cursor-keys", that means that keys you press will interact with the launcher.
And also, what is a "cursor-key"?
The cursor keys are the up, down, left and right arrow keys. They're usually near the bottom right corner of a keyboard.


Unable to find apache2 directory inside /etc in Ubuntu 16.04

I recommend you to reinstall apache2. In this way he should create the folder with all the default files.

sudo apt-get purge apache2
sudo apt-get install apache2


OwnCloud 10.2 on Lubuntu 18.04 - Cannot mount USB local drives

OwnCloud(php / www-data) probably doesn't have the right to read/write to the location of the USBs.
You could change the ownership of the location where they are mounted(assuming you dabbled in fstab to keep them mounted after a reboot)  with

$ chown -R owner-user:owner-group directory

Where for owner-user and owner-group should be www-data. I am not sure if php is a member of this group by default, if it is not, use $ adduser php www-data to make php a member of www-data.

Note that giving write access to php is somewhat debatable, but this should make OwnCloud recognise and be able to use the USB sticks.

More about chown and chmod here


You can try this in a terminal (Ctrl+Alt+T)

  sudo apt-get install simple-scan


Clock Overide Extension Versus dConf When Formatting Time Display

The following description is based on looking into the extension source available https://github.com/stuartlangridge/gnome-shell-clock-override/blob/master/extension.js .

The gnome3 bar date/time label does not provide a configuration setting in any form. What this extension does is actually replacing gnomes3 top bar label text during the runtime of the extension.


How can I get Skype Video working on Ubuntu 12.04 64bit

The correct command is

sudo apt get install libv4l-0:i386

to get the i386 in a 64bit system.


Data recovery tools e.g. Testdisk  can recover data from any medium including an USB stick.

The included tool Photorec will recover remnants of individual files but file names and directories will have to be restored manually.

Answers to this question may help you finding text files from a phrase they may contain:

How to use "grep" command to find text including subdirectories


Is there any application which interacts with the user?

1st  part of your question - recommendations about what you should and should not :

Ubuntu has built-in Desktop Guide, which is a must-read for any newbie (and not also) user.

There are tons of tutorials, articles, books and videos which you can read and apply.

Every Ubuntu flavour has its own wiki site and documentations.

And nearly all application has some documentation whether built-in or online.

Read, use and learn.

2nd part - software to do things which are important without even telling me that:

It would be something useless. People use computers for different purposes and no software can know what you want. It is like "I want a phone which makes phone-calls automatically to necessary people".

One of the best advantages of Linux systems is that you can manage and customize your system to more extent than other OS. That is the thing which makes Linux more powerful.

Time passes and you may become more and more proficient. All geeks were once newbies.


The first thing to do is do enable IP forwarding. This is done either by using

echo "1" > /proc/sys/net/ipv4/ip_forward

Then, we will add a rule telling to forward the traffic

iptables -A FORWARD -i eth1 -o eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o eth1 -m state --state ESTABLISHED,RELATED -j ACCEPT

Also you can add route to specific address on you pc connected on home lan

route add -host 224.10.10.1 gw ip_address_of_home_network_router


Can I control my computer from my Tablet?

You can use TeamViewer to control your computer from your tablet. If you just want a command line/file access to your computer, you can install OpenSSH with sudo apt-get install openssh-server and connect to it from your tablet using JuiceSSH for the command line, and ES File Explorer for file access.


What's an uppercase 'T' at the end of unix permissions?

The uppercase T appears when the x bit for "others" (ie in the last position) is not set. Both of these directories have the sticky bit set, but the second one has no execute permission for "others"

drwxrwxrwt 2 zanna zanna 4096 May 13 09:53 t
drwxrwxrwT 2 zanna zanna 4096 May 13 09:53 T

Since it is replaced by the sticky bit's [tT], we need some way of knowing whether the directory has execute permission for "others" or not, hence the difference in case

In our file browser, the Permissions tab under Properties shows the differences between directories with and without execute permissions more clearly: we need execute permission to access (enter or stat) a directory.

Here's what Wikipedia has to say about the sticky bit on directories:

  The most common use of the sticky bit today is on directories. When the sticky bit is set, only the item's owner, the directory's owner, or the superuser can rename or delete files. Without the sticky bit set, any user with write and execute permissions for the directory can rename or delete contained files, regardless of owner. Typically this is set on the /tmp directory to prevent ordinary users from deleting or moving other users' files. This feature was introduced in 4.3BSD in 1986 and today it is found in most modern Unix systems.


This solution works for me. Ubuntu 16.04, Asus laptop.

Open Applications -> System Tools -> Administration -> NVIDIA X Server Settings
Choose PRIME Profiles and then click Intel (Power Saving Mode)


If I install Windows 10 in a virtualbox, will it be just as good as a dual boot?

Yes and No.
gaming perspective:
Yes you can run, there are lot of constraints it depends on your system config.
(How much Ram memory, G memory and process capability.)
I would say minimum ram should be 8 gb if you want to play games like prince of Persia sands of time kind of games. And graphic memory also matters. Your graphic card should be well compatible to the Ubuntu(or any other distro).
If you want to run assassin's creed, witcher you need good graphics and lot of ram. still you may get lags.
My suggestion would be to have a dual boot. With my experience I hated running windows in virtual box and playing games.
non-gaming perspective: it is a charm running any application or software you want, it will run without any problem. make sure you have good ram capacity.
it is as if you run in dual boot.
good  for software
bad  for games ( AAA games).
works fine for games like pop, Mario, house of dead, etc.
New Update on this Comment:
Now you have Steam that can play AAA games so you can fully convert to ubuntu :)


Path given in Environment variable shows empty after reboot

To get an environment variable to keep its value after logging out and back in, put the commands in ~/.profile.


Given the SSD performance hit due to the Meltdown/Spectre patches, is it a good idea to buy more RAM to make RAM disk?

RAM disks will not make up for losses due to Meltdown/Spectre patching. Those patches do not affect read speed, they instead affect how the processor executes code - there will be no difference from using a ramdisk.

That said, a ramdisk is a very good way of speeding up access to certain important files, often at significant gains over NVMe drives. This affects file load times, and everything dependent on loading files.

Your ramdisk size depends very heavily on what your usecase is, and what you're trying to do. Most programs will load their required resources into RAM anyways, meaning you're likely to not see any gain in already running programs (usually). For example, a ramdisk won't make browsing the Internet any faster. A good idea to determine a ramdisk size is to look at files you use and open very regularly, and then get the total size of that. Double it, and that's your ramdisk size.

Creating the ramdisk is just a couple of simple commands. Assuming you want a 4 GB ramdisk, simply run (as root):

mkdir -p /media/ramdisk
mount -t tmpfs -o size=4096M tmpfs /media/ramdisk

Once created, you can copy your often-accessed files into RAM. If you want to make a persistent ramdisk (that is, a disk that's auto-created at boot), see the above linked thread.

Note that your ramdisk will not persist data through reboots, nor will changes made to files in your ramdisk get written back to your real disk. Both initially loading data to your ramdisk on every boot and saving files off it is completely your responsibility, though you can write scripts/utilities to help you with this.


Snapshot and rollback of apt-installed packages

Built-In Options
To my knowledge, apt/apt-get does not have a built in function that does what you're looking for. There is the Snapshot - Debian that seems to do something like that, though I don't think it fully covers your requirements.
Alternatives
These are some options to consider, as I don't see a hard requirement for using Ubunut listed.
Solus (eopkg)
While not related to Ubuntu specifically, I do know the Solus offers this with their package manager: eopokg Docs
Example
Quote from the link provided:

History
You can see the history from eopkg by using:
sudo eopkg history
Rollback
To rollback your system, first use the above history command to check what the transaction / operation number was. Then, we use the following command:
sudo eopkg history -t number
The number, in this case, is the operation before the one you want to change. So if the number was 100, then you would use 99.

Yum (Fedora/CentOS/RHEL)
Yum does have this ability built in. You can find this in their official documentation, here and here
Example
Referencing their documentation you could:
sudo yum history list all
Find the transaction you wish to undo and get more info on it.
sudo yum history info <transaction_ID>
Then undo it:
sudo yum undo <transaction_ID>


You can remove Windows without reinstalling Ubuntu using OS-Uninstaller.


restart computer without root from script

On Debian, you have to be a member of the powerdev group in order to shut the computer down as a regular user. I am not sure how this works in Ubuntu.

What you can do either way is to use the setuid bit in order to allow anyone to reboot the computer. Think about it, before you do this though. Maybe you can only set the setuid for the group of reboot and change the group of reboot to your own user group (or create a new power group by hand).


Ask the packages (after you've installed then):

for pkg in open-vm-tools open-vm-tools-desktop open-vm-tools-dev ; do
    dpkg -l $pkg
    dpkg -L $pkg
done | less

Before you install them, use the suggestion by @Rinzwind:

https://github.com/vmware/open-vm-tools


This command could help:

gsettings set org.gnome.settings-daemon.plugins.rfkill active false

Just as warning though, it does disable your Bluetooth controls through the gui (but Bluetooth still works).

You should also not let people access your computer directly (through a meeting) because that brings a very big security flaw to your computer as anyone can basically control it.


change text-color of my output on command prompt?

This is certainly possible using ANSI escape codes:

<?php
echo "\033[31m some colored text \033[0m some white text \n";
?>

will output "some colored text" in red and "some white text" in white (unless you chose different default colours for your terminal).

The characters \033 indicate the start of an escape code. [31m is the colour red. [0m signifies the end of the coded fragment. For more colours, see here.

For other effects, such as bold:

\033[1m bold text \033[0m

see the first link. You can try out these codes on a command line by doing thing like:

echo -e "\033[1m bold text \033[0m"


How can I get Involved in the Ubuntu (Mobile) Dev Team?

You can find the Ubuntu Phone team here on Launchpad. The best way to get involved with them is to join the Launchpad team, sign up for the mailing list, and introduce yourself. Tell them your experiences with both Ubuntu and software development, what sort of things you'd be interested in doing, and they'll point you in the right direction.

If there's no response straight away, don't be afraid to poke them a little ;)


Printer installer asks for root's password

It turns out that the problem was that my username wasn't listed for the group lpadmin.  Under those circumstances System Settings issues a very misleading prompt asking for "root"'s password.  Providing the root password doesn't satisfy the inquiry.


You can use httping:

httping https://www.dictionary.com/browse/word

If you want to check if your word exists, you need to specify, that only Status 200 is OK.

httping -m -o 200 https://www.dictionary.com/browse/word

And maybe add -c 1 to exit after 1 probe and -l to avoid the Info message that SSL was auto enabled.

Output:

$ httping -l -m -o 200 -c1 https://www.dictionary.com/browse/word
69,734001
$ httping -l -m -o 200 -c 1 https://www.dictionary.com/browse/not_existing_word
-1

Install via

sudo apt install httping

Alternative, if httping is not available, of course it is possible with curl to print the status code of a request only.

$ curl -s -o /dev/null -w "%{http_code}\n" https://www.dictionary.com/browse/word
200
$ curl -s -o /dev/null -w "%{http_code}\n" https://www.dictionary.com/browse/not_existing_word
301


How do I get rid of buzzing sound while watching Youtube?

Well, I just realized that the gnash plugin for Mozilla wasn't even installed and Mozilla was trying to play the Youtube videos using html5 and that's what was causing the buzzing. I ended up using Epiphany as both flash apps for Ubuntu worked very slow in Mozilla, I tried the latest version of Gnash and Lightspark. Imagine that, Mozilla not being able to play html5 from Youtube. And it was version 15.1 So it wasn't a sound drive issue after all as I feared...


How to prevent gnome to change the language input order when switching languages?

Since, there is no gnome-shell-extension as of now for the static shifting of keyboard layout using default shortcuts Super+Space and Shift+Super+Space..

and the comments about this link Static ordering of keyboard layout switching in Ubuntu 17.10 and later with GNOME 3 from OP

  the problem with the solution proposed in the link (Alt+Shift) is that
  it lacks a visual feedback, and can't use shortcut for previous (like
  win+shift+space to go back one input). So it's not really satisfying.

I could achieve at least one point out of two (Visual Feedback & Switching back to previous layout) with below workaround.

Workaround

OS: Ubuntu 19.10

Reference: Manipulate the Default Shortcut Super+Space for Switching to Next Input Source without Graphical Representation

Create two scripts with below contents, I have named those as "SuSpace.sh" and "ShSuSpace.sh"

SuSpace.sh

#!/bin/bash

totalLang=$(gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager()._mruSources.length" | grep -oP "(?<=').*?(?=')")

currentLang=$(gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().currentSource.index" | grep -oP "(?<=').*?(?=')")

declare -i math=$currentLang+1

if [ "$math" -lt "$totalLang" ]; then
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().inputSources["$currentLang+1"].activate()"
else
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().inputSources[0].activate()"
fi

ShSuSpace.sh

#!/bin/bash

totalLang=$(gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager()._mruSources.length" | grep -oP "(?<=').*?(?=')")

currentLang=$(gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().currentSource.index" | grep -oP "(?<=').*?(?=')")

declare -i math=$currentLang-1

if [ "$math" -eq -1 ]; then
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().inputSources["$totalLang-1"].activate()"
else
gdbus call --session --dest org.gnome.Shell --object-path /org/gnome/Shell --method org.gnome.Shell.Eval "imports.ui.status.keyboard.getInputSourceManager().inputSources["$currentLang-1"].activate()"
fi

you can create custom shortcuts for these two scripts as per your wish.


I want to use Ubuntu, but I have some issues with hardware peripherals

You may want to reconsider your approach on using Ubuntu as your main OS. Ubuntu is an Open Source OS based on Debian. This makes it depend on voluntary free contributions from developers all around the world.

  It is us not them who build the OS.

Drivers are often provided for free from the manufacturers of hardware but sadly not all manufacturers contribute with Open Source software to support their devices. Then they may have a closed source proprietary driver or additional software available, but some manufacturers decide to not support Ubuntu. It is my strong believe that we then should in return not support these manufacturers by simply not buying their products.

  If you are not happy with this approach then Ubuntu/Linux is not the right place for you. You should pay for a closed source OS where you can expect that all of your drivers and software should work without issues.

As a rule of thumb brand-new hardware will always take some time until we can provide drivers to make them work. Do not expect the community to be able to support hardware at the time of release. This is even more so after the manufacturer made a great secret on  specifications, hence making the development of drivers and tools almost impossible.

After a while however most devices will be supported. You may then also find, that older devices will have a much longer support span than offered from a proprietary OS. Many people needed to switch from XP to Ubuntu just because later Windows versions did no longer support their hardwares.

To be able to use Ubuntu without frustration we should therefore search communtiy places for issues and solutions before we buy hardware. We will see that most hardware is supported out of the box, i.e. no drivers are needed to have it working, just plug them in. This too is different to another OS. Other hardware may need some tweaks to work:

Logitech k350 keyboard and m510 mouse not working unless I unplug and replug dongle 20 times
Logitech USB headset not working on 12.04

Please also note that while having support for a device this does not always mean that all fancy special secret features will work the same as they do on Windows. But then this entirely is the responsibility of the manufacturers.

  Stay with Windows if you need any such device or feature fully supported.

For example I still have a copy of Windows running in a virtual machine because the Canon printer I had left over from when I was still running on Windows will not let me print on photo paper or CDs in a way only remotely as comfortable as it does from Windows.


How do I use "virsh shutdown" on KVM domains to shut down Ubuntu guests?

Check to see if you have the package acpid installed on each of the guests.

I generally create new virtual machines using VMBuilder with the parameter --addpkg acpid and the only time I've had trouble shutting down Ubuntu guests using virsh was when the guest vm had crashed in some way.


I recommend using gparted, a gui tool that you can install into a live usb session. fdisk/gdisk are command line tools that will do the job as well, gparted is just much more user friendly.

Just boot into a live usb session, open a terminal and run 'sudo apt-get install gparted -y', and once it finishes go to your programs and run gparted on your hard drive.

This will also detect your usb disk, but you should be able to tell which one is your usb disk by the size it says it is.


Cannot load SWT library "UnsatisfiedLinkError: no swt-gtk-4233"

You need to make a symbolic link to the swt so files located in the /usr/lib/jni directory. I found a solution on this site: Eclipse cannot load SWT libraries.

use this command:

ln -s /usr/lib/jni/libswt-* ~/.swt/lib/linux/x86_64/


Try removing it completely sudo apt-get purge openssh-server

And remove config dir mv /etc/ssh /etc/ssh_old

Then sudo mkdir /etc/ssh

Then install it again sudo apt-get install openssh-server


How to resize a gif without deforming and remove the blank white region when it's cropped?

Use ! after the resolution given to -crop:

convert old.gif -crop 600x400+0+0\! new.gif

From the imagemagick docs:

  From ImageMagick version 6.2.4-5, you can add a new special flag to
  the "-crop" argument. This flag '!' will tell crop to adjust the
  Virtual Canvas information of the returned image so that it is
  relative to the area cropped.

  ...

  Notice how the canvas size of the image returned now matches the area
  in which the image was cropped.


If you want to enable it for your user account every time you log in, you can add the line in the Startup Applications.

click on the gear icon in the upper right corner of the screen, in Startup Applications you can add a command to run every time you log in.


Accidentally partitioned over entire hard drive - cannot boot

Here are some advices, if you want to recover data on a broken partion, stop writing things to it or booting from it. Use the live CD to boot and try your stuff. If you run out of alternatives, maybe this can help but it is quite a messy thing to do.

ps: BTW I'm glad it worked, when I posted the link I thought that it would be kind of a long shot and was expecting someone to post something clever and easier.


Output of xrandr shows 1024x768+1366+0; what does it mean and can I change it?

As Muru mentions, the 1366 is the horizontal offset of your screen.
How to read the output of xrandr
An example:

Imagine your two screens, placed together into a frame. Together, they will make a virtual screen as you can see above. In the output of xrandr, the left screen shows: 1680x1050+0+347. The last two figures; +0+347 show the x and y distance (px) of the upper left corner of the screen, to the upper left corner of the virtual frame they are in.
The right screen shows 1280x1024+1680+0. The +1680+0 shows similar information, as you can see in the image
Can You change these values?
Within boundaries, yes. An example to make both screens top-alligned:
xrandr --output DVI-I-1 --pos 0x0

Where DVI-I-1 is my left screen
This will create the situation as below:

More on the options of xrandr here.


Perhaps you have installed the wrong version of the nvidia driver, you need to remove unused drivers, since the tty console appears due to incompatibility of accidentally installed packages.

try removing:

apt list --installed | grep nvidia

apt-get autoremove --purge name-your-driver


No update since last couple of days on Ubuntu 14.04

Checking https://lists.ubuntu.com/archives/ubuntu-security-announce/2014-December/date.html it looks like there hasn't been any security updates since December 22.

You can check here for any more changes https://lists.ubuntu.com/archives/?C=M;O=A.

As far as security updates are concerned, you can get email alerts by signing up for the mailing list or rss feed here.


Why does mini iso need me to setup network configurations when ive used a network to download it to my USB?

After much pain and searching of the internet, I think I've found the answer to my own question in a post I failed to discover until now:  How do I do a minimal install without an internet connection?

Apparently, I've been attempting to get the Ubuntu-mini iso to do something it is not capable of doing; install over a WI-FI connection.  If anyone else finds themselves confused by a similar situation, see the "Ubuntu-minimal" tag and compare it to the "Minimal Installation" tag.  That cleared it up for me...I think.  I'll try creating a Live USB with Xubuntu 18 Cosmic and see if using the Minimal Installation makes any difference.  I'll update this answer with the result later.


bash : update apt-get only if apt cache is older than 10 minutes

What you are doing is not substraction ,rather you are putting a "-" symbol between two values. You can see this by trying.

echo "($(date +%s) - $(stat -c %Z /var/lib/apt/periodic/update-success-stamp))"

which gives in my case

(1403616665 - 1403583368)

The correct statement should be

echo "$[$(date +%s) - $(stat -c %Z /var/lib/apt/periodic/update-success-stamp)]"

which correctly gives

33297

Also due to the outermost quotation marks, the statement "($(date +%s) - $(stat -c %Z /var/lib/apt/periodic/update-success-stamp)) -ge 600000" is considered as first value, which is compared to nothing, that's why it gives always true result.

Rounding this all up, the script would be

if [ "$[$(date +%s) - $(stat -c %Z /var/lib/apt/periodic/update-success-stamp)]" -ge 600000 ]; then
echo true
fi


How to install desktop environments such as kubuntu and gnome safely

Open a terminal and run the following commands to install a gnome-shell background.

sudo su - #will ask for your system password to become the superuser
sudo add-apt-repository ppa:gnome3-team/gnome3-next #press enter again
sudo add-apt-repository ppa:gnome3-team/gnome3-staging #press enter again
sudo apt-get update
sudo apt-get install gnome-shell gnome-shell-extensions #after this installation gnome-shell configuration menu will come and you can choose between gdm and lightdm options of which gdm has a different login appearance while lightdm has the one similar to unity. So better choose gdm here.

You are done.

You can always switch between gdm and lightdm with the following command:

sudo dpkg-reconfigure gdm     # here select gdm or lightdm and press enter.


Best software for local Contact/Calendar sync to Android?

Unfortunately, a linux solution for syncing your PIM data directly to an Android phone does not exist yet.
As I had a same problem, I found several possible "workarounds" without handing off your data to a 3rd party:

Setting up your own "Owncloud" server on your local computer.
Drawback: Server setup might be complicated. Owncloud Android apps seem to be still in beta. Phone and computer need to on the same network. May not viable when e.g. travelling a lot.

Run MyPhoneExplorer in Wine.
I found a detailed setup explanation in the MyPhoneExplorer Forum.
Drawback: You will need to run Thunderbird/Lightning in Wine too.

 Stay on Win/Mac. At least till this functionality is present in Linux.


There is no longer a precise folder underneath the dists directory in Ronmi's Wallbox.

You should probably either take the opportunity to report it to the PPA manager (via his Launchpad page @ https://launchpad.net/~ronmi/+archive/wallbox ) or simply remove that PPA subscription entirely, since it is not available.

It's possible that they may have stopped supporting 12.04 for some reason, or may simply be doing some maintenance on their repositories.


Can I make 3 finger drag switch to desktop?

There is an application that allows you to use specific gestures to issue commands, this may let you enable support for 3 finger gestures. The program is called easystroke. Its in the software center. You can search by the following name: Easystroke Gesture Recognition.

Here is a link to the developers website.

You can also check this already answered question. Which states:

  In Ubuntu xserver-xorg-input-synaptics is used. It can detect only
  2-finger swipes, vertical and horizontal.

  There is no code that detects 3-finger swipes. The only way to add
  this feature is to code it into the user space driver.

So I guess checking out the application is the better choice.


How to fix "no such partition" error in Ubuntu 14.04?

This has nothing to do with GRUB or Linux. It's a hardware issue. Probably you are using cheap cables that don't connect properly or have dirty contacts. It's also possible that your drive has gone bad (the electronics on it, not the media), or even your host adapter. Did you try connecting to another machine, or connecting a different drive (if not, why not?)

On a different topic: there is no point in having separate root and /home partitions.


Following the tutorial on installing latest NVIDIA drivers helped.

Edit. What really helped is disabling hardware acceleration in browser settings


Try the below command,

sudo chmod 700 /root


"Fixing Grub" in single boot installation process

The page you reference seems to describe a single-boot (Ubuntu-only, no OS X) installation. If that's what you've done and if your computer boots into the installed Ubuntu, then you're done.

The GRUB "fixing" instructions seem to be geared toward adding the nomodeset parameter to the kernel options. This parameter is required on some computers, but not on all of them. In particular, the page was written for a 2013 Mac Pro, but yours is a 2011 model, so they almost certainly differ in important ways, quite possibly including their need for nomodeset.

Furthermore, the page describes setting up both rEFInd and GRUB. Either one alone is sufficient. If you see the rEFInd menu when you boot and select an option that boots a Linux kernel (with a name that includes the string vmlinuz, as shown when you highlight the option in rEFInd), then you're not even booting via GRUB. If you don't see the rEFInd screen, then chances are you are booting via GRUB. You're booting through both of them if you see the rEFInd screen and select an option that boots GRUB (with a name that includes the string grub).

Finally, your question refers to "keeping EFI." The Extensible Firmware Interface (EFI) is a type of firmware -- software that's built into a chip on the computer's motherboard. EFI controls the way the computer starts and provides services to help OSes boot. As such, you must keep the EFI. (Well, you could replace it with Coreboot or something else, but that's a task for uber-geeks. It would also effectively turn your Mac into a non-Mac.) It's not clear to me what you're thinking of when you refer to "keeping EFI," unless perhaps you mean rEFInd. If that's the case, then you need to figure out whether you're booting via rEFInd, GRUB, or both. You could remove one, but there's very little advantage to doing so.


The found.000 folder seems to be the output folder used by fsck in order to write the files it recover from the bad area on the disk.

It is possible that some corrupted data on your disk can be found there.

I'd suggest keeping this folder for a while.

I think that you can delete this folder when you'll be sure that no important data should be recover.

You can read more about it here :

What are found.000 folders and why are they created ?
How to recover windows found.000 files

  Note that Unix system usually save such files in /lost+found (see
  this question)


How to fix malformed characters show up in tmux window from pressing specific keys?

What worked for me is configuring tmux so that it uses /bin/bash
To do this, I created the file (which didn't exist) "tmux.conf" in /etc/ and set this single line to it: "set-option -g default-shell /bin/bash", then I restarted the OS.


Missing drivers for Radeon 8470D on 16.04

The proprietary driver fglrx is no longer supported by amd and you can't use it in ubuntu 16.04 (due to xorg and kernel versions). The alternative is the amdgpu opensource driver which your system will use it automatically if your gpu supported it. Since it doesn't seem to support it you only have the radeon opensource driver. If you need fglrx then yes, the only solution is installing ubuntu 14.04.
Some links to verify this (suggested by @Mark Kirby via comment) are here:

https://linux.slashdot.org/story/16/03/09/2049232/ubuntu-drops-support-for-amds-catalyst-gpu-driver

http://www.omgubuntu.co.uk/2016/03/ubuntu-drops-amd-catalyst-fglrx-driver-16-04


Poor, flaky wireless internet with Ubuntu 16.04

First, be certain that the firmware you have is the latest. Please open a terminal and do:

wget http://mirrors.kernel.org/ubuntu/pool/main/l/linux-firmware/linux-firmware_1.164_all.deb
sudo dpkg -i linux*.deb

Reboot.

Next, check the settings in the router. WPA2-AES is preferred; not any WPA and WPA2 mixed mode and certainly not TKIP. Second, if your router is capable of N speeds, you may have better connectivity with a channel width of 20 MHz in the 2.4 GHz band instead of automatic 20/40 MHz, although it is likely to affect N speeds. I also have better luck with a fixed channel, either 1, 6 or 11, rather than automatic channel selection. Also, be certain the router is not set to use N speeds only; auto B, G and N is preferred. After making these changes, reboot the router.

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

sudo iw reg get

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

sudo iw reg set IS

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

gksudo gedit /etc/default/crda

Use nano or kate or leafpad if you don't have the text editor gedit.

Change the last line to read:

REGDOMAIN=IS

Proofread carefully, save and close the text editor.

Next, I'd set IPv6 to Ignore in Network Manager: http://docs.fedoraproject.org/en-US/Fedora/18/html/Installation_Guide/images/netconfig/network-connections-ipv6-ignore.png  This example is for ethernet, but you want wireless.

If these changes do not help, please try:

sudo modprobe -r ath10k_pci
sudo modprobe -r ath10k_core
sudo modprobe ath10k_core cryptmode=1
sudo modprobe ath10k_pci

If it helps, make it permanent:

sudo -i
echo "options ath10k_core cryptmode=1"  >>  /etc/modprobe.d/ath10k.conf
exit


Is there an apt command to download a deb file from the repositories to the current directory?

You can use the download sub-command of apt, apt-get or aptitude. For example, if $PKG is the package you want, any of these will do:

apt-get download $PKG
apt download $PKG
aptitude download $PKG

This doesn't require root privileges. The same can also be approximated using apt-get and wget:

wget $(apt-get install --reinstall --print-uris -qq $PKG | cut -d"'" -f2)

This will, however, fetch all packages required to install the package, so you can attempt to limit it instead:

wget $(apt-get install --reinstall --print-uris -qq $PKG | cut -d"'" -f2 | grep "/${PKG}_")

You can also put a wget line into a function, to be able to use it as a command apt-download with the package name as a parameter:

function apt-download { wget -c $(apt-get install --reinstall --print-uris -qq $1 | cut -d"'" -f2); }

Note the modifications: The $PKG is replaced with $1 and the -c parameter enables continuing interrupted downloads.


Network Manager icon is missing on Ubuntu 14.04 LTS

Bluetooth can be re-added by going into the Bluetooth menu in System Settings and checking the box at the bottom that says

  Show Bluetooth status in the menu bar

Unfortunately the Network menu has no such button. I have not yet found a way to restore it on my machine, as reinstalling 'network-manager-gnome' did not help at all.


Why do I get "package not found" when trying to install jabref with apt-get?

Make sure that Universe repository is available in software sources as here . Tick mark it if Unticked initially.

Then do sudo apt-get update & sudo apt-get upgrade.

Check if jabref is present by  apt-cache show jabref.

And finally sudo apt-get install jabref . No capitalization of any word is required however.


PyKaraoke not working on Ubuntu 12.10. Will it be for python3?

This seems to have been a bug in wxGTK.
It's fixed in wxGTK 2.8.13 which is not yet available in Ubuntu 12.10.

As a workaround make sure not to go directly into the directory you are selecting, but to just select it and then hit Open. This did the trick for me.

Please see http://trac.wxwidgets.org/ticket/14525 for more information.

As for Python3 compatibility of pyKaraoke: Running a quick 2to3 over it shows that there are modifications needed to the source so that it will be available for Python3.


Ubuntu 16.04.3 - Nvidia driver causing error (login loop) + GPU not showing in Xsettings

I have been experiencing weird problems recently with a XPS 15 laptop. It worked fine and suddently it went to hell. Tried reinstalling in every way, had crashes, loops, ...

What has worked for me is reinstalling Ubuntu without asking for updates or proprietary drivers during the install. Then, connect to a network and update your package repository

sudo apt-get update

I went to System Setting -> Software & Updates -> Additional Drivers and changed the drivers for Intel and nvidia to proprietary, then rebooted. Seems to work now. I wouldn't try to update to latest released 384.90 and stick with the 375 ones for now. Also I'm avoiding upgrading the system for now as my system was highly unstable when I asked the Ubuntu install process to download the latest updates (Ubuntu 16.04.3 + 4.10.0-35 kernel)


Move everything from /var/www/html to /home/saurav/wordpress:

sudo mv /var/www/html/* /home/saurav/wordpress/

/var/www/html is now empty, remove it:

sudo rmdir /var/www/html

Create a symbolic link from /var/www/html to /home/saurav/wordpress:

sudo ln -s /home/saurav/wordpress /var/www/html


What could be my mistake when installing wine at Ubuntu 18.04?

Maybe you should try a clean wine install.

Try with

$ sudo apt purge wine

then try with official WineHQ repository

First enable 32bits architecture

$ sudo dpkg --add-architecture i386

Here you Download and add the repository keys

$ wget -O - https://dl.winehq.org/wine-builds/winehq.key | sudo apt-key add -

Now add the repository

$ sudo add-apt-repository 'deb https://dl.winehq.org/wine-builds/ubuntu/ bionic main'

then update repos

$ sudo apt update

and the last step, install the WineHQ package

$ sudo apt install --install-recommends winehq-stable

Now you can test your version

$ wine --version

Here is the link to the official Webpage


Why does Ubuntu Server run both cron and atd?

The look like they are the same but there are some things at is a lot better at.
Some differences:

  cron

can be scheduled for repeated jobs (minute,hour,month,dayofmonth,dayofweek);
can be edited;
you set these in crontab or /etc/crontab

  at

starts one time. To repeat it you need to start it again;
cannot be edited, after it started;
you can start this from commandline.
the most important ability of at command is the ability to operate in relative time terms.

Have a look at these examples and imagine how you'd do these with cron:

at 2pm + 1 week
at 2pm next week
at 0815 jan 24
at 8:15 jan 24
at now "+ 1 day"
at 5 pm friday
at '17:00 + 30minutes'

at now "+ 1day"
warning: commands will be executed using /bin/sh
at> date
at> <EOT>
job 3 at Wed Aug  9 23:39:00 2017
rinzwind@schijfwereld:~$

rinzwind@schijfwereld:~$ at 2pm + 1 week
warning: commands will be executed using /bin/sh
at> date
at> <EOT>
job 1 at Tue Aug 15 14:00:00 2017

$ at 0815 Jan 24
warning: commands will be executed using /bin/sh
at> date
at> <EOT>
job 2 at Wed Jan 24 08:15:00 2018

 at 5 pm FRIday
warning: commands will be executed using /bin/sh
at> date
at> <EOT>
job 4 at Fri Aug 11 17:00:00 2017


A hacky and maybe risky workaround which worked for me was suggested here:

Go to PhotoData folder
Delete Photos.sqlite
Restart the iPhone


Fresh installed ubuntu won't allow me to login

You did not provide any useful data to help. However, in 8 cases of 10 this error comes from X malfunction, and in 6 of 10 - video adapter drivers. What video card you use?
Anyway, try pressing Ctrl-Alt-F1 or F2 until you see a text login prompt. Log it. Then

sudo -i
apt-get update
ubuntu-drivers autoinstall
reboot


How do I disable pop-up notifications in Xubuntu?

Obviously removing notify-osd won't work because Xubuntu doesn't use it, it uses xfce4-notifyd.

So if you want to remove them, remove that package.

 sudo apt-get remove xfce4-notifyd

If you only want to disable them use this:

 sudo mv /usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service /usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service.disabled

To reverse that:

 sudo mv /usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service.disabled /usr/share/dbus-1/services/org.xfce.xfce4-notifyd.Notifications.service

Source.


Why anacron does not call the crontab user files?

I've found two workarounds for this...

Option 1: Have cron.daily script run as non-root user

Scripts in /etc/cron.daily will run as root, but root doesn't need a password to run as someone else.  So put a script there that does something like this:

su myuser -c "/home/myuser/dostuff.sh"

The main drawback if you need to be root to set this up.

Option 2: Set up a personal anacron

Create your own anacron script directories, eg ~/.anacron/daily, ~/.anacron/weekly and ~/.anacron/monthly.  Put your daily scripts in the daily directory.

Then create your own anacrontab file, eg ~/.anacron/anacrontab. And make it say this:

1   5   cron.daily  run-parts --report /home/myuser/.anacron/daily
7   10  cron.weekly run-parts --report /home/myuser/.anacron/weekly
@monthly    15  cron.monthly    run-parts --report /home/myuser/.anacron/monthly

Also make a spool directory for your anacron task, eg ~/.anacron/spool.

Finally you need make anacron run. Use a frequent cron job for this.  Run crontab -e and add

* * * * * /usr/sbin/anacron -t /home/myuser/.anacron/anacrontab -S /home/myuser/.anacron/spool

This will run anacron with your config every minute and if a job is due anacron will run it.  You can make it less frequent if you like, every hour might be good enough for most users.


Error while installing NS2 on Ubuntu 17.01

'ns-2.35' Ubuntu 17.10 : sudo apt install g++-5 → I.e. no later than g++-5 (>=5.4) can be used. Note : You can have as many gcc versions as you want, installed at the same time.

tar xvf ns-allinone-2.35_gcc5.tar.gz           // 2014 - 2017 update

https://drive.google.com/file/d/0B7S255p3kFXNVVlxR0ZNRGVORjQ/view?usp=sharing

cd ns-allinone-2.35/
export CC=gcc-5 CXX=g++-5 && ./install
cd ns-2.35/
sudo make install

If you want additional protocols → All ~300 patches → https://drive.google.com/drive/folders/0B7S255p3kFXNZ2lWZDBRSW40Q00?usp=sharing ... And ~2500 simulations https://drive.google.com/drive/folders/0B7S255p3kFXNSmRYb2lGcDRUdWs?usp=sharing


grotty, troff, nroff, groff, preconv... are these normal?

Yes, they are a normal part of any Linux system.

groff is a text formatting program that is used to format and display man pages.

grotty, troff, nroff and preconv are helper programs used by groff. See their man pages (man grotty, man troff, ...) if you want to know the details.


Is it possible to download Google Chrome 32bits on Ubuntu 16.04?

Google discontinued it.But you can still install it. Trying "Chromium" is better? They r the same.


How to install NVIDIA drivers on Ubuntu 14.04

This is how I got it done on Lenovo Y500 laptop.

Download either 32 bit or 64 bit driver depending on your architecture.

First make sure that remove any previous driver install, using sudo apt-get purge nvidia*.

Once you're logged in, Press Ctrl+Alt+F1, to switch to the first virtual terminal and login. Once logged in, navigate to where the file was downloaded, and do the command(s) below:

sudo service lightdm stop
chmod +x NVIDIA-Linux-*-331.49.run
sudo sh ~/Downloads/NVIDIA-Linux-*-331.49.run

Once done, press Ctrl+Alt+F7 to go back to GUI, and reboot.


Cannot enable php-curl on Ubuntu 18.04 & PHP 7.2

Found the issue.

What was happening was I had both php7.1 and php7.2 enabled within apache2. had to run sudo a2dismod php7.1, restart apache, and afterwards I was able to load my inc.redirect.php page without errors.


#juju- how to copy files from one juju machine to another juju machine?

Each of the machines do not have ssh access to the other machines.

You probably need to use the client machine as an intermediary.

So use 'juju scp' to copy the file to the client from one machine, then another 'juju scp' to copy from the client to the other machine.


ImportError: No module named Selenium2Library

I had to enable the library for my own user. The flag: --user, did the trick for me.

sudo pip uninstall robotframework-selenium2library
pip install --user robotframework-selenium2library

But without first uninstalling it, I would get requirement already satisfied message.


How to launch several terminals with an application?

You simply can do it (when you use gnome-terminal) with:

gnome-terminal -- htop

you could make yourself a .desktop file for that with the following content and place it in ~/.local/share/applications.

[Desktop Entry]
Name=Htop
Comment=my cool htop terminal
Exec=/usr/bin/gnome-terminal -- /usr/bin/htop
Terminal=True
Type=Application

If you for example want this terminal to be maximized you can use the following Exec line:

Exec=/usr/bin/gnome-terminal --maximize -- /usr/bin/htop

To have it open multiple tabs with different commands you can concatenate gnome-terminal commands on the Exec line with && and use the --tab option example below for one htop terminal and a second terminal using top:

Exec=/usr/bin/gnome-terminal -- /usr/bin/htop && /usr/bin/gnome-terminal -- /usr/bin/top

You could even assign the above lines without the Exec= to a shortcut via the shortcut manager (keyboard settings).


Unable to access Windows after Ubuntu and GRUB installation

Boot form your Windows 7 CD and open a terminal. (Windows cmd.exe)
Now type the following command: bootrec /FixMBR. See if it worked. If not, use bootrec /FixBoot. This will overwrite GRUB! Now you can only boot Windows 7.
Now boot from Live Ubuntu and follow these steps:

sudo mount /dev/sdaX /mnt    #replace X by the partition where Ubuntu is installed
sudo grub-install /dev/sda --root-directory=/mnt
sudo reboot

Now you should have a new GRUB. NOTE: If you changed the /etc/default/grub, you may have to re-edit it, I don't know whether grub-install touches that one too.


How can I make VirtualBox guests(Windows) VPN share with the host's (Ubuntu)

Unfortunately I have your same problem with another VPN Client, but I have not found a way to share the guest VPN with the host yet.
However, even if it does not actually answer your question, have you tried looking at openfortivpn? I think it provides a better VPN client for Linux based systems than the official one (it has better CLI support). Maybe you can solve your problem using it directly on your host environment.


I solved my problem by following this thread's solution and using the GUID 7C3457EF-0000-11AA-AA11-00306543ECAC as my original OS X partition was an APFS container rather than an HFS partition or Logical Volume.

In summary:

1. Boot Mac in Recovery mode (Hold Cmd+R while booting)
2. Open Utilities->Terminal
3. "diskutil list" to identify the partition in question (for me, disk0s2 was marked with GUID FFFF...)
4. gpt -r show disk0" to provide the start sector and size of the disk0 partitions. The output here is very similar to the gdisk -l output of my original post above.
5. "diskutil unmountDisk disk0" to allow the next step...
6. "gpt remove -i 2 disk0" to strip the partition table data associated with the broken partition.
7. "gpt add -b 409640 -i 2 -s 416425263 -t 7C3457EF-0000-11AA-AA11-00306543ECAC"

Part 7 is the most critical step. It adds the correct data to the partition table and recovers the lost partition. Here is the breakdown of the instruction:

'-b' is the beginning sector of the partition as observed in step 4.
'-i' is the index of the partition to be recovered; in my case, this was disk0s2, so index position 2.
'-s' is the size of the partition as observed in step 4.
'-t' is the GUID type of the partition. Specifically, the originally broken data preventing use of the partition (previously marked FFFF...).


Change file manager on Ubuntu to Dolphin from flatpak

Finally it was pretty easy:

To get the application name of Dolphin:
flatpak list
Description           Application Version Zweig  Arch   Origin  Installation
Dolphin - Filemanager org.kde.dolphin     stable x86_64 flathub system

Change default filemanager:
xdg-mime default org.kde.dolphin.desktop inode/directory application/x-gnome-saved-search

My question is similar to Flatpak applications use nautilus instead of Dolphin, but that got no real answer IMO.

If you want to get to know more about Flatpak file paths: Link


sound stopped working on Ubuntu (Netbook)

You could re-install related packages like amarok and of rhythmbox, with:

sudo apt-get install --reinstall rhythmbox amarok
sudo reboot


Am new to Kubuntu. First time tried it on Flash-drive. Desktop had only one icon on it. Entitled "Install". Any help please?

The Kickoff default application launcher icon in Kubuntu 17.04 looks like this. Kickoff is the default application launcher in Kubuntu that provides a click-through interface for finding and launching applications. The Kickoff icon is located in the bottom panel at the bottom left corner of the Kubuntu desktop. Kickoff has a search facility, allowing you to type the name of the application or its description to find it.

  The Kickoff default application launcher icon in Kubuntu 16.04 looks like this.


Sounds like you're after "Focus on hover" or "sloppy focus" as it's often called. If you install GNOME Tweaks, you'll find the setting under the "Windows" section. I use this myself, and prefer it.


Switch windows of an application behavior change in 19.04

Wayland was the problem. When I switched the login setting from "Gnome" to "Gnome on Xorg" the probem was fixed.


To get sound back when Wine destroys it all, you only need to do:

killall -9 pulseaudio

The pulseaudio system will restart itself in a few seconds, there is no need to manually run it.

To avoid this situation I usually try and close apps that will make sound while Wine is running, in particular Firefox with Flash.  I also set my IM status to away (where the client is configured to not make message sounds)


I had to download, make and install the opencv source code in a ubuntu 12.04 and it worked.
I also tried to install the pre-compiled packages in my ubuntu 12.10 and got no problem.

Try this in a Terminal and tell me what you get:

sudo apt-get install libcv-dev libcvaux-dev libhighgui-dev


Is there a restore counterpart to gvfs-trash?

In the gvfs-bin package, there is currently no restore counterpart to gvfs-trash, so the only way around it at the moment is to install trash-cli from the repositories (more information here) and use the trash-restore (restore-trash in 18.10 and earlier releases) function from there after sending a file to trash with gvfs-trash. They are both compatible as they adhere to the freedesktop trash specification, as you probably know.

To send a file to trash, enter:

gvfs-trash newt

Then run

trash-restore

which gives the prompt

0 2012-09-13 01:09:05 /home/mike/newt
What file to restore [0..0]: 0

This seems to be the way to restore things sent to trash from the command-line at the moment, but it will be worth updating the answer in the future if a gvfs restore tool appears to compliment gvfs-trash.


Ubuntu 16.04 + Windows 10, fail to boot (UEFI) after motherboard changed

I got it working.  Posting solution in case others have a similar problem.  Thanks to @oldfred for the comments which pointed me in the right direction.

The first problem was related the first error message:

Failed to set MokListRT: Invalid Parameter

To address this one, Secure Boot needed to be disabled.  Unfortunately, the version of BIOS that came with my motherboard didn't have this setting (at least I was not able to find it).  I flashed the latest version of BIOS from the motherboard manufacturer.

With the latest BIOS version, I was then able to find the option which @oldfred mentioned is equivalent to Secure Boot.  The option is called "OS Type", and the correct value to select is "Other OS".  This eliminated the invalid parameter error during bootup.

The other error messages were about files not found:

Failed to open \EFI\BOOT\grubx64.efi - Not Found
Failed to load image \EFI\BOOT\grubx64.efi: Not Found
Failed to open \EFI\BOOT\MokManager.efi - Not Found
Failed to load image \EFI\BOOT\MokManager.efi: Not Found

I mounted /dev/sda1 and did a little digging.  I found the two files that were reported to be missing, under folder /efi/ubuntu/.  I copied them over to the folder which is mentioned in the error messages (/efi/Boot/).  I am now able to boot up without errors.


Keyboard shortcut to summon screenshot tool

No, but as far as I know you can create custom shortcut to launch the Gnome Screenshot.

Navigate to Settings > Devices > Keyboard.
Assign new custom keyboard shortcut by clicking + button on bottom of page.
In the command section, type following.

gnome-screenshot --interactive

Save the changes

You can now bring up Gnome Screenshot by clicking keyboard combination.


Change string within Brackets with non_greedy pattern

If the strings you're working with are as simple as the sample input and output, I'd say you're making this harder than it is. You can just search for "john)" and "james)", like so:

$ echo "this is 1(the house owner 2(pet-name john) john and his friend 3(unknown name james) james fred)" | sed -r 's/(john\)|james\))/xxx-\1/g'
this is 1(the house owner 2(pet-name xxx-john) john and his friend 3(unknown name xxx-james) james fred)

Since you mentioned non-greedy patterns, I have a feeling there is more to this than your example shows. So, let's pretend we don't know if there will be a closing parenthesis right after the names:

$ echo "this is 1(the house owner 2(pet-name john ok) john and his friend 3(unknown name james test) james fred)" | sed -r 's/(\([^()]*)(john|james)([^()]*\))/\1xxx-\2\3/g'
this is 1(the house owner 2(pet-name xxx-john ok) john and his friend 3(unknown name xxx-james test) james fred)

The first set of parentheses captures everything after (and including) a literal opening parenthesis that isn't an opening or closing parenthesis until it hits "james" or "john".

The second set of parentheses captures "john" or "james".

The third set of parentheses captures anything after "james" or "john" that isn't an opening or closing parenthesis until it hits a literal closing parenthesis.

This is a global replacement, so it will work no matter how many sets of parentheses you have. You can even nest them deeper, and this will only apply to the smallest set.

Greediness doesn't come into play in this situation, but if it does for the project you're working on, just add a question mark (e.g. * becomes *?) to make it non-greedy.


How to make my server email me when there are security updates?

You can use tool called apticron to notify you when new updates are available. It sends you e-mail about pending upgrades, also giving you a choice to only send you e-mail about updates not previously notified.

To setup apticron edit /etc/apticron/apticron.conf and change line containing e-mail address:

EMAIL="admin@example.com"

Enter the e-mail address you wish to receive notifications to.

For more information see man apticron.


MSI Laptop - trouble with NVidia Driver and dual screens

I encounter the same problem with similar configuration (almost the same except it is a Razer Blade). The only workaround that I "found" is:
1) configuring the laptop monitor as primary
2) wait until your laptop fully boots
3) login
4) plug your HDMI
5) configure it your monitor as extended display

Now every-time you want to reset or shutdown you need to unplug your HDMI and then plug it when you have login to your Ubuntu.