How to create keyboard shortcuts from terminal?

The broad answer is the following.
According to the contents of gschema.xml files with definitions of default GSettings they are defined in:

$ gsettings list-recursively | egrep "Alt|Shift|Super|Space|Win|Meta|Primary|Control|Ctrl|Tab" | grep org.gnome | awk '{print $1}' | sort -u
org.gnome.Charmap.WindowState
org.gnome.desktop.wm.keybindings
org.gnome.desktop.wm.preferences
org.gnome.metacity.keybindings
org.gnome.mutter
org.gnome.mutter.keybindings
org.gnome.mutter.wayland.keybindings
org.gnome.settings-daemon.plugins.media-keys

The defaults are the following:

$ gsettings list-recursively | egrep "Alt|Shift|Super|Space|Win|Meta|Primary|Control|Ctrl|Tab" | grep org.gnome
org.gnome.settings-daemon.plugins.media-keys logout '<Control><Alt>Delete'
org.gnome.settings-daemon.plugins.media-keys screenreader '<Alt><Super>s'
org.gnome.settings-daemon.plugins.media-keys window-screenshot '<Alt>Print'
org.gnome.settings-daemon.plugins.media-keys terminal '<Primary><Alt>t'
org.gnome.settings-daemon.plugins.media-keys screenshot-clip '<Ctrl>Print'
org.gnome.settings-daemon.plugins.media-keys magnifier '<Alt><Super>8'
org.gnome.settings-daemon.plugins.media-keys magnifier-zoom-in '<Alt><Super>equal'
org.gnome.settings-daemon.plugins.media-keys video-out '<Super>p'
org.gnome.settings-daemon.plugins.media-keys window-screenshot-clip '<Ctrl><Alt>Print'
org.gnome.settings-daemon.plugins.media-keys area-screenshot-clip '<Ctrl><Shift>Print'
org.gnome.settings-daemon.plugins.media-keys magnifier-zoom-out '<Alt><Super>minus'
org.gnome.settings-daemon.plugins.media-keys screencast '<Ctrl><Shift><Alt>R'
org.gnome.settings-daemon.plugins.media-keys screensaver '<Control><Alt>l'
org.gnome.settings-daemon.plugins.media-keys area-screenshot '<Shift>Print'
org.gnome.desktop.wm.preferences mouse-button-modifier '<Alt>'
org.gnome.mutter.keybindings toggle-tiled-right ['<Primary><Super>Right', '<Super>Right']
org.gnome.mutter.keybindings toggle-tiled-left ['<Primary><Super>Left', '<Super>Left']
org.gnome.settings-daemon.plugins.media-keys logout '<Control><Alt>Delete'
org.gnome.settings-daemon.plugins.media-keys screenreader '<Alt><Super>s'
org.gnome.settings-daemon.plugins.media-keys window-screenshot '<Alt>Print'
org.gnome.settings-daemon.plugins.media-keys terminal '<Primary><Alt>t'
org.gnome.settings-daemon.plugins.media-keys screenshot-clip '<Ctrl>Print'
org.gnome.settings-daemon.plugins.media-keys magnifier '<Alt><Super>8'
org.gnome.settings-daemon.plugins.media-keys magnifier-zoom-in '<Alt><Super>equal'
org.gnome.settings-daemon.plugins.media-keys video-out '<Super>p'
org.gnome.settings-daemon.plugins.media-keys window-screenshot-clip '<Ctrl><Alt>Print'
org.gnome.settings-daemon.plugins.media-keys area-screenshot-clip '<Ctrl><Shift>Print'
org.gnome.settings-daemon.plugins.media-keys magnifier-zoom-out '<Alt><Super>minus'
org.gnome.settings-daemon.plugins.media-keys screencast '<Ctrl><Shift><Alt>R'
org.gnome.settings-daemon.plugins.media-keys screensaver '<Control><Alt>l'
org.gnome.settings-daemon.plugins.media-keys area-screenshot '<Shift>Print'
org.gnome.mutter.wayland.keybindings switch-to-session-10 ['<Primary><Alt>F10']
org.gnome.mutter.wayland.keybindings switch-to-session-11 ['<Primary><Alt>F11']
org.gnome.mutter.wayland.keybindings switch-to-session-12 ['<Primary><Alt>F12']
org.gnome.mutter.wayland.keybindings switch-to-session-1 ['<Primary><Alt>F1']
org.gnome.mutter.wayland.keybindings switch-to-session-2 ['<Primary><Alt>F2']
org.gnome.mutter.wayland.keybindings switch-to-session-3 ['<Primary><Alt>F3']
org.gnome.mutter.wayland.keybindings switch-to-session-4 ['<Primary><Alt>F4']
org.gnome.mutter.wayland.keybindings switch-to-session-5 ['<Primary><Alt>F5']
org.gnome.mutter.wayland.keybindings switch-to-session-6 ['<Primary><Alt>F6']
org.gnome.mutter.wayland.keybindings switch-to-session-7 ['<Primary><Alt>F7']
org.gnome.mutter.wayland.keybindings switch-to-session-8 ['<Primary><Alt>F8']
org.gnome.mutter.wayland.keybindings switch-to-session-9 ['<Primary><Alt>F9']
org.gnome.metacity.keybindings toggle-tiled-right ['<Super>Right']
org.gnome.metacity.keybindings toggle-tiled-left ['<Super>Left']
org.gnome.desktop.wm.keybindings cycle-windows-backward ['<Shift><Alt>Escape']
org.gnome.desktop.wm.keybindings minimize ['<Primary><Alt>KP_0']
org.gnome.desktop.wm.keybindings move-to-monitor-left ['<Super><Shift>Left']
org.gnome.desktop.wm.keybindings unmaximize ['<Primary><Super>Down', '<Super>Down', '<Alt>F5']
org.gnome.desktop.wm.keybindings panel-main-menu ['<Super>s', '<Alt>F1']
org.gnome.desktop.wm.keybindings cycle-windows ['<Alt>Escape']
org.gnome.desktop.wm.keybindings cycle-panels-backward ['<Shift><Control><Alt>Escape']
org.gnome.desktop.wm.keybindings panel-run-dialog ['<Alt>F2']
org.gnome.desktop.wm.keybindings switch-to-workspace-down ['<Control><Alt>Down']
org.gnome.desktop.wm.keybindings move-to-corner-ne ['<Primary><Alt>KP_Prior']
org.gnome.desktop.wm.keybindings move-to-side-e ['<Primary><Alt>KP_Right']
org.gnome.desktop.wm.keybindings move-to-workspace-right ['<Control><Shift><Alt>Right']
org.gnome.desktop.wm.keybindings move-to-workspace-up ['<Shift><Control><Alt>Up']
org.gnome.desktop.wm.keybindings maximize ['<Primary><Super>Up', '<Super>Up', '<Primary><Alt>KP_5']
org.gnome.desktop.wm.keybindings cycle-group-backward ['<Shift><Alt>F6']
org.gnome.desktop.wm.keybindings move-to-side-n ['<Primary><Alt>KP_Up']
org.gnome.desktop.wm.keybindings move-to-side-s ['<Primary><Alt>KP_Down']
org.gnome.desktop.wm.keybindings move-to-side-w ['<Primary><Alt>KP_Left']
org.gnome.desktop.wm.keybindings move-to-corner-nw ['<Primary><Alt>KP_Home']
org.gnome.desktop.wm.keybindings begin-move ['<Alt>F7']
org.gnome.desktop.wm.keybindings move-to-monitor-down ['<Super><Shift>Down']
org.gnome.desktop.wm.keybindings move-to-workspace-left ['<Control><Shift><Alt>Left']
org.gnome.desktop.wm.keybindings move-to-corner-se ['<Primary><Alt>KP_Next']
org.gnome.desktop.wm.keybindings activate-window-menu ['<Alt>space']
org.gnome.desktop.wm.keybindings switch-input-source ['<Super>space']
org.gnome.desktop.wm.keybindings move-to-monitor-right ['<Super><Shift>Right']
org.gnome.desktop.wm.keybindings switch-input-source-backward ['<Shift><Super>space']
org.gnome.desktop.wm.keybindings move-to-workspace-last ['<Super><Shift>End']
org.gnome.desktop.wm.keybindings cycle-panels ['<Control><Alt>Escape']
org.gnome.desktop.wm.keybindings move-to-monitor-up ['<Super><Shift>Up']
org.gnome.desktop.wm.keybindings move-to-corner-sw ['<Primary><Alt>KP_End']
org.gnome.desktop.wm.keybindings toggle-shaded ['<Primary><Alt>s']
org.gnome.desktop.wm.keybindings switch-to-workspace-1 ['<Super>Home']
org.gnome.desktop.wm.keybindings switch-panels ['<Control><Alt>Tab']
org.gnome.desktop.wm.keybindings switch-panels-backward ['<Shift><Control><Alt>Tab']
org.gnome.desktop.wm.keybindings switch-applications-backward ['<Shift><Super>Tab', '<Shift><Alt>Tab']
org.gnome.desktop.wm.keybindings show-desktop ['<Primary><Super>d', '<Primary><Alt>d', '<Super>d']
org.gnome.desktop.wm.keybindings switch-applications ['<Super>Tab', '<Alt>Tab']
org.gnome.desktop.wm.keybindings switch-to-workspace-left ['<Control><Alt>Left']
org.gnome.desktop.wm.keybindings toggle-maximized ['<Primary><Alt>KP_5']
org.gnome.desktop.wm.keybindings begin-resize ['<Alt>F8']
org.gnome.desktop.wm.keybindings move-to-workspace-down ['<Shift><Control><Alt>Down']
org.gnome.desktop.wm.keybindings switch-to-workspace-last ['<Super>End']
org.gnome.desktop.wm.keybindings switch-group-backward ['<Shift><Super>Above_Tab', '<Shift><Alt>Above_Tab']
org.gnome.desktop.wm.keybindings switch-group ['<Super>Above_Tab', '<Alt>Above_Tab']
org.gnome.desktop.wm.keybindings cycle-group ['<Alt>F6']
org.gnome.desktop.wm.keybindings close ['<Alt>F4']
org.gnome.desktop.wm.keybindings switch-to-workspace-up ['<Control><Alt>Up']
org.gnome.desktop.wm.keybindings move-to-workspace-1 ['<Super><Shift>Home']
org.gnome.desktop.wm.keybindings switch-to-workspace-right ['<Control><Alt>Right']
org.gnome.mutter overlay-key 'Super_L'
org.gnome.mutter.keybindings toggle-tiled-right ['<Primary><Super>Right', '<Super>Right']
org.gnome.mutter.keybindings toggle-tiled-left ['<Primary><Super>Left', '<Super>Left']

So you can set any of them with gsettings set:

gsettings set org.gnome.settings-daemon.plugins.media-keys logout "'<Control><Alt>Delete'"

or reset with

gsettings reset org.gnome.settings-daemon.plugins.media-keys logout

Note: unity-control-center keyboard uses <Primary> for <Ctrl>.


libcgmanager.so was included in the libcgmanager-dev package for which the last version available that I could find was for Zesty which might still be available here but will likely be moved as described here if it hasn't been already.

If you aren't a developer and don't actually enjoy running down bugs, I would urge you to stick with LongTermSupport releases which IMHO receive better support.

17.10 will fall out of support in July of 2018 whereas 14.04 LTS will be supported until April 2019 and 16.04 LTS will be supported until April of 2021. (both of those aforementioned LTS releases have the libcgmanager-dev package containing the file you need (and any dependencies). The next LTS release will be Bionic Beaver in April of 2018. If you have an overriding reason to maintain 17.10 you might consider dual booting an LTS release so that you have an easy alternative solution when a short term release is missing a package you are depending on.

The only other alternative I can think of is to rely on an "untrusted PPA" such as ubuntu-lxc

This PPA contains the latest stable release of:
 - CGManager
 - LXC
 - LXCFS
 - LXD

As well as any required dependencies of the above.

Caveat: Note that this PPA will roll to new major versions whenever they are released. If you need more long term stability, consider using the lts PPA instead.


Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] ((null):0)

Nevermind. I dissabled the two virtual hosts I made last with a2dissite and now Apache2 is starting.


Would Ubuntu 12.10 on a Dell Inspiron e1405 (Intel Core Duo T2300 (1.66 GHz/2MB L2 Cache) be too slow?

The easiest option would be to go onto the Ubuntu website and check the relevant release notes if you're keen on using Ubuntu (although keep in mind that older versions won't receive updates after a certain amount of time) here is a list of the official system requirements which you'd probably find relevant with your hardware:

12.10 Quantal Quetzal
12.04 Precise Pangolin LTS
11.10 Oneiric Ocelot
11.04 Natty Narwhal

However as the release notes only really give you an idea of the minimal requirements and don't give you a clear indication on how responsive the system is, I'd suggest you'd also give a look at other Ubuntu derivatives as Unity can be slightly less responsive on lower end systems. A good read if you're unsure is to give Marco Ceppi's answer on Ubuntu derivated operating systems a read as it's a great resource if you're unsure what to pick.

Alternatively if you want pure speed on your laptop, I'd suggest looking at questions such as the following:

Lighter in CPU/Memory Usage: Lubuntu or Xubuntu
What is the lightest desktop interface for ubuntu and is Unity-2d classified as a 'light' interface?

Additionally if you like stability and regular updates for years to come I'd suggest sticking to a LTS release such as 12.04, as these versions will be updated the longest as explained in this question's answers.

As I'm guessing you're relatively new to the community and I may have bombarded you with information feel free to search the site for any terms you're not familiar with or alternatively just post a question in the comments below and I'll add the information you need to my answer.


mir session in 16.04 shutdown my monitors

I found the answer in Michale Hall's blog. There is a bug in libhybris that stops mir to work properly.

If you want to try Unity 8 (at least for now) you can follow this instructions:

http://mhall119.com/2016/05/dogfooding-unity-8/


A good pixel art drawer for Ubuntu 14.10?

What you're looking for is pinta .

You can install it from the software centre by clicking above, or you can grab the daily  build (not recommended!!!) from a PPA:

ppa:pinta-maintainers/pinta-daily

Here's a screenshot for greater glory:


Files and folders in the Desktop disappeared

Thanks to @green7. His answer here helps me solve the problem.

First of all, I'm sure my ~/.config/user-dirs.dirs isn't changed.

Second, restart nautilus.

run the command in the terminal: killall nautilus or nautilus -q
press Alt+F2, search nautilus and run it.


In short: you need to set up an address on interface eth1 before the DHCP can serve requests from it.

Longer story: the DHCP server will read the configuration file, then match the subnet declarations with IP addresses currently assigned to interfaces.  Only interfaces whose IP address matches a subnet declaration will serve requests for that subnet.  Hence, you need to set up eth1 with an address in the 192.168.0.0/24 range, if you want the ISC DHCP server to serve requests for 192.168.0.0/24 from it.


Finally I found the reason why keyup does not work. It was because the English input of the Chinese input method "Chewing" is lightly different from native English input method.
Take typing a character "A" for example:
Native English Input Method

keydown
keypress
"A"
keyup

Chinese Chewing Input Method

keydown
"A"

Both of keypress and keydown event were not triggered.


No. Drivers for Windows are for Windows. Ubuntu comes pre-loaded with almost all the drivers you will need. In some cases, there may not be drivers available for a particular piece of hardware. If you are using an Nvidia or ATI video card, you may need to install the proprietary drivers to get full utilization of the hardware, but the open source drivers that are  already installed should work well enough to get you that far.


Destination host unreachable: pinging one Ubuntu VM from another Ubuntu VM

As you are using VMs, you should be sure that the NAT is properly configured. Are you able to ping the VMs from their corresponding hosts?

If you are using VirtualBox (same principles for other products), you can find related info in:https://www.virtualbox.org/manual/ch06.html

Lookt at table 6.1

            VM ↔ Host   VM1 ↔ VM2   VM → Internet   VM ← Internet
 Host-only     +            +          –                –
 Internal      –            +          –                –
 Bridged       +            +          +                +
 NAT           –            –          +           Port forwarding
 NAT Network   –            +          +           Port forwarding

I think, the easiest way is to change the default settings to NAT Network, but you can try other options.


I am unable to open Ubuntu Software & Updates, Sofware Updater and Software Boutique

The PPA from your error message is outdated and no longer maintained, so we need to remove it with commands below:

sudo apt install ppa-purge
sudo ppa-purge ppa:cassou/emacs

if this command fails - remove this PPA from the system with another command:

sudo add-apt-repository -r ppa:cassou/emacs

And then you can use your system as before. As starting point you may want to install all updates:

sudo apt update
sudo apt upgrade


Ubuntu 14.04: Can I automatically deactivate my touchpad when a USB-mouse is connected?

There is a setting for Ubuntu 15.10 and I believe it is applicable for 14.04 too. The feature can be accessed by using Dconf editor. Navigate to org.gnome.desktop.peripherals.touchpad and change the send-events path.

This can be done via command line as well. The following command gives the output:

$ gsettings range org.gnome.desktop.peripherals.touchpad send-events
enum
'enabled'
'disabled'
'disabled-on-external-mouse'

Of course last property is of our pursue. To change the settings type this command:

gsettings set org.gnome.desktop.peripherals.touchpad send-events disabled-on-external-mouse

Again, you may want to revert things. If so, run following:

gsettings set org.gnome.desktop.peripherals.touchpad send-events enabled

Update:

I can only confirm it works with a wired USB mouse.


It seems that you are also experiencing a bug that has been reported here.

Installing libglib2.0 and libgtk2.0 has solved the problem for some.


Warning: This answer is outdated. As of writing this warning (6.10.2013) the kernel-ppa used here is no longer updated. Please disregard this answer.

Small note: Installing anything but the official standard kernel for your system is not recommended. It might be unstable or buggy. Now to the topic:

This adds the daily build of ubuntu kernel (not mainline):

sudo apt-add-repository ppa:kernel-ppa/ppa
sudo apt-get update
sudo apt-get install PACKAGENAME

You can do the same with Software Center or Synaptic using the menu item "Repositories". From there you'll need to click through some self explanatory stuff.

You might be interested in this answer.


I want to block all usb devices except usb keyboard and usb mouse using udev rules in ubuntu 16.04 & above.?

Just hints:

/etc/modeprobe.d/blacklist.conf .. blacklist does not work for all types of drivers. Some are not external modules and so they need a special argument passed through  /etc/default/grub .. GRUB_CMDLINE_LINUX_DEFAULT.
usbhid is the core USB HID (Human Interface Devices) driver for keyboard, mouse & joystick. Better to drop it, It is good that you still have access to machine. Better, if you prepare OpenSSH login just in case.
Check lsusb -t and udevadm info -a ... when only mouse/keyboard are connected. Collect the list of all active USB drivers. I expect to get: USB1/2/3-hubs, mouse, keyboard, SD card reader, bluetooth.
Develop similar rule to one used for this post for Driver unbinding, allowing probably only USB hubs & USB HID drives.

If you face a block, update the question with collected info, let me know with a comment.


Those are console control characters made by watch output. You should avoid using watch when you need to redirect a command output. Here is a better approach:

while sleep 1; do echo `date +"%F %T"` `acpi -t` >> temp.log; done


See this blog post:

Gnome3 Customization | Change Icon Size

Unfortunately, these system-wide changes are likely to be gone after the next update... To per-user changes, refer to this blog post:

Per-user Gnome 3 configuration

(It is about Arch Linux, but I think it is applicable)

Install user-theme extension for gnome-shell, then copy themes to your home folders as written, modify them as you like, and choose your new user-modified theme in the gnome-tweak-tool.


Nowadays you can download self-contained .deb files from http://www.vagrantup.com/downloads.html

Not as good as a PPA, but at least you can introspect what files get installed where and remove the package cleanly.


you can run mount to get the list of all attached devices and their mount locations.

USBs are put under /media/<username> folder.


Try going to File -> Printer Settings -> Properties -> Device -> Printer Language and if it is set to PDF change it to PostScript.

To make this change stick:

Make a document with this format and go to File -> Templates -> Save.
In the new template type the name you want for it.
In the list Category, select "My Documents" and click OK.
Next choose File-Templates-Manage in the list templates, double-click the folder "My Templates".
In the context menu, select the command "Set as default template" and close the dialog box.

The model is now used as the default template. Hope that works!


system does not power off on "poweroff", just halts

Try adding

acpi=noirq

to the kernel boot parameters. This lets it poweroff on shutdown/restart (tested with kernels 4.4 and 4.7rc5).

It seems to suspend too, but unfortunately does not resume from suspend on pressing the power button.

This has worked fine for over three months now on the A740, so I'm calling this solved.


For Ubuntu

tar cvzpf backUp.tar.gz --exclude=dev/sdax/proc --exclude=dev/sdax/lost+found --exclude=dev/sda5/sys /dev/sdax

Replace x with your disk partition number e.g. /dev/sda5

Use  sudo fdisk -l  to select proper partition.

This command will backUp everything into tar archive.
Here we're backing up whole thing hence "/"
Exclude files/folder you feel isn't important for you.
Make backUp.tar.gz at any safe location(it's obvious, but still)

When you restore

tar xvpfz backup.tar.gz -C /

Reference: http://ubuntuforums.org/showthread.php?t=35087

You can use these flags in tar: --ignore-failed-read for not exiting with nonzero on unreadable files.


Can't boot Ubuntu Live from USB (initramfs) unable to find a medium containing a live filesystem

Reliable tool to create a persistent live drive - mkusb

I suggest that you try mkusb, which can create persistent live drives from all Ubuntu and Ubuntu community flavour desktop iso files (Kubuntu, Lubuntu, ... Xubuntu).

help.ubuntu.com/community/mkusb

help.ubuntu.com/community/mkusb/persistent

If you are starting from Windows, you cannot use mkusb directly, but you can download a compressed image file with a system, that is already a Lubuntu persistent live system with mkusb installed. (There are other alternatives too.)

Compressed image file with a persistent live system

  Use a cloning tool, for example Disks or mkusb in linux, or 7-zip and
  Win32 Disk Imager in Windows to expand and
  {copy/clone/flash/burn/restore/install} this kind of files into a USB
  pendrive, a flash memory card or a hard disk drive or SSD with at
  least 8 GB.

You can use the Lubuntu system made this way as it is,
but if you want standard Ubuntu, you can use mkusb in this Lubuntu system, and install a persistent live Ubuntu system into another USB pendrive.

If you still have problems

Use comments to ask about details.
Edit your original questions to add information to make it easier to help you.


It has easy steps

You just have to download the  NVIDIA Corporation GF108M [GeForce 610M] drivers.

follow these steps.

go to http://www.nvidia.in/Download/index.aspx?lang=en-in
download the required drivers for your system.

then the downloaded file will be saved in Downloads folder.

now you have the required drivers so you have to install them on your system.

so reboot your system.and immediately when ubuntu boots, press alt+ctrl+f1

this will allow you to switch to runlevel.i.e. command line interface

login to your account

then go to the downloads directory by using command cd Downloads

now issue the command

chmod 777 "your drivers file name"

./"drivers file name"

it will prompt that you need to stop x-server
so type this command

sudo service lightdm stop

it will stop the display manager for ubuntu.and now you have to use the above command

./"drivers file name"

now follow the installation steps by selecting yes option.
finally your nvidia drivers will be installed on yoor system.

hope that works for you,regards.


can i build ubuntu package without an upstream tar ball using bzr?

bzr dh-make requires a source tarball per its help text:

$ bzr dh-make -h
Purpose: Helps you create a new package.
Usage:   bzr dh-make PACKAGE_NAME VERSION TARBALL

If your main issue is to avoid including the git metadata in your tarball, just create a .bzrignore (next to your .bzr folder) with the following content:

# Ignore git meta-data
.git


What are all the apt command-line commands and options?

Please improve this wiki and add your favourite apt commands :)

apt changelog PACKAGE_NAME

The above cmd. hows the changelog history for the specified package in reverse date order (newest first) in less format, pulled from changelogs.ubuntu.com

apt full-upgrade

(requires root privilege) a new name for apt-get dist-upgrade - see man apt-get:

  dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of
             packages; apt-get has a "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense
             of less important ones if necessary. The dist-upgrade command may therefore remove some packages.

apt search PACKAGE_NAME

Almost the same as apt-cache search but with prettified output - line-spaced and coloured for easier reading:

  search performs a full text search on all available package lists for the POSIX regex pattern given. It searches the
             package names and the descriptions for an occurrence of the regular expression and prints out the package name and the short
             description, including virtual package names.


Using the Terminal

Uninstall just qemu with

sudo apt-get remove qemu

Uninstall qemu and it's dependencies with this

sudo apt-get remove --auto-remove qemu

If you want to purge all the config and data off the system you can also use

sudo apt-get purge --auto-remove qemu

Source::Installion.co.uk


Do you have Gparted installed? There you should be able to see your USB and create a new partition for it.

sudo apt update
sudo apt install gparted


How to run a program installed through terminal

The installer added the following snippet to ~/.bashrc on my system:

# Automatically added by Platform.sh CLI installer
export PATH="/home/andrew/.platformsh/bin:$PATH"
. '/home/andrew/.platformsh/shell-config.rc' 2>/dev/null

Thus extending your $PATH, this means that for the first run you must use two commands:

source ~/.bashrc
platform

Otherwise your system will not look in the very non-standard location: $HOME/.platformsh/bin. When you have logged out and logged back in you will not need the source ~/.bashrc line again...


Don't push the reset button, I had the same problem. Ubuntu 13.10 could not upgrade my apps and that is why it froze. Wait for about another half an hour depending on how many apps you have and it should give you an error message and tell you the installation was finished. After that you should be fine, my user accounts were gone and so were most of my apps, but it is easy to get them back. That was a good idea for you to backup your files


How to put a cloned image to another HDD

Quick answer... use the reverse (of / if) of your dd backup command to restore to the new medium.  The partitioning and formatting should be automatic.

Other details:

Tested and verified on Ubuntu 14.04LTS

Cloned with dd (from 50 gig drive):

$ sudo dd if=/dev/sda | bzip2 > /mnt2/datadrive/Files/now/image.bz2

Restored using dd (restored to 100 gig raw, unformated unpartitioned drive):

$ bzcat /mnt2/datadrive/Files/now/image.bz2 | sudo dd of=/dev/sdb

The restore process restored the the three partitions (sda1 (Ubuntu Install), sda2 (extended partition), and sda5 (swap partition).  It left the other space (as identified by gnome-disk) 54 Gig Free Space.

An alternate resolution for cloning and restoring is Clonezilla.

This is a gui utility that will facilitate both the backing up and the restorer.

The only thing you need to be sure of is to make sure the restore-to drive/partition is at least the same size or larger than the backed up one.

Clonezilla has fail safe features such as to alert and refuse to process on insufficient available space.  It also shows a progress status of running time.

Using Clonezilla you'll have the option of choosing which partitions you want to bring back to the new media.  To bring back partitions you would first create the partitions using a program such as Gparted.

The gparted home page is: http://gparted.org.

Bodhi.zazen provided you with the https://help.ubuntu.com/community/DriveImaging link with details of usage.

The specifics from the page indicates that you should use the use the reverse of what you used for your backup... reverse the if and the of values.

Also, specific to your question, you may have to format and partition your target drive (ie. /dev/sda1, /dev/sda2, etc).

When restoring to a larger drive Gparted can facilitate re-sizing and organizing the extra space.


These are some Apps with USSD balance check support:
Prepaid Manager

Prepaid Manager is an applet for the GNOME Desktop that allows you to check and top up the balance of GSM mobile prepaid SIM cards. It is a simple and minimalistic app with USSD balance check and topup being all that it does. But on the flip side, it is a very dated application and haven't received any new updates in a long time. And if your provider isn't supported, you'll have to manually configure it as described on their homepage. To install, click here:

Or run the following command:
sudo apt install prepaid-manager-applet

Modem Manager GUI

Modem Manager GUI is a complete solution to manage and monitor mobile network based modems. It packs quite a lot of features, and USSD support is just one of them. For a complete list of features, visit their official homepage. To install, click here:

Or run the following command:
sudo apt install modem-manager-gui

V Mobile Broadband

V Mobile Broadband is the original Vodafone Mobile Connect software for Linux rewritten to be compatible with Network Manager by Vodafone's open source Betavine Connection Manager team. Unfortunately, it doesn't seem to be very actively maintained at the moment and isn't available in Ubuntu repos. However, you may try your luck building the project from source. Check out their GitHub page.
Warning: v-mobile-broadband depends on wader, which replaces Ubuntu's default modemmanager. So, if you encounter problems with the new setup and decide to uninstall v-mobile-broadband, don't forget to reinstall modemmanager package.

Sources

In Ubuntu, is there an application like “Huawei Mobile Partner” for broadband dongle modems?


How can I correctly install multiple non-package Distribute/virtualenv/pip ecosystems on Ubuntu?

virtualenvwrapper does much or all of what you're asking for.  It is very popular based on the traffic here and at stackoverflow. It has been packaged in Ubuntu since Precise / 12.04.

  virtualenvwrapper is a set of extensions to Ian Bicking’s virtualenv
  tool. The extensions include wrappers for creating and deleting
  virtual environments and otherwise managing your development workflow,
  making it easier to work on more than one project at a time without
  introducing conflicts in their dependencies.

See this answer on StackOverflow for some examples. In your case, you seem to be looking for this virtualenvwrapper command: mkvirtualenv --python=PYTHON_EXE (makes a virtualenv with a specific Python executable).

Finally, there is a coordinated effort to review and update Python packaging in general and taking platform-specific use cases into account, so you may want to consider following progress in the Python Packaging User Guide.


edit /etc/sysctl.conf and uncomment:

# net.ipv4.ip_forward=1

And the iptables part should look something like below, where eth0 is internet and eth1 is LAN:

iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

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

iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT

If you have 2 physical network interfaces in server then it should work, you cant use your server as internet gateway if it only has 1 physical interface


Casting VLC to chromecast result in black screen with only the title of the file displayed on TV

It works, just open the port VLC is using. Default is 8010, see

  Tools -> Preferences -> Show all settings (checkbox down left) -> Stream output -> Stout stream -> Chromecast -> HTTP port

To open the port

with ufw use:

sudo ufw allow 8010

with iptables use:

sudo iptables -I INPUT 1 -i eth0 -p tcp --dport 8010 -j ACCEPT

Tested on Ubuntu 19.04 and VLC 3.0.7.


Ubuntu 17.10 fresh install, nvidial drivers causing boot loop

I got stuck in the bootloop too. (Ubuntu 17.10 after installing Nvidia Driver)

I think I tried all of the available suggestions but none of them worked.
I didn't recognize at the beginning that I was asked to disable SecureBoot while the installation of the driver. (Check if SecureBoot is enabled on your device)

I had to disable SecureBoot in my UEFI. After I had done this everything worked fine. I hope this helps you or someone else.


Why can I not run an application installed using sudo without sudo?

There are lots of programs that will sill be in your path that won't work for normal users.  An example is adduser.  So it would depend on the program that you want to run.

I don't know what the KeePassX 0.4.4 program does, but it would be up to the developers of whether to make the program available to normal users or to require the elevated command to run.

As far as compiling, which it appears that you did that correctly, you should build and compile the programs as a normal user.  Only run the make install part with the elevated command.  This way the program becomes install system-wide.

You shouldn't have go into the system to make any changes.  If you change the files you might actually break the application.

Some programs needs to be run as root so that they will have access to certain files that normal users can't access, such as using the command to change your password, which also edits the /etc/passwd and the /etc/shadow files.  Program such as those have the suid bit set so that it will run as root even when called by a normal user.

You wouldn't want to change the permissions of your /etc/passwd and /etc/shadow files so that you can edit them as a normal user, or so that the passwd command will work without the suid bit set.

So it would depend on which programs that you are installing and the intent of the program provider.

If the program needs root access, the make install should set the suid bit.  If it isn't intended to work as root and intended to work by for a normal user, the program or install is broke and should be addressed to the developer so they could fix it.

You might find notes in the Readme of the program to fix the bugs, which would be in this case, if make install is failing and causing you to have to go in and fix it.


Do I need to re-purchase software in the Ubuntu Software Centre if I reinstall?

No, you don't need to purchase it again.

If you want to install your previous purchages after reinstalling Ubuntu, just click on the File -> Reinstall Previous Purchases menu item in Software Center.


Does clonezilla format the destination HDD?

Clonezilla has many modes of operation. What you probably want to do is to copy a disk or partion to an image. In that case it will not format the destination disk.

It can also copy a disk to another disk. Then it will destroy the content of the destination disk. It will warn you before...


I read I could just delete the partition which I was about to do through windows 8's Disk managment,

Go ahead. Mind though it will remove anything from disk. In case you need to save something use the Ubuntu installation disk to save it. By the way: there is not need to remove it from Windows. You will be prompted to replace a current Ubuntu installation during the setup.

  but also read it removes grub which I need to boot my PC

No you do not. If there is just Windows on it you do not need it. Plus when removing your Ubuntu installation and installing a new version it will also install Grub.

  How can I remove Ubuntu without having to worry about this?

You assume there is something to worry about ;) Mind though: when messing with partitions make sure if there is anything important on that machine to make a backup even if you do not intend to mess with the partition that important stuff is on (like the Windows partition).


Remote access(headless) ubuntu desktop in first boot

@Terrance's comment is spot on. Follow the instructions at https://ubuntu.com/tutorials/how-to-install-ubuntu-on-your-raspberry-pi for installing the server.
On step 5 (Install a desktop), I elected to use the regular desktop instead of one of the lightweight ones, so I just ran sudo apt install xubuntu-desktop. So far, the Raspberry Pi 4 seems up to the task.
I could not get VNC working, so I instead installed xrdp and used a Remote Desktop client to connect to it. When I connected, it wanted me to finish some setup tasks, and that might be why it was being difficult with VNC.


It's Ctrl+Shift+u all together, and an underline will appear under the u, then you type the hexadecimal value for the Unicode character, and then press Space or Enter to confirm it.


ata* problem! also dvd rom is not detected

This is probably the ata controller on the motherboard. Is everything also running really slow?

It is worth booting on a live USB and seeing if the errors are still coming in. I had the same issue, I got the errors even with no HDDs plugged in.

ata3 is probably the DVD drive. If you physically remove the DVD drive do the issues stop? This doesn't solve getting your DVD drive running, but should make the rest of your computer run better.


Edit: as zanna suggests, if you've done something to your ~/.bashrc file, undo whatever you did.

I used the locate command to find konsole-related files in my home folder.

$ locate konsole | grep -i home | grep -v cache
/home/dkb/.config/konsole.notifyrc
/home/dkb/.config/konsolerc
/home/dkb/.local/share/konsole
/home/dkb/.local/share/konsole/Breeze.colorscheme
/home/dkb/.local/share/konsole/Linux.colorscheme
/home/dkb/.local/share/konsole/Profile 1.profile
/home/dkb/.local/share/konsole/Solarized.colorscheme
/home/dkb/.local/share/konsole/bookmarks.xml
/home/dkb/.local/share/kxmlgui5/konsole
/home/dkb/.local/share/kxmlgui5/konsole/konsoleui.rc
/home/dkb/.local/share/kxmlgui5/konsole/sessionui.rc
$

There are three candidates:

/home/dkb/.config/konsolerc
/home/dkb/.local/share/konsole/ and
/home/dkb/.local/share/kxmlgui5/konsole/

Ensure that konsole isn't running. pgrep konsole should come up blank. Then, using Dolphin, carefully rename konsolerc to something else and do the same for the two konsole folders.

Now, when you open konsole, it will recreate the contents of whatever you've renamed and that should fix things. I can't be more specific because I haven't had something similar happen to me.


ifconfig is and old command, that is still widely used, but if you are starting with network-related commands, you should use ip tool.
ip a, which is abbreviation for ip addr is what you are looking for in this particular case.

Check ip out, it really is better than ifconfig in most cases.


rPress Ctrl-Alt-F3 and log in.

Now type:

sudo dpkg -l '*fglrx*'

If that doesn't work you might try reconfiguring everything:

sudo dpkg-reconfigure -a

If that doesn't work then try removing the drivers with

sudo dpkg -r '*fglrx*'


Have `zip` utility only echo if a file was added or actually changed

What you probably want is to update the zip file:

  update (-u): Update existing entries if newer on the file system and add new files.  If the archive does not exist issue warning then create a new archive.

Therefore, you should try

zip -ru "Dest.zip" ./Source


You can read user input in bash the following way:

read -p "Input this: " this
read -p "Input that: " that
sudo add-apt-repository ppa:${this}/${that}

read command creates a variable with its value taken from standard input.

In real life scenario you should also sanitize user input (i.e. check for non-alphanumeric characters before calling the command), but you can skip it if it's just for you.


MySql Not starting even when status is ok ubuntu lampp

Run this:

$ sudo apt-get install apache2 mysql-server mysql-client php5 phpmyadmin
$ sudo apt-get update
$ sudo apt-get upgrade

This should complete the partial install of the components you need.  It should also upgrade the installed components.


There are several models, but yes, that's more than strong enough. Ubuntu Server is much more light-weight than an Ubuntu Desktop, since that's mostly what Ubuntu Server is – Ubuntu without a desktop. For a server like the one you describe, you could easily run Ubuntu desktop as well, and just add the services you want. At least the 4GB version.

Remember; Ubuntu is Ubuntu. There's nothing Ubuntu Server can do that Ubuntu Desktop can't and vice versa.


Lubuntu 20.04 cannot execute .sh script from PCManFM-Qt

The system has to know what type of script it is.  That is done via the use of a "shebang"
For a simple bash script you can use
#!/bin/bash
echo blah
sleep 4

It worked for you in bash (terminal) as your bash terminal made an assumption you were trying to run a bash script. pcmanfm-qt cannot really make that assumption, so the shebang tells the system what type of script it is.
(You already had the executable flag correct that was also required)


Where was the discussion on making Unity the default?

There was no public discussion. (Yes there were sessions on Unity at UDS, but these were about the path forward for Unity, not about whether it should be default or not.)

Making Unity was a decision made by Canonical on behalf of the Ubuntu community. It was announced in the first session at UDS by Mark Shuttleworth. As far as I'm aware this was the first time the idea was announced (although there were blueprints on Launchpad prior to the announcement that suggested it was a possibility).

All members of the Ubuntu Technical Board are Canonical employees (at least they all have @canonical.com emails) and I am sure they were all involved in the decision to use Unity.

Some things I think we should appreciate: it would have been very difficult for the community alone to make a unanimous balanced decision about the best way forward. This is especially true given Canonical's planned improvements to Unity in the next six months. Canonical was able to conduct usability testing, etc and also talk to OEMs (e.g. Dell) about the impact of the switch.

This being said, it can certainly be argued that the roles of the Ubuntu technical board, other Ubuntu teams and Canonical could made clearer.


PHP and Apache2 broken after upgrade to Ubuntu 16.04

Ubuntu 16.04 comes with PHP 7.0.  You need to install libapache2-mod-php package and then disable all traces of PHP5.

Uninstall PHP5.x package: sudo apt-get purge php5-common (this will remove all PHP 5 packages.
Install default (7.0) PHP apache2 SAPI: sudo apt-get install libapache2-mod-php
If the apache2 is still broken do: sudo rm /etc/apache2/mods-enabled/php5.* to disable PHP5 mod and enable PHP 7.0 with sudo a2enmod php7.0.


Not Shutting Down Ubuntu 16.04 In HP Laptop

Did you try some of these solutions: Ubuntu 16 reboots seconds after shutdown ?

I also have HP as well as the same problems as you after installing 16.04, and disabling WiFi solved the situation. Temporary at least.


for me the trick was to simply increase the blocksize:

badblocks -b 4096 -v /dev/sda


How do I disable automatic remote printer installation?

I just discovered a, possibly optimal, solution to this mess. There is as service called "cups-browsed" which apparently is responsible for going out on the network and finding all the printers it can locate and install them for you (gee - thanks --NOT). Since this is an Upstart/Systemd job, you can stop the service with:

For Ubuntu versions 15.04+ (using systemd)

sudo systemctl stop cups-browsed

Followed by:

sudo systemctl disable cups-browsed

You may still start/stop the service manually if you wish with:

sudo systemctl start cups-browsed
sudo systemctl stop cups-browsed

For Ubuntu versions prior to 15.04 (using upstart)

sudo service cups-browsed stop

Even better, you can prevent the service from ever starting again by adding a simple text file to /etc/init that contains the single word manual. The file must be named
cups-browsed.override

So, just start up gedit with

gksudo gedit /etc/init/cups-browsed.override

put manual in the first and only line and save the file.

On the next Reboot, the service will not be re-started. However, you need not reboot if you've already stopped the service. Once you've placed this file in /etc/init, the service can only be started manually (if and when you need/want it) using:

sudo service cups-browsed start
-or-
sudo service cups-browsed stop`

I have tested this over one reboot. Printing still works fine and so far I am not getting several hundred printers installed anymore after the reboot. Just the ones I installed manually show up.


According to The GNU Awk Users Guide it stands for Aho, Kernighan and Weinberger.


Is Grasshopper for Rhino also running in Ubuntu?

Rhino has no Linux version. Use Blender instead.


What does Jetty do and do I need to activate it?

Jetty is an open-source project providing an HTTP server, HTTP client, and javax.servlet container.

Jetty provides a Web server and javax.servlet container, plus support for SPDY, WebSocket, OSGi, JMX, JNDI, JAAS and many other integrations. These components are open source and available for commercial use and distribution.Jetty

Activate it or change it to zero, if you plan on using it.

To uninstall, the best way that I would use, since I don't know how it was installed, is by using synaptic.  Just make sure you pay attention to what it removes.


During a chroot attempt, I got this error: "chroot: failed to run command '/bin/bash': Exec format error"

Verify that you are using the right Live CD. For example, verify you are not using a 32bit CD instead of a 64bit CD. You need a 64bit kernel to run 64bit code, so check your architecture.

Assuming you mounted your system to be chrooted in /media/sda1, to determine the architecture you can:

ls /media/sda1/*

if you see lib64 in the output, it's probably a 64bit system


How to make my Bluetooth keyboard work with Ubuntu 18.04?

This might be irrelevant to your problem as it affects keyboard only. But it will help the guys who are googling - try turning Num Lock off.


problem connecting to VM with xfreerdp: how to solve

I had the same problem connecting from a linux host to Windows 7 remote desktop. You need to delete the entry for this server from the freerdp known_hosts file. In my case, Kubuntu 18.04, the file was located here ~/.config/freerdp.


Unfortunately gnome-terminal offers no configuration option to disable these. You might want to recompile it, removing the entries from url_regex_patterns in src/terminal-screen.c.

This hyperlink feature doesn't influence the normal text selection by mouse, you can still click and select the text. Clicking on a hyperlink to bring the window forward shouldn't have any undesired side effect. (The feature influences the rarely used rectangular selection (Ctrl+Click becomes "open link" instead), and populates the right-click menu with extra entries.)

Of course, I understand that underlining the text and changing the mouse pointer shape on hover is visually unpleasant when you have many false matches, but I don't see how it causes an actual behavioral problem.

Update:

gnome-terminal version 3.18.3 reimplements the matcher regular expressions from scratch, in a way that leads to much fewer false positives than in preceding versions. E.g. "react@0.13.3" is no longer treated as a valid e-mail address.


Add Ubuntu ISO as Boot Option via `efibootmgr`

Not sure how MacBook works with EFI, but EFI can only boot only specific executable files on EFI partition without parameters. It can not boot from ISO files. Here is the way to use grub to run Ubuntu from ISO files:

Create a 10GB rescue partition.
Format it as ext4. Label and enter name "rescue".
Create the grub.cfg file in Linux

$HOME/grub.cfg:

menuentry "Rescue Ubuntu 18.04 LiveCD"
{
  set isoname="/ubuntu-18.04.3-desktop-amd64.iso"
  search --label --set rescue rescue
  loopback loop ($rescue)$isoname
  linux (loop)/casper/vmlinuz boot=casper iso-scan/filename=$isoname quiet splash
  initrd (loop)/casper/initrd
}

Create a standalone grubx64.efi with memdisk and the needed modules

Creates binary with modules and grub.cfg embedded:

grub-mkstandalone --modules="minicmd normal search search_fs_file search_fs_uuid search_label ext2 echo cat ls disk part_gpt part_msdos" \
-o grubx64.efi \
-O x86_64-efi --compress=xz \
"/boot/grub/grub.cfg=$HOME/grub.cfg"

Create an entry in the EFI boot manager and place grubx64.efi inside the new entry. Add all other files EFI expects (BOOTX64.CSV, shimx64.efi, mmx64.efi).


def on_button1_clicked(self, widget):
        print "No Selected"
        subprocess.call('no-tour', shell=True)

There was an issue with the indentation with this code. The def line had to be in the same line as the def finish_initializing.


Easytether not showing in network manager, ubuntu 16.04

Yea got use nano or some other text editor under did to edit the file just add that line....the rest is done by machine or code...

https://s3.amazonaws.com/easytether/android_faq.html#linuxsetup


Follow the steps:

sudo apt-get install rcconf
sudo rcconf

Search for

ondemand

option and disable(un-check the check-box) it using space-bar.


do an ls -l of /boot and see what images you have.  run apt-get purge to remove the old pkgs, e.g., if I have .38 and .37 kernels, remove the .37 version:

russell@ff:~$ ll /boot
total 60913
<snip>
-rw-r--r--  1 root root 20255298 Oct 20 16:16 initrd.img-3.13.0-37-generic
-rw-r--r--  1 root root 20253276 Nov  6 19:50 initrd.img-3.13.0-38-generic
<snip>

Then remove the .37 version prefacing with 'linux-image-'

sudo apt-get purge linux-image-3.13.0-37-generic


Can I record playback with audacity without Pulseaudio?

This depends highly on your sound card. To do so without some kind of software intervention would require a "full duplex" sound card.

Basically look in ALSA Mixer (alsamixer) and hit [Tab] till your on the "capture" page. Then if you have the option to select either "Monitor" or "PCM" choose that and you should be capturing your output.

Many, many computers do not have full duplex cards, in addition the channels may be named something else.

There are some options, if you do not have a full duplex card. This site should get you started, but recording the playing sound, generally requires a better then average sound card.


Quote from the HPLIP website:

  This printer REQUIRES a downloadable driver plug-in. Use hp-setup to install the printer, and to download and install the plug-in. In general, required driver plugins are required for printing support. Driver plug-ins are released under a proprietary (non-open) license and are not part of the HPLIP tarball release.
  Blockquote

That means you have to download and install a proprietary Plugin from HP. Fortunately there is a tool that makes this easy.
Press alt+F2 and type in hp-setup, then press Enter. That is a tool that you can use to install that printer.

If you get "failed to install plugin" try typing "gksudo hp-setup" instead.

You can find more info about your printer here: http://hplipopensource.com/hplip-web/models/color_laserjet/hp_laserjet_100_colormfp_m175b.html


What to select to back up from my system

Two cautions:  1) Even as the author of Deja Dup, I still advocate simply copying files for one-off backups like this.  Deja Dup's usefullness is really for long term scheduled backups.

2) Deja Dup is geared more towards user data backups than system level backups.  That said, it should work.  It just has some warts like not being able to read some root-owned files as your regular user (which is normal, but DD won't prompt for permissions, it will just skip it and tell you it missed the file).

OK.  With those caveats, I would say just put / in your included folders list.  Deja Dup automatically skips common folders like /proc that shouldn't be backed up (unless you tell it explicitly to include it as you did).  See the help documentation for a full list of automatically excluded folders


Ubuntu Can`t Boot After Failing To Install

Here are my observations:

Your EFI System Partition (ESP) is small -- 94 MiB. In theory, this should be OK, but in practice, it might not be, particularly with an older (early 2010s) computer -- some early EFIs have somewhat flaky FAT drivers that don't cope well with sub-512 MiB FAT filesystems. Thus, you could try increasing the size of your ESP. I recommend 550 MiB because that's enough above various limits to avoid problems that can occur if you try creating something that's exactly 512 MiB.
There's no evidence of a boot loader installed on the ESP. This could be a bug in Boot Repair, but given the errors you describe, it's probably the case that there really is no boot loader there. Unfortunately, there's no clue in what you've reported about why the boot loader could not be installed; all I can do is speculate about flaky FAT drivers.
A less radical solution is to install another EFI boot loader. Most of these are at least a little tricky to install manually, but you could install my own rEFInd without too much difficulty:

Download the USB flash drive or CD-R version of rEFInd from the links on its downloads page.
Prepare a boot medium from the file you download.
Boot with the rEFInd medium. With luck, it will a boot option for Ubuntu, which I expect is installed except for GRUB.
Boot Ubuntu.
Install rEFInd using the Debian package or PPA.
Reboot. If it works, great. If not, perhaps the rEFInd installation will have at least produced a more helpful error message.


File copy freezing with large network copies

To me it sounds like a case for rsync; there you can just resume the copy process in case it hangs or you have to reboot inbetween or whatever causes interruption.

rsync -avz -r --stats --progress --perms --links /windows/files/ /home/user/migrated/

The copy process itself is a bit slower, one should mention.

Further examples: http://rsync.samba.org/examples.html


How to show a running clock in terminal before the command prompt

I'm not sure that is so simple to achieve this using the default bash shell (but I'm not saying that it's impossible). You will probably need a command/function which is able to refresh the command prompt every second without interfering with anything you type on the prompt.

The Z shell (zsh) has a built-in command, called zle, which, when used with the reset-prompt argument, forces the prompt to be re-expanded, then redisplays the edit  buffer.

If you want to try it, use the following steps:

Install Z shell with this command:

sudo apt-get install zsh

When you run zsh for the first time, choose 0 when you are asked.
Edit the ~/.zshrc file and add the following lines:

setopt PROMPT_SUBST
PROMPT='%B%F{red}%n@%m%f%F{yellow}[%D{%L:%M:%S}]%f:%F{blue}${${(%):-%~}}%f$ %b'
TMOUT=1

TRAPALRM() {
    zle reset-prompt
}

Save the file and close it.
In your terminal, when you are still using zsh, run source ~/.zshrc, or simply zsh, to reset your prompt. Now your prompt should look like:

saurav@saurav-P4I45Gx-PE[1:25:21]:~$

with some colors.
If you like it, run chsh -s /bin/zsh to change your current shell to /bin/zsh (a re-login  is required for this change to take effect).
Run exit if you want to exit from zsh shell.

Here is a 15 second screencast from my terminal:


Ubuntu gnome 15.10 Compizconfig PROBLEM!

Gnome does not support such desktop effects. If you are looking for a Linux OS with those desktop effects, go for Kubuntu, it contains the KDE Plasma 5 desktop, and it supports/contains those features you seek.


How do I add SSH Keys to authorized_keys file?

You should never save the file with its contents starting with -----BEGIN RSA PRIVATE KEY----- on the server, that is your private key. Instead, you must put the public key into the ~/.ssh/authorized_keys file.

This public key has the .pub extension when generated using ssh-keygen and its contents begin with ssh-rsa AAAAB3. (The binary format is described in the answers to this question).

The permissions of ~/.ssh on the server should be 700. The file ~/.ssh/authorized_keys (on the server) is supposed to have a mode of 600. The permissions of the (private) key on the client-side should be 600.

If the private key was not protected with a password, and you put it on the server, I recommend you to generate a new one:

ssh-keygen -t rsa

You can skip this if you're fully sure that nobody can recover the deleted private key from the server.

If this does not help, run ssh with options for more verbosity:

ssh -vvv user@example.com

On the server side, you can review /var/log/auth.log for details.


This is a very broad question so I am going to give you a broad answer;

The internet is your answer. We can't tell you what you need to know. You need to figure out what you want to know and try to find the answer online or ask it here. if you want to know how 'X' communicates with 'Y'. I would say; google it!. "how does X communicate with Y?"

Some keywords I found interesting things on are; Ubuntu tutorials, everything you need to know about ubuntu, becoming in expert in ubuntu. There is also many useful content on youtube. Other websites you can take a look at; Udemy, Skillshare, Coursera and Udacity.

You can also take a look at the answer from @N0rbert in this topic


What might cause a laptop to suddenly turn itself off while running Ubuntu, but not while running Windows?

I answered a similar question to this some time ago as follows:

"I had the same problem with an Acer Aspire 5315 which was given to me to mend. The answer is to download the latest BIOS from Acer and flash it. The issue arises as several (maybe all) Acer models use the Acer installed software to manage the fan. If that software is removed either because the user doesn't want it, to update Windows, or as I did, to install Ubuntu, then the fan will not work correctly. It may start when the laptop is booted up but if the machine hibernates, sleeps etc then the fan will not restart causing overheating and cut-off. It seems that Acer acknowledged this some time ago and used a BIOS upgrade to correct the problem. I did this with my machine and now have had no problem for 3 weeks (as opposed to cutting-out every few minutes before)."

Months down the line the laptop is working fine so the upgraded BIOS did the trick.


Can't install 12.10 on a separate partition in a PC with Windows 7

one work around:

Take the backup of you data available in 500 GB partition on some external drive. Create a new partition in windows in 500GB drive using windows partition manager. Make a 100GB new partition for ubuntu and install ubuntu on that. copy back your data to the remaining 400GB partition.


How to run Windows Skype on Ubuntu using Wine?

Skype for Windows on Wine using PlayOnLinux

To get the best result for running Skype for Windows on Linux using Wine, follow these steps. (Tested using Ubuntu 15.10, but it should work fine for earlier versions)

tl;dr

Skype version 6.21.32.104: link.
Wine version 1.9.1 acting as Windows 8.1 32bit.
Add /legacylogin /username:USERNAME /password:PASSWORD as arguments to skype.exe.
Run export PULSE_LATENCY_MSEC=60 before running Wine.

1. Install PlayOnLinux

To get PlayOnLinux from the repositories:

sudo apt install playonlinux

It might be necessary to download and install the latest PlayOnLinux from their website if you are using Ubuntu < 15.10.

2. Add newest version of Wine to PlayOnLinux

Start PlayOnLinux.
Click Tools > Manage Wine Versions
Select version 1.9.1 from the left and click the > button to add it to PlayOnLinux.

(1.9.1 was the newest Wine version upon writing this answer, you can try next versions for better result)

3. Download Skype 6.21.32.104 installer

Download Skype version 6.21.32.104. I cannot seem to find an official link for this. You can download it from this unofficial link. Put a comment if the link doesn't work anymore or if you find an official link.

Older versions of Skype are not supported anymore, they will fail to login. 7. version do not seem to work correctly in Wine.*

4. Install using PlayOnLinux

Start PlayOnLinux
Click 'Install a program' and then 'install a non-listed program' in the bottom left corner.
Choose 'Install a program in a new virtual drive'. Name the drive something like 'skype6.21.32.104'.
Check 'use another version of Wine' and 'Configure Wine'. And click next.
Select Wine 1.9.1 and click next.
Select 32-bits windows installation and click next.
The Wine configuration Window appears after a few seconds. At the bottom of the Window, select Windows 8.1 and click 'ok'.
Back to the PlayOnLinux window: click 'Browse' and select the Skype installer you just downloaded. Click next.
Follow the Skype installer.
Select Skype.exe and click next to create a shortcut. Give the shortcut a name and click next again to finish the installation.
Click the Skype icon in the main PlayOnLinux window and click configure. In the general tab, add following to the Arguments field. Click another field so the arguments field is saved. (replace USERNAME and PASSWORD with your credentials).

/legacylogin /username:USERNAME /password:PASSWORD
Go to the tab 'Miscellaneous' and add export PULSE_LATENCY_MSEC=60 to "Command to exec before running the program"

Main source: Skype on WineHQ

Now you can run Skype from Playonlinux.


Something was wrong with the sources in /etc/apt/sources.list.  Replacing them with the sample list from http://ubuntuguide.org/wiki/Ubuntu_Trusty_Packages_and_Repositories and updating again fixed the issue.


I don't think it will work for you.

If example.com wants to use ns1.example.com as one of its nameservers of record (for others to use for lookups to find www.example.com, etc) then the registrar for the domain (godaddy, google, network solutions, whoever) needs to add what are called "glue records" so that a domain can reference itself.  With an IP that changes on a fairly regular basis, this won't work.

Even if you had say a linode or other VPS, you couldn't run a master from your home connection in a secure way - domain transfers are typically locked down by what IP is allowed to pull a copy - so you'd have to update your DNS config in order to update your records.

What would work is what you said you don't want to do - use noip or some other dynamic dns service.  You could do that, and then set up CNAME records for your "real" domain that point to your noip hostname which would be kept in synch with your IP address.

Personally, between power issues, extra heat, extra noise, etc. I moved my server from my home to a linode.com account 12 years ago and haven't looked back, and that is what I'd recommend that you do as well...


Remove online status menu, but keep the logout menu?

Open the "Ubuntu Software Center" (under the Applications menu).  Search for "indicator-me" and remove it.  Log out and back in to see the change.

This will remove it for all users on your system.  I don't believe there's a way to merely hide it for yourself.


Is there an email package that has a easy to use GUI?

There's a bunch.  I would start here:

http://www.postfix.org/addon.html

under: Run/Configuration/Queue/User management


Accessing mtp/ptp device from python script, permission denied

Turns out this is desired behavior: MTP and PTP implementations are designed to retain singular filesystem handling capabilities in the hands of the connected device with the connected device and the computer being in a server-client hierarchy, the connected device being the server. Although protocol definitions are not easily available there seems to be a handshake of the following form
Receive:

physically connect device
open storage memory
device performs a directory traversal and provides tree and file lists to computer
computer sends a file download request
device sends a copy of the requested file
a list of files is forwarded and the connection is closed while waiting for a response.

Send:

a file transfer request is sent
the Android device accepts it
device receives file in a buffer and actively integrates it into its own fs tree in the desired location.

This makes direct access to file properties like exif meta data and cdate/ mdate attributes, as you would intuitively expect from a ftp-like connection or a true usb mass storage, impossible and explains the failure to change the fs permissions on the remote device.
tl;dr It's a feature not a bug. Wontfix.


On my opinion this is the wrong approach, your Kernel needs to run two file system drivers (ext4 and ntfs3g) to store and read data and write access with ntfs3g is still somewhat not trusted. I used NTFS on my Ubuntu machine for a long time now and already once had issues with data loss, so please use this with much care for sensible data. Also access to this partition should be somewhat slow.

The "correct" way is to shrink the size of the NTFS-partition and create a real ext4-partition in the generated free space.


Nautilus and Terminal icons not displaying on metacity desktop

Following muktupavels request to show the content, the problem was the content of

org.gnome.Nautilus.desktop
gnome-terminal.desktop

contained a line OnlyShowIn=Unity; when this line is commented out, the icons display correctly on the metacity desktop.


Yes it is possible. You may want to backup your data and possibly have a copy on Ubuntu also. For detailed information go to This Ubuntu Wiki Page or This Ask Ubuntu Pageto help walk you through the process.


14.04 is the base version. 14.04.5 is the latest of 5 incremental updates to 14.04. It includes newer packages (maybe a newer kernel), but that's about it. 14.04.1-5 are there so that people can install 14.04 with the updates pre-packaged, so fewer updates are needed post-install.

So, yes, 14.04 and 14.04.5 are the same, because 14.04.5 is 14.04. It just has updated packages that those using the first release of 14.04 would have to install.


Computer boots into GNU GRUB 2.04. Need help booting Ubuntu installer from commandline

Using dd, I formatted the USB Flash Drive and installed the ISO image of the latest Ubuntu release. This managed to fix the issue I was having with the Laptop not booting.


On a desktop, I'd be more inclined to look at controlling the CPU fan speed in the BIOS rather than through the OS. From what you've written, it looks like your Motherboard doesn't support software control of the CPU fan anyway. In most Bios setups, there is an option to change the heat to speed ratio of the fan, that would be my first port of call if you have a hot or noisy cpu/fan.


I run a dual-boot on a couple machines. Once in a while, Windows 10 will decide to override my BIOS settings and will change the default boot from 'ubuntu' to 'Windows'.

Once you go into the BIOS (in Windows, hold SHIFT when pressing the Restart button. It will bring you to your boot prompt settings. Go to Troubleshoot > Advanced > UEFI Firmware), you can check to make sure SecureBoot is off, and under BOOT that 'ubuntu' is the first boot option.

This will get the GRUB boot screen to show when booting. There you can chose Windows or Ubuntu (default).

UPDATE:
Taken from this post:

  After reboot, I needed to go back into the bios, re-enable Secure
  Boot, then under the Secure Boot specific menu option, chose the "Add
  a trusted boot option" or similar (I will try to take a photo of this
  in the bios later). Navigate to the EFI/ubuntu/ folder, then choose
  either the shimx64 or grubx64 depending on if you have Secure Boot
  enabled or disabled respectively. Give the boot option a label, then
  go back to the boot options tab, and it should now appear in the list.
  After highlighting it use F6 to bring it up to the top (or at least
  above Windows Boot Manager). Now save the changes and reboot once
  more. This should drop you into the Ubuntu Grub boot options.


You can do so by disabling the upstart jobs for bluetooth and bluetooth-touch:

echo manual | sudo tee /etc/init/bluetooth.override
echo manual | sudo tee /etc/init/bluetooth-touch.override

The bluetooth job controls BlueZ, which is the daemon used to establish bluetooth connections, and the bluetooth-touch job controls the programs that enable the bluetooth device on bootup on the phone, based on the model of the device.


My Hard Disk Drive is not visible until I use it

When you have the system set to automatically mount drives when opened, as you do, then when you access it with the file manager, it gets mounted at /media/name, where name is either the label or number.  You can see the path in Nautilus by pressing Ctrl-L, which will expose the full path in the Location bar above the file listing (you can type in this bar, which is handy).

If you want a partition to be available all the time, you can manually mount it or have it mounted automatically by making an entry in a configuration file /etc/fstab.  It seems complicated at first, but after you've done it a few times, it starts becoming easy.  Being NTFS makes it slightly harder due to the way permissions are handled, but the way I do it is thusly:

In a terminal, enter the following command (informational, makes no changes):

sudo blkid -c /dev/null

This will list all the partitions, along with the labels, UUIDs, and type.  This is all the information you need to mount the partition.

You will need to find the partition(s) you wish to mount from the list.  The windows partition will be listed with TYPE="ntfs".

To make it automatically mount on startup, you will want to first decide on where to mount it. This depends on whether your system is only used by you, or shared.  If it's only used by you, the easiest way is to create an empty folder in your home directory, using whatever name you want, such as "windows".  Then, edit the file /etc/fstab, using sudo.  If you use gedit, enter sudo gedit /etc/fstab in the terminal.

Skip to the bottom and add a single line like this (assuming your username = username, and the UUID is 012345678987654321 for the example):

UUID=012345678987654321  /home/username/windows  ntfs auto,users,uid=username,gid=username,utf8,dmask=002,fmask=113  0  0

To test it out, you can manually enter a command to mount everything in fstab:

sudo mount -a

What this does is try to mount all lines listed in fstab; if there is a problem, it will tell you right away, and you can either figure it out on your own, or ask back here.

If it works, you will see your windows partition in your home directory.

If you want to mount it in the /media folder, you'll need to do a bit more work, as you will need to set the permissions for the folder which belongs normally to root.


How can I make running emacsclient from the unity launcher reuse an existing emacs window

The solution is to create an emacsclient.desktop file including a directive to it the class of the window using the StartupWMClass settings.  Without it, Unity can't tell that that window came from Emacsclient.  This will create one based on the contents of the Emacs one (/usr/share/applications/emacs23.desktop):

mkdir -p ~/.local/share/applications
cat > !$/emacsclient.desktop <<EOF
[Desktop Entry]
Version=1.0
Name=Emacsclient
GenericName=Text Editor
Comment=View and edit files
MimeType=text/english;text/plain;text/x-makefile;text/x-c++hdr;text/x-c++src;text/x-chdr;text/x-csrc;text/x-java;text/x-moc;text/x-pascal;text/x-tcl;text/x-tex;application/x-shellscript;text/x-c;text/x-c++;
Exec=/usr/bin/emacsclient -c %F
Icon=/usr/share/icons/hicolor/scalable/apps/emacs23.svg
Type=Application
Terminal=false
Categories=Utility;Development;TextEditor;
StartupWMClass=Emacs
EOF

Place the emacsclient in the launcher (e.g. tap Super, type "emacsclient", drag it on), and log out/in.


Where is ccsm found on my application menu?

ccsm (or compizconfig-settings-manager) isn't installed by default in Natty (11.04).

To install it, run the following from a terminal

sudo apt-get install compizconfig-settings-manager

Once's that's done, it's ccsm from a terminal and CompizConfig Settings Manager in the menu (System → Preferences if you're not using Unity yet)

Warning: What are some of the issues with CCSM and why would I want to avoid it?


APT ERROR (since installing multiscan:i386) : subprocess installed post-installation script gave the error value 1

I did it:

me@LINUX:~$ sudo rm /var/lib/dpkg/info/multiscan.postinst -f
me@LINUX:~$ sudo rm /var/lib/dpkg/info/multiscan.md5sums -f
me@LINUX:~$ sudo rm /var/lib/dpkg/info/multiscan.list -f
me@LINUX:~$ sudo rm /var/lib/dpkg/info/multiscan.prerm -f
me@LINUX:~$ sudo dpkg --remove --force-remove-reinstreq multiscan
(Lese Datenbank ... 459694 Dateien und Verzeichnisse sind derzeit installiert.)
Entfernen von multiscan:i386 (0.8.5-1) ...


Upgraded Mythbuntu from 10.04 to 11.10 - Now no GUI display

There has been some reports of the lightdm transition not working properly for some people. Check your logs in /var/log/lightdm/

If there are errors about a unity-greeter, please remove the package 'unity-greeter' and make sure 'mythbuntu-lightdm-theme' is installed.

You may have to reconfigure automatic login too (there is no longer a GUI tool).

In summary:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get remove unity-greeter
sudo apt-get install lightdm
cd /etc/lightdm/
sudo mv lightdm.conf lightdm.conf.old
sudo nano lightdm.conf

In the lightdm.conf file put the following:

[SeatDefaults]
autologin-guest=false
autologin-user=<<your mythtv user ID, ie: superm1 or whatever>>
autologin-user-timeout=0
autologin-session=lightdm-autologin
user-session=mythbuntu
allow-guest=false


Correct. Nvidia Optimus technology works this way. Rendered by Nvidia or Intel and displayed by Intel.


Facebook videos not playing on Mozilla (but working on Youtube) - 16.04

Installing ubuntu restricted extras solved this problem for me

sudo apt-get install ubuntu-restricted-extras


How to find and download a image file of specific resolution using wget?

Go to Google Images with  a browser like Firefox.
Add a search term and click on search options.
Select exact resolution and enter your numbers.
Select an appropriate image.
Click on the image and copy the URL.
Open a terminal and enter wget COPIED_URL.

For instance the search for term »ubuntu« leads to this URL: http://virtualization.com/wp-content/uploads/2008/03/virtualization-kvm-ubuntu.png
and this image:


Why is ssh X-Forwarding of browser not working for internal IP addresses?

For some reason, when entering a x-forwarded 10...*.* IP, Firefox seems to go looking
for the server in the wrong network (the work network instead of the home network).

The proper way is to establish a ssh tunnel and use FoxyProxy so Firefox uses that tunnel.

ssh -C2qTnN -D 8080 username@remote_machine.com

FoxyProxy:

Select Manual proxy configuration
SOCKS Host: localhost Port: 8080
SOCKS v5

That also saves bandwidth and the quality is far better than the one you get using x-forwarding.


umake is actually short for ubuntu-make. To remove that run

sudo apt remove ubuntu-make

For more, see ubuntu-make - Ubuntu Wiki.


Take a look @ mp3gain which for me is even better than normalize-audio

mp3gain -r *.mp3

another useful version could be the -c which prevent to ask if you want to do the changes for many files:

mp3gain -c -r *.mp3

as said  in the man page:

mp3gain  does  not  just do peak normalization, as many normalizers do. Instead, it does some statistical analysis to determine how loud the file actually sounds to the human ear. Also, the changes
       mp3gain makes are completely lossless. There is no quality lost in the change because the program adjusts the mp3 file directly, without decoding and re-encoding.

Note: That package was removed on purpose on ubuntu 15.04.

Debian proposes the python-rgain package as replacement (The advantage is that 'replaygain' supports several file formats, namely Ogg Vorbis , Flac, WavPack and MP3. Also, it allows you to view existing Replay Gain information in any of those file types). After installing it, run replaygain.

To install python-rgain from the terminal, run the command

sudo apt-get install python-rgain

Alternatively, get the .deb file for 14.04 (the latest) from here. Install as usual. After that, you need to run sudo apt-get -f install to correct some dependencies issues.


How to kill all processes in one virtual console from another virtual console?

If you have sufficient privileges, you can use pkill with the -t switch to kill all processes on a particular terminal device e.g. to kill all processes under the Ctrl+Alt+F2 virtual terminal (whose device is /dev/tty2)

sudo pkill -t tty2

See man pkill for additional options


can i load 12.04 into a completely formatted pc via a usb stick?

You have to insert the usb with the computer off. Then turn it on and enter the BIOS as soon as possible at the start up (sometimes pressing the F8 or Esc or F12, depending on your machine, it usually tells you what key to press at the splash screen (when the mainboard/processor manufacturer logo appears). Once inside the BIOS go to the boot device priority and tell it to boot from the USB stick. In some cases the USB stick does not appear as Removable Device but appears as Hard Disk Drive, double check just in case. Save and Exit. Then your machine should boot from the USB. Once in Live Ubuntu, install the OS and choose the option to use the whole HDD (not to upgrade/use along other prior OS).


Setting Options 66 and 67 for ISC DHCP Server

I should edit dhcpd.conf file

nano -w /etc/dhcp/dhcpd.conf

and to add the following entries for activating the option 66 and 67.

#option 66
option tftp-server-name "w.x.y.z";

#option 67
option bootfile-name "test.cfg";

Then to restart the DHCP Server.

sudo service isc-dhcp-server restart


Append something to files that don't end with "]" recursively

This will add [FULL] to the names of  all .wav whose names do not end in ].wav:

find . -type f ! -name '*].wav' -exec bash -c 'mv "$1" "${1%.wav} [FULL].wav"' none {} \;

How it works

find . -type f ! -name '*].wav'

This recursively finds all regular files under the current directory, ., whose names do not end in ].wav.

-name '*].wav' would look for files whose names end in ].wav.  Since ! is negation, ! -name '*].wav' looks for all files whose names do not end in ].wav
-exec bash -c 'mv "$1" "${1%.wav} [FULL].wav"' none {} \;

This renames the files that find found.

This passes the name of the file into bash as its first argument, $1.  mv is used to rename the file.


Unable to resolve host address while installing neo4j database on ubuntu 16.04. How to solve this?

Command

host debian.neo4j.org

returns

debian.neo4j.org is an alias for outreach.neotechnology.com.
outreach.neotechnology.com has address 52.0.233.188

As temporary solution add line

52.0.233.188    debian.neo4j.org

to /etc/hosts file.

Additionally use for the debian.neo4j.org host --no-check-certificate option:

wget -O- --no-check-certificate https://debian.neo4j.org/neotechnology.gpg.key | sudo apt-key add -


It looks like a bum update. Install Synaptic package manager with sudo apt install synaptic and undo the latest software update with Is there a way to undo software updates?, then use apt-mark hold <package-name> to prevent the same update from coming back again.

To restart the Budgie top panel run the following command:

nohup budgie-panel --replace&

To reset the entire Budgie top panel back to its default settings run the following commands:

budgie-panel --replace --reset # afterwards press Enter, then press Ctrl+C
nohup budgie-panel --replace&


I think there is no definite answer to your question. Although sometimes there are regressions introduced in Linux Kernel, in general you would always be better off when you run the latest stable kernel you can get. I think this statement is true for every aspect of computing on Linux,  btrfs being no exception. But no one will tell you how much exactly it is.

What makes developers flag something as "stable" is not a single event like adding a killer feature, but rather a intuitive/statistical impression of the time trend of the severity and quantity of discovered bugs in the code.

Personally I am using almost exclusively btrfs for 3-5 machines for at least 3 years in various configurations (mixed with layers of lvm, software RAID, bcache and LUKS; I use no btrfs RAID, but I do use snapshots). For last 2 years I found no serious problems with it.


Steam says drive is not mounted with executive permissions

You need to format it with a unix filesystem instead of fat32.


Can we use the command "sed" to replace a string to another string that includes the character " / "?

The substitution operator (s/old/new/) can take any character as a delimiter:

$ echo foo | sed 's|f|g|'
goo
$ echo foo | sed 'safaga'
goo

So just use anything that isn't / and you can do what you want:

$ echo "hahahaa_the_cat_hahahaa" | sed 's|_|/|g'
hahahaa/the/cat/hahahaa

Alternatively, you can escape the / with a \ (write \/):

$ echo "hahahaa_the_cat_hahahaa" | sed 's/_/\//g'
hahahaa/the/cat/hahahaa


Configuring serial port touch screen in lubuntu 18.04

To solve the problem I followed the steps described on this link that leads to the ELO Touchscreen manufacturer driver page.
The only thing you need to discover by yourself is the the serial port on which the screen is internally connected. If not sure, you can get there by attempting starting at ttyS0, ttyS1 and so on. In my case it is ttyS1.


Bug report whilte upgrading from 12.04, is this a real problem?

Yes. It is a real problem. The bug report is here, as is the fix, which is to remove the offending file, then try again. You can remove the offending file with $ sudo rm /usr/share/doc/libdrm2/changelog.Debian.gz


Does Ubuntu rapidly decrease the lifespan of my battery?

That sounds like a poor battery from the manufacturer, not Ubuntu. Ubuntu shouldn't reduce the life of your battery that quickly- however, the lifetime of your battery is dependent on

the temperature you keep it in
number of charge cycles (complete drain and recharge)
preventing overcharge (not repeatedly taking your battery/computer off the charger for a short period, and then charging it up completely)

However, all of these factors should not destroy your battery within the period of 6 months. Because you probably bought it from a 3rd-party supplier, I question the validity/quality of the battery you purchased. I advice you contact the manufacturer for a replacement.


PyGtk: Scrolllist with Entry, can I set an Id

I found a solution. I created a custom signal that I am going to pass the id of the array.


Dosbox is configured in the config file.  The configuration file is located in /home/$USER/.dosbox/ folder:

That file should be owned by your user, so double clicking it in your file manager should open your default editor.  Open the file and scroll down to memsize= line:

Change the line to whatever memory total you want in MB, but the maximum size is 63MB.  Save the file after changing the memory size you want and launch dosbox.

Hope this helps!


How to set governors for Intel to work as old good ondemand?

For compatible processors, by default Ubuntu now uses the intel_pstate CPU frequency governor, whereas it used to use the acpi_cpufreq CPU frequncy governor.

The intel_pstate drive does not have ondemand mode, but its powersave mode should be the equivalent of the acpi_cpufreq ondemand mode. Your system should default to powersave mode about 1 minute after boot, and via the /etc/init.d/ondemand script. In the recent past, that script was not properly dealing with the intel_pstate case, but it should have been fixed for all use cases by now. Reference.

To answer your actual questions:

A.) The master min and max frequencies are stored as percentage numbers.
cat /sys/devices/system/cpu/intel_pstate/min_perf_pct
cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
The interpretation of those numbers is a function of the turbo enabled or disabled flag, and in my opinion there is an inconsistency in the definitions.
cat /sys/devices/system/cpu/intel_pstate/no_turbo

Example from my i7-2600K: min freq 1.6GHz; max non-turbo 3.4GHz; max turbo 3.8GHz.
Therefore as percentages:
Turbo off: max = 100%, min = 47.1%
Turbo on: max = 100%, min = 42.1%

$ cat /sys/devices/system/cpu/intel_pstate/no_turbo
0
$ cat /sys/devices/system/cpu/intel_pstate/min_perf_pct
42
$ cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
100

and

$ cat /sys/devices/system/cpu/intel_pstate/no_turbo
1
$ cat /sys/devices/system/cpu/intel_pstate/max_perf_pct
100
$ cat /sys/devices/system/cpu/intel_pstate/min_perf_pct
42

B.) The intel-pstate powersave mode should be the equivalent of the acpi-cpufreq ondemand mode.

C.) There is something wrong, resulting in your grief. There have been other reports similar to yours. Myself, I do not know the root issue, but there have also been reports of incompatibilities with cpufrequtils. I do not know if they are true or not, as I don't use any such things. I only use the most primitive level of controls with the intel-pstate driver.


What you could try:

unload the driver and reload it with different antenna settings: https://unix.stackexchange.com/a/412761 or https://bbs.archlinux.org/viewtopic.php?id=237619 posting 23

sudo modpobe -rv rtl8xxxu && sudo modprobe -v rtl8xxxu ant_sel=1or
sudo modpobe -rv rtl8xxxu && sudo modprobe -v rtl8xxxu ant_sel=2or
sudo modpobe -rv rtl8xxxu && sudo modprobe -v rtl8xxxu ant_sel=0or

unload the driver and load a different one: https://www.linuxquestions.org/questions/linux-networking-3/drivers-installed-wifi-card-still-uses-the-generic-rtl8xxxu-4175622767/#post5813975

sudo modprobe -rv rtl8xxxu && sudo modprobe -v rtl8723au

one last option could be to install and compile a driver from here https://github.com/lwfinger/rtl8723bu


I suppose the reason might be that it's more difficult to sync files on removable devices. How should Ubuntu One react when you disconnect the device? If you remove a file, then Ubuntu One will delete it from all your devices and from your online storage. This could be overcome for removable devices, of course, but it is a special case and I don't think it has high priority.

I don't know how Ubuntu One decides not to sync files outside your home directory. It may be possible to mount the partition in your home. But it is also possible that if you unmount it, Ubuntu One will delete those files from synced devices. So be cautious if you try this.


What is the best way to deal with default Windows partitions when dual booting 16.04 on fresh Windows 10 install?

You can have a maximum of 4 primary partitions, but you can have more extended partitions.  See the following web page for more info

http://www.disk-partition.com/resource/disk-partition-basic-understanding.html


Adjust volume above 100% for specific application

Open the application you want to set with high volume.

Then go to Settings-->Sound (the very same page you show above) and select the tab Applications. Only applications that have recently played sounds will show up. Select your desired volume and enjoy.


Chrome UI styles are not working under Ubuntu! GTK Theme is not working!

I ran into this problem and it turns out it was a result of running a 32-bit version of Chrome on my 64-bit version of Ubuntu. Once I realized the mistake, I reinstalled and the issue went away.


How to change gedit preferences from terminal?

I'm not much of a gedit person but you could configure it to your liking and then check the settings by running:

% gsettings list-recursively | grep gedit | head -10
org.gnome.gedit.state.file-filter filter-id 0
org.gnome.gedit.state.history-entry search-for-entry ['']
org.gnome.gedit.state.history-entry replace-with-entry ['']
org.gnome.gedit.state.window size (1280, 473)
org.gnome.gedit.state.window state 128
org.gnome.gedit.state.window bottom-panel-active-page 0
org.gnome.gedit.state.window bottom-panel-size 140
org.gnome.gedit.state.window side-panel-active-page 228660812
org.gnome.gedit.state.window side-panel-size 200
org.gnome.gedit.plugins active-plugins ['filebrowser', 'modelines', 'docinfo', 'spell', 'zeitgeistplugin', 'time']

Let's say you want to customise the org.gnome.gedit.plugins.pythonconsole setting.

Check its current value:

% gsettings list-recursively | grep 'org.gnome.gedit.plugins.pythonconsole font'
org.gnome.gedit.plugins.pythonconsole font 'Monospace 10'

Set the desired new value:

% gsettings set org.gnome.gedit.plugins.pythonconsole font 'Monospace 11'

Verify the change took place:

% gsettings list-recursively | grep 'org.gnome.gedit.plugins.pythonconsole font'
org.gnome.gedit.plugins.pythonconsole font 'Monospace 11'

At this point you can add your settings to your script.


Mounting partition on Ubuntu 11.10 64-bit

if you installed a dual boot (and didn't wipe the disk), you can edit (with sudo) /etc/fstab file (sudo nano /etc/fstab in a terminal for example) and add something like:

#Entry for windows partition:
UUID=6AB40410B403DD87   /mnt/win7   ntfs-3g defaults,suid,dev,exec,locale=pt_BR.utf8

Where you replace locale=xxxx with your language (or don't use if English), /mnt/win7 with the place you want to mount the windows partition (create the directory first) and UUID=xxxxxx with the UUID of your windows partition (you cand find it, with gparted -- install from software center -- or disk utility).

(obs: in fstab entry, be sure to use only one TAB or space to separate the columns)

After edit, use sudo mount -a or reboot the machine to make it appear in the place you mounted it.


how to save Decimal output to a variable

Use tail -n 1 to ignore the %MEM %CPU line, then, since the string you want ("30.5 15.6" on my system) contains a blank, quote the result:

a="$(ps -C firefox -o %mem,%cpu | tail -n 1)"

and then we see:

echo $a
30.5 15.6


Sound is not working in Dell XPS all-in-one 2710 running Ubuntu 16.04

Praise of God
i could solving the problem by installing "hda-jack-retask"
- open the terminal and post:
[ sudo apt-get install alsa-tools-gui ]
- then post:
[ hdajackretask ]
in the gui of "jack retasking" i found "green Headphone" set as "headphone"
i checked "override" and choose "internal speaker"
then i pressed the button "apply now" then "install boot override" then reboot
finally, the problem solved ...
I'm happy now ...
thanks for every one tried to help me ... thank you very much


How to fix read-only file-system on 18.04

I know there's a good answer out there, but I'm having trouble finding it right at the moment.

Your system has by default, a line in /etc/fstab which indicates that if there is an error in the file system, that it should go into read-only mode, to prevent further corruption or dataloss.

The way to fix this, is to boot from a live USB, open a terminal window and use the command

sudo fsck -f /dev/sdxx

where "sdxx" is the partition of the hard drive that Linux resides on.  You could use lsblk to determine the partition name, if you don't know it.

You could also copy your data to a backup hard drive before performing the disk check - the live USB should allow you to mount both your USB backup disk, and the partition that is having the problem (in read-only mode).


Boot up the computer from your Windows 7 USB memory stick or DVD. Then choose to run their repair tool. That will restore the boot manager. On your next boot you won't see the GRUB menu anymore, i.e. Windows will boot up directly. Then you are free to delete the two Ubuntu partitions, which can be done in Windows.

As always when you are fiddling around with partitions and such, don't forget to backup your data.


Is there a way to restrict certain users in ubuntu 16.04 of MySQL?

With the Linux system of permissions, this is very well possible. Look at the current permissions of the mysql executable:

~$ ls -l /usr/bin/mysql
-rwxr-xr-x 1 root root 4243880 jan 19 13:45 /usr/bin/mysql

There are three groups of permissions:

rwx (owner root may read, write, and execute the file);
r-x (others in group root may read and execute the file);
r-x (all others may also read and execute the file).

We will take away the last permissions, and allow only a group of users to execute the command.

First, create a new group mysqlusers:

sudo groupadd mysqlusers

Then, move the mysql executable to that group:

sudo chgrp mysqlusers /usr/bin/mysql

Check to see that it has worked:

~$ ls -l /usr/bin/mysql
-rwxr-xr-x 1 root mysqlusers 4243880 jan 19 13:45 /usr/bin/mysql

Now take away the execution permissions for all "other" (non-mysql) users:

sudo chmod o-x /usr/bin/mysql

You may issue the ls -l command once more to check that the final x has been changed to a -.

At this point, if you tried to enter the mysql command, it would give you: access denied. That is because you are not a member of group mysqlusers. Add yourself and other users to that group:

sudo groupadd -a -G mysqlusers [username]

You will need to log out and back in for this last change to work.


Can't boot in 12.04 after formatting the entire drive

Is this a laptop? Make and model?

It's always handy to have a Gparted live on USB or CD. It is probably part of Ubuntu Live CD as well. Fire it up and check that there's no other partitions.

Note you can select disks on right hand side /dev/sdX:

Edit1:

The difference in sizes are because of GB vs GiB (Gigabyte vs Gibibyte).

GB  is 1,000,000,000 bytes or 10⁹
GiB is 1,073,741,824 bytes or 2³⁰

GB : 128 × 109 bytes = 128,000,000,000 bytes
GiB: 128,000,000,000 ÷ 230 = 119.20929 bytes (or 120 GiB)

Since GParted uses GiB the size is correct. 128 GB == 120 GiB or 119.24 GiB as shown in Ubuntu (a few bytes diff due to conversions) – and:

In some cases1 a few bytes are used by HDD as further firmware for the disk and S.M.A.R.T data: statistics modifications, bad sector map etc. (Meaning SMART is part of (all) HDD's but should do not affect reported size.)

$ sudo smartctl -i /dev/sdb
smartctl 5.43 2012-06-30 r3573 [i686-linux-3.5.0-19-generic] (local build)
Copyright (C) 2002-12 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF INFORMATION SECTION ===
Model Family:     Seagate Barracuda (SATA 3Gb/s, 4K Sectors)
Device Model:     SA2000DM003-9XN234
Serial Number:    ABCDEF124
LU WWN Device Id: 5 000c50 030303ac
Firmware Version: CC4C
User Capacity:    2,000,398,934,016 bytes [2.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   8
ATA Standard is:  ATA-8-ACS revision 4
Local Time is:    Fri Dec  7 03:19:01 2012 CET
SMART support is: Available - device has SMART capability.
SMART support is: Enabled


Installing this drivers solve it for me

https://github.com/siddht4/Huwaei_linux_drivers


I found solution.
After first signing in, I opened options, and checked option "Start Skype minimized in the system tray".
Here is screenshot:

EDIT:
After there steps I had to do one more step.
After typing next command into terminal:

gsettings get com.canonical.Unity.Panel systray-whitelist

I've got this:

  ['JavaEmbeddedFrame', 'scp-dbus-service', 'Wine']

I've just added Skype into this list issuing this command:

gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Skype', 'scp-dbus-service', 'Wine']"

You don't need to check Start Skype minimized... for this to work - as soon you as you update gsettings the skype icon will appear.

Hope this helps :)


Can I stay on Kubuntu 16.04 LTS if I did a clean install of Kubuntu 16.04.2?

Don't worry about the limited kernel support.

Starting with 16.04 the HWE stacks are "rolling".

Your kernel will be upgraded to 4.10 when the 4.8 reaches End of Life.


You quoted variables with single quotes, but:

  Enclosing characters in single quotes preserves the literal value of
  each character within the quotes.

You don’t want that, you want $ to have its special meaning to the shell in order to evaluate the variables. Thus, use double quotes instead:

sed -i "s/$ELEMENT_REPLACEMENT_TOKEN/$BAMBOO_VARIABLE_VALUE/g" $ENV_FILE_PATH

In fact, neither of “s”,“/” or “g” requires quoting, so depending on the variable content you may even let the whole expression unquoted. However, it’s always advisable to quote variables.

You can easily test the effects of your quoting by prepending echo, just add these two lines and compare the output:

echo sed -i 's/$ELEMENT_REPLACEMENT_TOKEN/$BAMBOO_VARIABLE_VALUE/g' $ENV_FILE_PATH
echo sed -i "s/$ELEMENT_REPLACEMENT_TOKEN/$BAMBOO_VARIABLE_VALUE/g" $ENV_FILE_PATH

Further reading

(my) explanation of quoting mechanisms
man bash/QUOTING (the quote quote is from there)


Asus UX32VD on 12.10 stopped working after upgrade to kernel 3.5.0-19-generic

Ok... solved. The modules directory /lib/modules/ was not present at boot time. Only some of the kernels had the directory present.

Making the directory available at boot time solved the problem.


Setup DNS server for local network (with DHCP) for use with apache

I don't know where the difference is between the first tutorials and the one i tried now but now it works.

This tutorial did help me:
Worked


Unable to locate package for peerguardian

As commented by user535733, this PPA has no package for Ubuntu 17.10. You can check the supported Ubuntu versions on the PPA page by expanding Technical details about this PPA then clicking the dropdown list.

The Unable to locate package error is shown when the requested package wasn't found in any package list.
The package lists for a PPA are located in a subdirectory of <repo-base-url>/dists/<ubuntu-code-name>/.

As you can see on the PPA page, under Technical details about this PPA, the repository base URL is http://ppa.launchpad.net/jre-phoenix/ppa/ubuntu. If you navigate to the dists directory you'll wont find the artful (Ubuntu 17.10 code name) directory. That's why the pgl* packages are not known to the package manager.

I don't know why you think you need arm packages, but even if you do the PPA provides arm packages for the supported Ubuntu version.


Run sudo dpkg --remove libdbus-1-3:i386. dpkg will likely complain about unmet dependencies. Then, run sudo apt-get install libdbus-1-3 libdbus-1-3:i386 to upgrade the amd64 package (if needed) and install the i386 package.


Mobile Broadband not showing in Network Manager

The USB Modem was recognised as Flash Memory and that was the problem! The only thing you have to do is this:

Disk Utility -> The USB FLASH drive(there will be 2 devices for you Model, choose the CD/DVD drive) and UnMount it!

That's it! After this wait a little bit and you're ready!


Green lines on playing videos in Ubuntu 19.04?

Just run the following in terminal:

sudo apt remove gstreamer1.0-vaapi

The gstreamer1.0-vaapi is the culprit.


Lubuntu Desktop messed up for logged in user, but not for guest

I experienced a similar problem after upgrade. Here is a somewhat inelegant solution: removing the files in /etc/xdg/lxsession/Lubuntu and rebooting. This seemed to work for me.


Software Center won't start: "AttributeError: 'gi.repository.Gtk' object has no attribute 'FontSelectionDialog' "

Install the package ppa-purge activate the PPAs again and use ppa-purge to deactivate them.

If that doesn't work use the "Origin" button in Synaptic to see the list of used package sources. For every package in every non-official package source use Package-> Force Version from the menu and select the most recent version from an official source.