Installation trouble while trying to boot from DVD

Make sure the toshiba laptop does not use (u)efi mode - but I guess the (vista) piece is rather old but you may search your bios settings.
Might as well be some flaw in your aging laptop cd/dvd drive.

Another alternative would be to dd (from the live cd, on another pc) the ISO to a usb stick of proper size (beware, everything on it will be overwritten) and try to set up "boot from usb".


How to force 'top' to show human readable values for %MEM RES and VIRT

If you press h, the help screen contains, among other things:

  Z,B,E,e   Global: 'Z' colors; 'B' bold; 'E'/'e' summary/task memory scale

Pressing e cycles through mega, giga, tera and peta-sized figures (and the default suffixless kilobyte) values.

After selecting the size, press W to have top save your preferences to ~/.toprc. Now it should start with the preferred size.


sudo su means run the command su as sudo which means as root. Here the system will ask you for your password since you are a sudoer. After you enter your password, you now have root privileges. So su command won't ask for a password. It's same as if you are a root then su to any other user will not ask for password because you are a root.

When you just run the command su, you are running it as a regular user. Since su means switch to user root, you will be asked for the root password.


E: Unable to locate package VMware-Player-15.0.2-10952284.x86_64.bundle

That VMware bundle can't be installed with apt-get.  It's its own standalone installer package.

Run chmod +x on the bundle, then execute it with sudo ./VMware-Player-*.bundle

This is the only way to run the VMware installer, as it is NOT an apt compatible package, but its own installation package that runs itself on its own.


Effect of killing Gimp to increase faster closing of program

The risks

If you kill Gimp, it won't save options for the next run, which may or may not be important. You also run the risk to kill it before it is finished exporting to disk your last image (exporting a big PNG takes time).

A better way

Gimp considers that an image is saved only if it has been saved as XCF. All other formats will potentially make you lose something: layers, channels, selection, paths...

If you read carefully the exit dialog, it tells you you can use Ctrl-D to exit and discard all changes. So you can take the habit of blindly typing Ctrl-QCtrl-D to exit (but someday you'll regret it).


How to choose files to download in deluge using deluge-console?

Here you can find commands for deluge-console

https://whatbox.ca/wiki/Deluge_Console_Documentation


lost?/corrupted? seagate 500Gb external disk

I've had some success with ddrescue on drives that made clicking noises, but if you have a backup then consider the seagate drive a lost cause, buy another drive and restore from backups.  If you don't have backups, give ddrescue a shot -- it will attempt to read the disk repeatedly to access bad areas of the disk, but learn from your mistake and make sure you keep backups in the future. I had to learn the hard way, it's never fun.

ddrescue: http://www.gnu.org/software/ddrescue/ddrescue.html


boost_thread not found , illumina bcl2fastq 1.8.3 installation error , casava ,illumina casava also showing same error

The Bcl2Fastq source code does not compile on Ubuntu 14.04. Here are alternative instructions for running the RPM binary on 14.04 (source):

sudo alien -i bcl2fastq-1.8.4-Linux-x86_64.rpm
sudo apt-get install build-essential
curl -kL http://install.perlbrew.pl | bash
echo >> ~/.bash_profile "source ~/perl5/perlbrew/etc/bashrc"
perlbrew install perl-5.14.4
perlbrew switch perl-5.14.4
perlbrew install-cpanm
cpanm XML/Simple.pm

Note:

Run as a non-root user.
Installing (build) process took about 10min for my environment.
You can also use "aptitude" instead of "apt-get".
For perlbrew, you can use "use" instead of "switch" to set-up only for current shell.
You may need to install other required modules using cpanm.


Wi-FI not working on ASUS U56E on Ubuntu 13.04

Please create one text file:

gksudo gedit /etc/modprobe.d/iwlwifi.conf

Add one line:

options iwlwifi bt_coex_active=0

Proofread carefully, save and close gedit. Reboot and tell us if it's working correctly now.


Ubuntu 20.4 apt --fix-install broken /boot/ 100% full

Use dpkg instead of apt to remove some of those packages.
Then try apt autoremove again.


Can't shutdown when logged in with an administrator account

check if any other user is logged in
check if you have any virtual machine still running (usually kvm/qemu have this behavior)
in the users menu you have an option at the right upper side to shutdown. Have a try at it.


While using internet on ubuntu, all other computers get bad internet connection

From @Matv1 comment:

  I'm a bit confused. I was going on the assumption that Ubuntu wireless
  was working well, just that it was impacting throughput on your other
  connections. Now I understand that the connection on your ubuntu is
  dropped sometimes as well.  What I notice in your dmesgis that
  the wifi client doesn't know which regulatory domain it is in. I know
  that when this is not set, it can create problems for the connection
  as well as on the router side.

  To solve this, you should set your domain (assuming your in the US) in
  the terminal like this:

  sudo apt-get install iw

  sudo iw reg set US


Dual-Booting OS X or macOS with Linux without rEFInd

Ubuntu installs grub and other files in the first EFI System partition on a Mac computer. Normally, this is the first partition on a Mac computer. The process of making the Ubuntu appear on the Startup Manager is a fairly trivial. The steps are given below.

Note: Starting with Ubuntu 18, the installer software should automatically create the files necessary to boot Ubuntu on a Mac. Therefore, Ubuntu 18 and later users should be able to skip steps 5 and 6.

Install Ubuntu.

When finished, restart and hold down the option key to
invoke the Startup Manager. Select to boot from the OS X (or MacOS)
volume.

Open a Terminal application window.

Mount the EFI System partition by entering the command given
below.
diskutil mount disk0s1

Create a folder named Boot in the folder /Volumes/EFI/EFI. You
can use the Finder application or enter the command given below.
mkdir /Volumes/EFI/EFI/Boot

Copy the file grubx64.efi from the folder
/Volumes/EFI/EFI/ubuntu to the folder /Volumes/EFI/EFI/Boot.
Next, rename this file bootx64.efi. This step can be accomplished
by using the the Finder application or by entering the command given
below.
cp /Volumes/EFI/EFI/ubuntu/grubx64.efi /Volumes/EFI/EFI/Boot/bootx64.efi

(Optional) Download a collection of icons from the sourceforge web
site Mac icns. Use the Finder application to open the
downloaded file mac-icns.dmg, then enter the command below to copy
the Ubuntu icon file os_ubuntu.icns to the EFI System partition.
cp /Volumes/mac-icns/OSX10.11.6/os_ubuntu.icns /Volumes/EFI/.VolumeIcon.icns

This will add the following Ubuntu icon to the Startup Menu.

Note: When finished, you can use the Finder application to eject the mac-icns volume.

Use the Finder application or enter the command below to unmount
the EFI System partition labeled EFI.
diskutil unmount disk0s1


Unfortunately you'll need to reinstall - when you do I suggest you follow this guide so you can keep the Ubuntu installation and dual boot the operating systems together.


How do I have my GTK+3 theme look different in certain applications?

It seems you need to dig into the source files for the different applications and see what they call the different UI elements in their code, likely in the toplevel code.

For the gcalctool example, it appears that the relevant file is gcalctool.c, in which the following line can be seen:

static MathWindow *window;

Thus, to refer to its UI elements (buttons in this case), a section in the theme's CSS should read like:

MathWindow .button {
  /* Properties to modify here for buttons in gcalctool */
}

As each application has its own code, it's apparently up to the theme creator to review the source code of the applications they want to theme and find the relevant UI element names to reference in the CSS.


How do I resolve the "Diskfilter writes are not supported" error?

Switching my BIOS to AHCI solved the problem.


Ubuntu 16.04 Genymotion Android device launches but not work - black screen

Solve the same problem with this https://stackoverflow.com/questions/39322338/ubuntu-16-04-genymotion-dev-hw-random-not-found

  Just go to your install directory and delete the libdrm.so.2, then restart.

Use command:

cd /genymotion/install/directory
mv libdrm.so.2 libdrm.so.2_bk


Unfortunately, this seems to be a reported bug with PuddleTag.

You can see the Debian and the Arch Linux bug reports at their respective links.

According to those reports it looks like this was caused by the 4.11.3 -> 4.11.4 upgrade of python-qt4.


Cant run binary file although architectures match

Running chmod +x before solved it, as it was pointed out by Zacharee1 in the comments


I currently have Rhythmbox installed on my system but not set up (default state).
So I created three new playlists and renamed them:

ply_b
ply_c
ply_a

After closing and reopening Rhythmbox I noticed, that all playlists are now in alphabetical order (that is what you are experiencing):

ply_a
ply_b
ply_c

Then I located the playlists.xml under /home/USERNAME/.local/share/rhythmbox/playlists.xml which looks like this (in my case):
As per suggestion by WU-TANG in the comments below: At this point it is a (very) good idea to make a back up copy of your original playlists.xml, before making any edit/changes, that might break, delete or alter your currently working playlist setup in any unwanted way, in order to be able to restore it afterwards!
[...]
</playlist>
  <playlist name="ply_c" show-browser="true" browser-position="190" search-type="search-match" type="static"/>
  <playlist name="ply_a" show-browser="true" browser-position="190" search-type="search-match" type="static"/>
  <playlist name="ply_b" show-browser="true" browser-position="190" search-type="search-match" type="static"/>
  <playlist name="Play Queue" show-browser="false" browser-position="180" search-type="search-match" type="queue"/>
</rhythmdb-playlists>

Noticeable is, that all custom playlists are set up, to type="static", which restores them in my case to the default alphabetical order in Rhythmbox itself. However I can't figure out how to make them stick in "non-static" state.
Hope that helps.


Welcome to StackExchange AskUbuntu!

Get the installed version of Alsa with cat /proc/asound/version
(https://askubuntu.com/a/394852/359408)

Update your system with

sudo apt update
sudo apt upgrade

(updates all packages, including ALSA). Not that the version Ubuntu installs might not be the most recent release of ALSA, but the most recently tested version for your version of Ubuntu.


If you open Ubuntu Software Center then search for and install synaptiks this will give you options to left click by clicking on a corner of your touchpad.

I hope this helps

UPDATE

The only way that may work that I can think of is to set the pointer speed as follows

This should make the movement very slow when the mouse is stationary, but accelerates to a sensible speed when it is moved.


I don't think we ship a K20samba4 script anymore - samba 4 now uses upstart.

There is a /etc/rc4.d/S20samba4 file, which should be a symlink to ../init.d/samba4

update-rc.d should also be able to create it for you.


Radeon hybrid ATI Radeon card and fglrx problem - update OpenGL to 4.3

Well I found the way. After installing any fglrx driver I just need simply to do:

sudo Xorg :1 -configure
sudo cp xorg.conf.new /etc/X11/xorg.conf


smbnetfs with remote share: Writing multiple files at a time via CMake very slow or deadlocked

By some bizarre stroke of luck, I found that this has something to do with the max_retry_count value in smbnetfs.conf. Setting this value to 0 (was 2) caused the slowness issues to disappear.  However, the Permission denied errors still appear in smbnetfs.log.  I will declare this solved for the purposes of this question but it seems like a bug report is in order.


12.04 LTS amd64 post install error: Operating System not found.

I just solved the exact same issue, hopefully this will help you. Worked on my x120e.

In the bios, set it to boot EFI mode only (the default is "Both" and the other option is bios only). Then, boot off the USB stick. You should see a grub menu when you start booting off the stick, and not a "syslinux" or unetbootin-style one.

Once you are in the Ubuntu installer, create your partitions as you would normally, but add an additional 512 Mb partition. Set it's type to "EFI Boot" (as opposed to Ext4 or swap types). Continues the installation as you would normally, and once it's done it should reboot into Ubuntu just fine.


Installing any operating system on an SSD makes a large difference in perceived speed, because operating system components and applications are loaded much faster than from a conventional HDD.
Other factors are equally important in determining the experienced speed. You need sufficient memory for all the applications you want to run at the same time, and you need an adequate processor. These three factors combined make for a overall smooth experience in different use cases. Slowness can be experiences whenever the current use causes one of these three factors to become limiting.


The only driver available for this graphic chipset is the radeon package from the official repository, do not install any fglrx version, it simply do not support your card.

In previous release there was some problems with the X1x00 series using the radeon driver, apparently this issues are still there and honestly i do not think that there is too much hurry to solve this, it's a really old videocard only supported by open and limited driver.

To give you an idea you can find topics on the internet about issues with the X1x00 series from 3-4 years ago to now.

Unset the "hardware video acceleration" for flash and try this way, also you can try the HTML5 version for some website like youtube or vimeo.

In the end, considering the software and the performance of your video card this is a normal behaviour.


Your computer has an Intel Celeron D 325 processor which indeed only has a 32-bit instruction set.  You can download a 32-bit installer image from the alternative downloads page under "Network installer".  It's called a Network installer to distinguish it from the Live installer, which boots to a live Ubuntu installation, and because it loads its packages from the internet as it installs so it requires a network connection.  The Live installer is no longer available for 32-bit Ubuntu.

https://www.ubuntu.com/download/alternative-downloads

You'll want the "i386" architecture, and then download the .iso file, which is around 50 MB.

Note: the .iso files are intended to be burned as images to a CD, but if you don't have a CD drive you can write it as a raw image to a USB stick and it should work as long as you can boot from USB devices, as it is a hybrid image.  How you do this depends on your OS.


How do I downgrade Plymouth without breaking lightdm?

"lightdm,plymouth"=0.8.8-0ubuntu18 has a wrong syntax, plymouth=0.8.8-0ubuntu18 is correct one. From man apt-get

install pkg [{=pkg_version_number | /target_release}]...

So these forms are correct (space as separator):

install plymouth
install plymouth=0.8.8-0ubuntu18
install plymouth/trusty

install lightdm plymouth=0.8.8-0ubuntu18
install lightdm=1.18.1-0ubuntu1 plymouth=0.8.8-0ubuntu18

However that version 0.8.8-0ubuntu18 not available in the repository. They put it there just to skip older versions, last one was 0.8.8-0ubuntu17.1.

To be complete, you may want to verify it yourself:

http://archive.ubuntu.com/ubuntu/pool/main/p/plymouth/
http://old-releases.ubuntu.com/ubuntu/pool/main/p/plymouth/


Sounds like you're looking for skippy-xd:

https://lubuntu.me/tip-skippy/


x11vnc throws "X Error of failed request: BadMatch" after upgrade from 17.04

It seems one of your machines is running on wayland as display manager and many applications including x11vnc depend heavily on Xorg/Xserver and fail to work on wayland.

So a switching to Xorg ad display manager should fix your problem. This you can do by logging out and change your display manager by clicking on the small cogwheel beside the sign in button. (See screen-shot)


How do I assign the output of a command to a variable?

Yes, you use my_var=$(some_command). For example:

$ foo=$(date)
$ echo $foo
Mon Jul 22 18:10:24 CLT 2013

Or for your specific example, using sed and grep to get at the specific data you want:

$ cpu_temp=$(sensors acpitz-virtual-0 | grep '^temp1:' | sed 's/^temp1: *//;s/ .*//')
$ echo $cpu_temp
+39.0°C


Ubuntu 14.04 Try to “sudo add-apt-repository ppa:tualatrix/ppa” failed

You should check your network connection settings and firewall and try again.

The PPA you mentioned ("The official Ubuntu Tweak stable repository") is alive and provide packages for 14.04 LTS.

So you can install Ubuntu Tweak with

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak


After "Checking battery state" error lowered resolution

Remove xorg.conf file and try rebooting.

Use the below command to rename the original file. So that if this change cause any problem, you can revert back.

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.bak


how to view hidden text using TR command in terminal?

The homework requires you to transform the space and tabulation characters into something visible. For that, you can use the command cat ghost.txt | tr [:blank:] [@] to turn every space character into @. After that, the tabulation characters will appear as opening brackets "[", which will then reveal a hidden ASCII message. You can use then grep --color command to highlight the message.

The French version of this answer is available in the revision history


How to reinstall many removed packages at once?

First of all, let me say that removing python can lead to many fundamental commands not work anymore. So I don't known if what follow will work.

Secondly, I assume that the package names couldn't be found error you have, derives from a mispelled name on the command line, or from a package installed locally and not available in repositories.

Then, to obtain a log of removed packages, relatively to the last dpkg log available (I don't think you need to take into account older logs):

awk '$3 == "remove" { print $1, $2, $4 }' /var/log/dpkg.log | tee list

Then edit the list file created in the current directory, and only leave lines relative to packages you want to reinstall, based on timestamp of the line. Say you save the modified file to list-mod.

To reinstall that packages, use the following command:

sudo apt-get --simulate install $(awk '{ print $3 }' list-mod)

I inserted the --simulate option to see what the command would do. If it is all ok, do the command again with that option removed.

If the command say some packages cannot be found, simply remove them from list-mod and try again.


Using binfmt-misc in conjunction with xattrs

I don't know of a way to do this through binfmt-misc and xattrs, but I'll propose a different approach. I haven't tried it out but I can't see why it wouldn't work.

The idea is to use a union mount to hide the real binaries by a wrapper script that calls the sandbox. We need a union mount where the upper directory is mostly read and writes to a non-shadowed file go to the lower directory, which is not supported by all union mount systems.  In particular this rules out OverlayFS which is now built into the Linux kernel.

Write a generic wrapper script:

#!/bin/sh
exec /usr/local/bin/sandbox "${0#/sandboxed}" "$@"

Create a directory /sandbox and create a union mount that shadows the root filesystem. I'll use aufs (Ubuntu: aufs-tools), which unfortunately has recently been abandoned; there may be a better choice.

mount -t aufs -o br:/,br:/sandbox aufs-sandbox /

For each executable that you want to sandbox, link /sandbox/path/to/foo to the wrapper script (after creating the necessary directories /path/to under /sandbox).


Certain fonts look too small after upgrading

One way to "tweak" this might be:

System Settings > Display > Scale for menu and title bars

which is available as separate setting for every monitor you have (e.g. if you have several).

Scale all windows to match:

... to the right of the above might also be of some help.


invoke-rc.d: could not determine the current runlevel

0) I am guessing you have tried
    sudo apt-get install -f

1) Back up your existing MySQL files.  You can find out where your data directory is in /etc/mysql/my.cnf

https://stackoverflow.com/questions/26402884/where-does-mysql-store-data

You can use mysqldump to backup.

https://www.techrepublic.com/article/how-to-back-up-mysql-databases-from-the-command-line-with-linux/

2) Run these commands

sudo apt-get remove --purge 'mysql*'
sudo rm -rf /etc/mysql /var/lib/mysql
sudo apt-get autoremove
sudo apt-get autoclean
sudo apt-get install mysql-server


It is normal to get this dialogue when using thunar, as noted here briefly at the Xfce wiki, although it will obviously only be displayed if you have a notification daemon installed. When a filesystem is unmounted any pending data is written and then the device itself can be removed. However, sometimes the filesystem cannot be unmounted if a process is still attached, and so tools like fuser can be used to check what is still accessing the drive.

The addon, thunar-volman is installed with thunar, and via thunar-volman-settings, you can configure how it operates. As it uses dbus to communicate with other applications, you can get a glimpse of what's happening behind the scenes, by running

dbus-monitor

and then connect your device, and then unmount it. A whole splurge of data will arrive, but you can see the process whereby thunar, thunar-volman, etc are communicating over dbus, resulting in what you see when you remove a device, which is communicated to you by your installed notification-daemon:

method call sender=:1.97 -> dest=:1.98 serial=8 path=/org/freedesktop/Notifications; interface=org.freedesktop.Notifications; member=Notify
   string "Thunar"
   uint32 0
   string "drive-removable-media-usb"
   string "Writing data to device"
   string "There is data that needs to be written to the device "MCADisc" before it can be removed. Please do not remove the media or disconnect the drive"
   array [
   ]
   array [
      dict entry(
         string "urgency"
         variant             byte 2
      )
   ]
   int32 0


ntp possible on ad hoc network in ubuntu ? 12.04 onwards

Given that you're on board a car, why not just tap into the car's GPS for time?

I know that that will not help you in the lab, but you could buy GPS units for the laptops and make each of them Stratum 1 tickers (clocks).  This would be consistent with the time variances when in the cars as well.


How do we get RSSI values from Bluetooth beacons (estimote to be specific) in Linux?

It's possible your beacons are actively refusing your connection to save on power but to just read the signal strength you shouldn't need to connect as they should be broadcasting that information anyway.

I couldn't get hcidump to give me the information I was looking for so instead I used btmon and had great success getting the RSSI from my BLE beacons:

btmon &
hcitool lescan --duplicates


Will hibernate work with swap file on 17.04?

Hibernation (suspend-to-disk) The hibernation feature (suspend-to-disk) writes out the contents of RAM to the swap partition before turning off the machine. Therefore, your swap partition should be at least as big as your RAM size. The hibernation implementation currently used in Ubuntu, swsusp, needs a swap or suspend partition. It cannot use a swap file on an active file system.

ref: https://help.ubuntu.com/community/SwapFaq


Ubuntu 13.04 shutdown hangs in Asus P42F

I was able to solve the hang up during shutdown by removing the speech-dispatcher. Not sure if that's the correct solution though but it's a temporary remedy to prevent the hang up for now.

Hope that helps.


How to create System Menu (mini control panel)

I don't know where each option from the example refers to. Here's a working tutorial - How to create a script with similar menu.

First you need to install dialog. This application provides a method of displaying several different types of dialog boxes from shell scripts:

sudo apt install dialog

Then create executable file, let's call it smenu, and place it into the directory /usr/local/bin/, thus it will be accessible as shell command system wide:

sudo touch /usr/local/bin/smenu
sudo chmod +x /usr/local/bin/smenu
sudo nano /usr/local/bin/smenu

The script content should look like this:

#!/bin/bash
HEIGHT=18
CHOICE_HEIGHT=10
WIDTH=78
BACKTITLE="SYSTEM MENU"
TITLE="[ M A I N - M E N U ]"
MENU="Tasks:"

OPTIONS=(
Network/IP   "IP Settings         [sudo nano /etc/hosts                ]"
Network/DNS  "DNS Settings        [sudo nano /etc/resolv.conf          ]"
Network/IFCS "Network Interfaces  [sudo nano /etc/network/interfaces   ]"
Timezone     "Set Time Zone       [sudo dpkg-reconfigure tzdata        ]"
Reboot       "Reboot the System   [sudo systemctl reboot               ]"
Shutdown     "Shutdown the System [sudo shutdown                       ]"
Logout/Exit  "Logout the Session  [logout                              ]"
Update       "Update & Upgrade & autoRemove & autoClean   [sudo apt ...]"
Edit         "Edit this script    [sudo nano /usr/local/bin/system-menu]"
Shell        "Exit to Shell"
)

CHOICE=$(dialog --clear \
    --backtitle "$BACKTITLE" \
    --title "$TITLE" \
    --menu "$MENU" \
    $HEIGHT $WIDTH $CHOICE_HEIGHT \
    "${OPTIONS[@]}" \
    2>&1 >/dev/tty)

clear
case $CHOICE in
    Network/IP)
        sudo nano /etc/hosts
        ;;

    Network/DNS)
        sudo nano /etc/resolv.conf
        ;;

    Network/IFCS)
        sudo nano /etc/network/interfaces
        ;;

    Timezone)
        sudo dpkg-reconfigure tzdata
        ;;

    Reboot)
        sudo systemctl reboot
        ;;

    Shutdown)
        sudo shutdown
        ;;

    Exit)
        logout
        ;;

    Update)
        sudo apt update && sudo apt upgrade && sudo apt autoremove && sudo apt autoclean
        echo "**"
        sudo uname -a
        echo "**"
        sudo lsb_release -a
        echo "**"
        [ -e /var/run/reboot-required* ] && echo "Reboot is required!" || echo "Reboot is not required."
        ;;

    Edit)
        sudo nano /usr/local/bin/smenu
        ;;

    Shell)
        exit
        ;;
esac

Copy the above content and use in nano: Shift+Insert for paste; Ctrl+O and Enter for save; Ctrl+X for exit.
All commands used within the script are available in Ubuntu 16.04.
The content between the brackets [...] is just a reminder of what will be executed.

Now you will be able to access the script via the command smenu. The result should be:

If you want to open this script after login into a terminal, append next line to the bottom of the file ~/.bashrc:

/usr/local/bin/smenu

Instead of dialog can be used the tool whiptail, that offers much of the same functionality (and options) as dialog, and is installed by default in most Ubuntu distributions. For this purpose use the above script and change line 22 in this way:

CHOICE=$(whiptail --clear \

Now the output of our script/command smenu should look like this:


I know this question is old - but as of today the balance command solves this stuff:

During conversion a lot of space will be allcoated to move stuff to it. Once it is allocated, it will not show up as "free" or "unallocated" anymore. To fix this simply start a balance

btrfs balance start "path"

you can also tell the balance command, to only balance chunks, which are used for acertain percentage - like 0% which would mean the chunks are empty:

btrfs balance start "path" -dusage=0 -musage=0

parameter -d means options for the data.
parameter -m means options for the metadata.

play with the balance command, it should help.


Using wget and having websites working properly offline

Wget itself is capable of this:

wget -pk <URL>

-p causes wget to retrieve the page itself as well as any other resources the page uses such as images, scripts and stylesheets.  The result will be stored in a new directory, containing all the files downloaded.

-k causes wget to translate the URLs of these so they will work locally.

The above only retrieves one page, along with its resources.  If you want to try and retrieve a whole site, add -r:

wget -rpk <URL>

However, this comes with a warning:

It may download hundreds, thousands, or many more pages if there are a lot of pages.  By default it uses a depth of 5, which is likely enough depth to retrieve a whole site unless the internal linking is a bit sparse.
This may fill up your hard disk.
It places undue load on the server you're downloading from.  Consider asking permission.


Ubuntu 12.04 problem with 3592 ralink wireless chipset

Once you have downloaded the source package from the Ralink website, follow these steps:

Open a terminal with Ctrl+Alt+T, and paste the following, line by line:

sudo apt-get install linux-headers-$(uname -r) build-essential dkms
cd Downloads
tar -xzf DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217.tgz
cd DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217
WPA1=HAS_WPA_SUPPLICANT
WPA2=HAS_NATIVE_WPA_SUPPLICANT
sed -i -e "s/$WPA1=n/$WPA1=y/g" -e "s/$WPA2=n/$WPA2=y/g" os/linux/config.mk
sudo make && sudo make install && sudo make clean
cd ..

Blacklist the built-in driver, and load the new one with:

echo "blacklist rt2800pci" | sudo tee /etc/modprobe.d/blacklist-rt2800pci.conf
sudo modprobe -rfv rt2800pci
sudo modprobe -v rt3562sta


I can't change the permissions on one of my hard drives [SOLVED]

A possible cause of read-only NTFS partition could be the Fast Startup turned on in Windows (8 and 10 version).

See this article to learn what it is (basically, a hybernation variation), and how to disable it.


To use this device you will need to use the DisplayLink driver

http://www.displaylink.com/downloads/ubuntu

This works with my displaylink2hdtrio device which i would guess is the same as your screen. The driver looks like it should work with other debian systems

amias@rome:~/Downloads$ sudo ./displaylink-driver-1.2.58.run
Verifying archive integrity... All good.
Uncompressing DisplayLink Linux Driver 1.2.58  100%
DisplayLink Linux Software 1.2.58 install script called: install
Distribution discovered: Ubuntu 16.04.1 LTS
Installing
Configuring EVDI DKMS module
Registering EVDI kernel module with DKMS
Building EVDI kernel module with DKMS
Installing EVDI kernel module to kernel tree
EVDI kernel module built successfully
Installing x64-ubuntu-1604/DisplayLinkManager
Installing libraries
Installing firmware packages
Installing license file
Adding udev rule for DisplayLink DL-3xxx/5xxx devices

After this go to the Control Center and you should see an additional monitor when you load the screen settings applet

Something to bare in mind is the refresh rate is really low because of the low data rates of USB2, this meant that connecting this display made all the other displays i use drop down to 30hz which felt horribly laggy compared to the normal 60hz.

You might be able to tweak it a bit with xrandr and cvt but don't expect to show video. Its fine for text mode displays from say a servers framebuffer but its not good for a desktop.

Don't be tempted to unplug this device if this display is still active, it will crash X when its unplugged. You will need to disable the display first.

If you are buying this in the UK you could just try it and return it in accordance with the distance selling regulations, might cost you the postage.


You most certainly have to manually create an LVM snapshot if you want one ( using lvcreate -s ).  They also are only suitable for short lived use; you can't keep creating one every day and retaining them for the long haul as a means of recovering old data, which is also not at all the same thing as a backup.

If you want a backup, then you need to use a backup utility and store the backup on offline media.


Switch between Windows 7 and Ubuntu without rebooting?

No,it is not possible to switch between windows 7 and Ubuntu without rebooting, but you can access windows 7 files(partitions) from Ubuntu.


I actually tried this over the past few days to find out that  the way you install windows 10 will affect into which mode UEFI vs. legacy you can run it. You can figure out whether you may have the same problem, by switching to legacy mode in BIOS, and see if you can boot into windows for trouble shooting purpose.

What worked for me, was to remake a live USB via Rufus on another windows computer to have a UEFI install on win10.Then created an empty partition on the new windows install. Then installed Ubuntu via live USB, selecting the empty partition.

Another problem might be the drive you select to boot into during Ubuntu install. Perhaps someone can help you with the selection when you install on two separate hard drives.


Let's say you have a bunch of deb files. And in the same directory you have a text file named file_list where each line is a download link for all of those deb files. We can get the names of all of deb files using glob pattern (*deb) and using for loop we use sed to remove matched line in-place of the file_list:

for i in *deb;
do
    sed -i "/"$i"/d" file_list
done

Just to be safe, copy  the file_list first before you run the command.


How do I wipe Windows10 from an SSD in order to install ububtu

There are apps which can be used to completely wipe data, but they're superfluous.

Your PC will have two, or three, Windows partitions; an EFI partition (FAT32), the main partition (NTFS), and maybe a recovery partition (probably NTFS). If you are absolutely, positively, certain beyond the merest shadow of a doubt that you never want to use Win10 again on that box, then delete them all, and if I had your Service Tag number, I could probably find the Dell utility to do so.

However, you can use the perfectly good installer which Ubuntu provides to wipe them all. When the installer asks if you want to install alongside Windows, choose the last option, Choose something else.

The gparted app appears; select each of the partitions you see and mark them for deletion, then commit the changes and wipe them all. Then, back up, back into the Ubuntu system installer.  Now, pick the first menu item and use the entire SSD for Ubuntu.

Ubuntu's default filesystem is ext4, and deleting the old NTFS filesystem(s) means all the data is effectively lost; as you overwrite it by installing and then using Ubuntu, all the old bits on the SSD will be overwritten, which erases the Windows apps and data beyond recovery.

If you are installing 18.04LTS, then there won't be a swap partition, but a swap file instead; that's AOK. Some older versions had a swap partition as the default.


Regarding Ubuntu installation on end user machines

Ubuntu has always been and always will be free. That's the sort of philosophy that most of the linux based distros have, and is one that Ubuntu has pioneered. If you wish to install Ubuntu on a large number of machines there is no need to purchase a bulk license  something that would be needed with an operating system like Windows. There is definitely no legal issues with installing Ubuntu, the .iso files are there on this page for free downloads.


Blank screen post BIOS after using apt-get -f install

It seems apt-get -f install removed the ubuntu-desktop package from your system which is why you are booting to the terminal. You need to install the ubuntu-desktop package again to boot to desktop:

sudo apt-get install ubuntu-desktop


How to submit ideas for the Ubuntu Apps Showdown to reddit?

It seems that all those posts got stuck as spam.

I've now moderated the spam queue and accepted them. Let us know if you've got further problems with posting links.


Try pointing VLC to /dev/sr0 instead of /dev/dvd when you open a DVD (CTRL+D). Also, did you install libdvdcss? https://help.ubuntu.com/community/RestrictedFormats/PlayingDVDs


How to get new windows and notifications to appear in current workspace.

You can workaround this  issue with Compiz Settings Manager:

1) Install ccsm,

2) Open it (Alt + F2 and type ccsm and hit Enter),

3) Go to "Windows Management" > "Place Windows",

4) Open the tab "Fixed Windows Placement",

5) Under "Windows with fixed viewport" click at "New". At the new opened windows click at the + to add the program you want to configure.

Enjoy ;-)


How to add EXTRA_CFLAGS to indigo eclipse cdt?

It's not all one line item in eclipse...looking at your link it wants you to do something like this:

gcc -g EXTRA_CFLAGS+=-O0 EXTRA_CFLAGS+=-fno-omit-frame-pointer
Let's take that apart: -g Default debug level so
Project Properties->C/C++ Build->Settings->Tool Settings->Debugging and select Debug Level Default (-g)

-O0 Optimization level so
Same tab Optimization None(-O0)

-fno-omit-frame-pointer so
Same tab Miscellaneous Other flags add -fno-omit-frame-pointer

You may or may not want to remove the other flags, but I wouldn't.
So you check in gcc c compiler and it looks like this

Apply and OK.
Repeat the same(disabling debug completely) for your release build.
Done and done.


Unable to upgrade to a newer distribution

Are you upgrading to 13.04?

Try to boot on the 13.04-cd/usb, and click "Install Ubuntu".
You will get a few options about installing/upgrading. Click the Upgrade one.
It will keep your personal files, but reinstall the default apps.


How do I install packages without using a package manager?

You can unpack a .deb package using

ar x your_package.deb

Every .deb package contains the two files control.tar.gz and data.tar.gz.

data.tar.gz contains all the program's files.

control.tar.gz contains the metadata and some scripts: preinst is run by dpkg before unpacking data.tar.gz, postinst after unpacking. When removing a packge prerm is run before the program files are removed and postrm after that.

Quite likely this scripts don't work on a Non-Debian system but they may contain code you need to run to make the program work.

Why do you want to do this?


Advice for troubleshooting a (url) preseed file?

Found the solution.

Short version: Live ISOs use a different installer (Ubiquity) than the one on the "alternate" ISO (d-i), which ignores many of the standard d-i preseed keywords.

I'd seen docs that recommended using the alt ISO for custom installers, but nothing explaining why, or saying what to do if you want to customize a live environment from which you can install.

I'd been thrown off by the fact that installing from a live environment undoes changes to certain config files by default, which led me to conclude that I had less control over the install than I did. It's actually pretty simple, just very, very different from a d-i install.

The best documentation I've found for this is actually not on the Internet, it's right on your system if you have the ubiquity package installed. Just do:

zcat /usr/share/doc/ubiquity/README.gz | less

And you're off.

You can also find it online in some source code repositories.


From this bug report this issue can be fixed by running this command in a terminal

export KWIN_USE_BUFFER_AGE=0; kwin --replace &


How to hide keyboard layout indicator in Ubuntu 17.10 and later with GNOME 3?

You may use a GNOME shell extension called Icon Hider (now supports GNOME shell v3.26, the one included in Ubuntu 17.10).

This extension provides option to hide/show indicators individually, you'll be able to hide the keyboard layout indicator in particular.


Can't move a window in Unity (it's stuck)!

Try to press alt (keep it pressed) and then click with the mouse on the window and move it.

Also, try alt + spacebar, move (or m), and move it with the arrows.

Any result?


Manual mounting of cifs works fine, but not in fstab

Mine looks like this - with a credential file as mentioned above, but with some other explicit options.

//192.168.1.2/photos /media/photos cifs credentials=/home/[credentialfile],iocharset=utf8,sec=ntlm,file_mode=0777,dir_mode=0777,uid=[my userid],gid=[my groupid],nobootwait 0 0


How to use the Adobe Source Code Pro font?

Download the archive from the Source Code Pro homepage. You can do it also using wget: Open a terminal (ctrl-alt-t or press the win key and type "terminal") and type
wget https://github.com/adobe-fonts/source-code-pro/archive/2.030R-ro/1.050R-it.zip

Unzip the archive (you can use Nautilus for that, or use the following command).
unzip 1.050R-it.zip

Locate and ensure your fonts folder exist in your home directory, often in ~/.local/share/fonts folder (either go to home in Nautilus and create a new folder, or type the following from the terminal)
fontpath="${XDG_DATA_HOME:-$HOME/.local/share}"/fonts

mkdir -p $fontpath

If you already have that directory, don't worry.

Move the Open Type fonts (*.otf) to the newly created .fonts directory. In command line, that would be
cp source-code-pro-*-it/OTF/*.otf $fontpath

If you haven't done it yet, open a terminal, and type
fc-cache -f -v

Your font is now ready to use and the applications should be able to see it.
All in one script for those who simply want to copy/paste the answer
#!/bin/bash
set  -euo pipefail
I1FS=$'\n\t'
mkdir -p /tmp/adodefont
cd /tmp/adodefont
wget -q --show-progress -O source-code-pro.zip https://github.com/adobe-fonts/source-code-pro/archive/2.030R-ro/1.050R-it.zip
unzip -q source-code-pro.zip -d source-code-pro
fontpath="${XDG_DATA_HOME:-$HOME/.local/share}"/fonts
mkdir -p $fontpath
cp -v source-code-pro/*/OTF/*.otf $fontpath
fc-cache -f
rm -rf source-code-pro{,.zip}

If you want to install system wide instead of per user, copy the files to /usr/local/share/fonts/ instead of ~/.local/share/fonts/.


How does ubuntu handle multiple installations of software?

Ubuntu is based on Debian, and thus uses APT. If you ever want to dive into more details, have a look at that wiki page.

...but to address some of your question:

first, the installation packages are cached in
/var/cache/apt/archives. If a package has been cached, it won't be
downloaded again unless a newer version is available.
second, APT keeps track of installed packages, so that, if you try
installing something that's already installed, you'll get a message, that the package is already the newest version:

 ~$ sudo apt-get install zsync
 Reading package lists... Done
 Building dependency tree
 Reading state information... Done
 zsync is already the newest version.
 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

third, APT usually runs as root, so that regular, unprivileged users
do not download and install software.


How can I find which song is currently playing programmatically?

Oops, another question made me think of looking in the manual... Apparently it's really simple to get info about the currently playing song using the --query-* commands. From the manual:

   --query-uri
          URI

   --query-artist
          Artist Name

   --query-album
          Album Title

   --query-title
          Track Title


The easiest way to fix this is probably to run "dpkg --purge samba4" in a terminal to uninstall Samba 4. We are also working on an update which fixes this particular error.

Samba 4 is an experimental version of Samba. If you just need file sharing, I would recommend using the "samba" package (Samba 3) instead.


I am no expert but you can simply download .deb file from: https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb

And then run this command:

sudo dpkg -i google-chrome-stable_current_amd64.deb

This will may help as well for resolving dependencies:

sudo apt-get install -f


I had the same problem, I did the following instruction to resolve it:

After installing Python3.6:

To make python3 use the new installed Python 3.6 instead of the default 3.5 release, run following 2 commands:

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1

sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2

Finally, switch between the two Python versions for python3 via the following command:

sudo update-alternatives --config python3

Then select the /usr/bin/python3.6 -- automode in choices menu, for me that was 0 row.

[Result]:

$ python3 -V
Python 3.6.9

Or:

$ python3 --version
Python 3.6.9


Trying to boot from install cd gives error

As I take a look at the specs of your computer (http://www.cnet.com/laptops/sony-vaio-vgn-s580/4505-3121_7-31516554.html), it seems to be too small to run Ubuntu properly.

If you want to give a new life to this machine, you may want to try lubuntu or lxle.

http://lubuntu.net/

http://lxle.net/

Make sure you use the 32 bits version, there are chances that your processor doesn't support 64 bits.


Nautilus stopped working after update to 3.6.1

Both Ubuntu versions 12.04 and 12.10 use the nautilus 3.4.2. Therefore this (nautilus 3.6.1) can be considered as an "unsupported" version.

My suggestion is to fill a bug against nautilus 3.6.1 in gnome bugzilla.

Edited this answer according to new info in the comments.

Other time, reconsider twice before you add an external and unsupported PPA in you Ubuntu system,
It can brake your system in a blink of an eye. (as did in this case).

Some PPAs updates-upgrades essential system packages and this can result in a very frustrating experience.

To solve your problem open a terminal and remove the ppa with bellow commands

sudo apt-get install ppa-purge
sudo ppa-purge ppa:gnome3-team/gnome3
sudo apt-get update
sudo apt-get dist-upgrade


If you have your whole old home directory backed up, all you need to do is copy the old ~/.gnupg/ folder to your new home.

Though it should be noted that this isn't really the best way to back up and restore a key. It has the draw back of over-writing the gpg keyrings on the target system. If you've imported public keys or created new keys, this isn't the ideal solution.

Typically, you should save your public and private keys using:

gpg -ao mypub.key --export <MY_KEY_ID>
gpg -ao myprivate.key --export-secret-keys <MY_KEY_ID>

Then import them on the new system with:

gpg --import myprivate.key
gpg --import mypub.key

This way they are just added to the keyring on the target system.


Will a kernel update overwrite my wireless driver from a newer kernel?

You compiled backports against your currently running kernel only. That means that when a later kernel version is installed by Update Manager, you must recompile:

cd ~/Desktop/backports-3.13-rc2-1  <-or wherever you downloaded the file
make clean
make defconfig-rtlwifi  <-or whatever suite you compiled
make
sudo make install

Another option is to simply install the 3.13 kernel from here: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.13-trusty/ I suggest you get all the deb files appropriate to your architecture; either 32- or 64-bit; find out with:

arch

For instance, if yours is a 32-bit system (i686), then I suggest you download linux-image i386, linux-headers i386 and linux-headers all. Download them to your desktop and install with:

cd ~/Desktop
sudo dpkg -i linux*.deb

Reboot and you should be all set.


bash command to copy directories from list containing directories - getting error

Your immediate issue is that your test.lst file appears to have DOS-style CRLF line endings (CR is denoted by the \r escape char).
You could convert the file with dos2unix, however instead of using cat and xargs -I {} I'd suggest removing the CR with sed then setting the xargs delimiter to newline ex.
sed 's/\r$//' test.lst | xargs -d '\n' cp -Rt ./_DEST --


Ubuntu 13.4 in virtual machine not showing wlan0

If you are running Ubuntu on a VirtualBox and you have setup to share the networking, it should use your host's internet connection (regardless if its WIFI/LAN) and either bridge/NAT/etc it to your guest OS which is in your case Ubuntu.

Your host internet connection is provided by the eth. Naturally, since you are using VirtualBox, it is creating a virtual environment for your host system, in which your guest WLAN is not part of.


Find the lowest height and lowest width among all images in a directory

Getting the image with min height and width

I don't have any comparing statistics, but I have reasons to believe the script below offers a relatively good option, since:

python's PIL does not load the image into memory when calling .open
The script itself does not store the list of all files, it simply looks per file if the next one has a smaller height or width.

The script

#!/usr/bin/env python3
from PIL import Image
import os
import sys

path = sys.argv[1]
# set an initial value which no image will meet
minw = 10000000
minh = 10000000

for image in os.listdir(path):
    # get the image height & width
    image_location = os.path.join(path, image)
    im = Image.open(image_location)
    data = im.size
    # if the width is lower than the last image, we have a new "winner"
    w = data[0]
    if w < minw:
        newminw = w, image_location
        minw = w
    # if the height is lower than the last image, we have a new "winner"
    h = data[1]
    if h < minh:
        newminh = h, image_location
        minh = h
# finally, print the values and corresponding files
print("minwidth", newminw)
print("minheight", newminh)

How to use

Copy the script into an empty file, save it as get_minsize.py
Run it with the directory of images as argument:

python3 /path/to/get_maxsize.py /path/to/imagefolder

Output like:

minwidth (520, '/home/jacob/Desktop/caravan/IMG_20171007_104917.jpg')
minheight (674, '/home/jacob/Desktop/caravan/butsen1.jpg')

NB

The script assumes the image folder is a "flat" directory with (only) images. If that is not the case, a few lines need to be added, just mention.


Failed to Log in to Ubuntu Software Centre to Review Items

Try logging in by going to the toolbar at the top of the Ubuntu Software Center and clicking File > Reinstall Previous Purchases > and a a new Dialogue should open up to sign in.


Altec Lansing iML 237 not Working in 11.10

Well, just like when your car stops making that funny noise when you take it to the mechanic, the speaker started working!

I am going to attribute it to the mere action of posting to AskUbuntu!


Getting root access to a hard drive connected via USB?

You'll have to set the filesystem permissions on the filesystem, not the block device. So, you'll run chmod on /media/mountpoint, not on /dev/sdx. In any case, root always has complete access to everything, so if you run gksudo nautilus, you won't have any problems accessing any files.

It is not unusual for users to have the /home on a different partition. This enables you to reinstall Ubuntu without loosing any personal files or settings. That may be the case. You should look through the other partitions and see what they contain.

You can run a smart-test on the drive to see how badly damaged it is. From what information you provide, it is not possible to know much about the state of the disks. "died" doesn't say anything at all.


Install problem indy 10.2.xx on ubuntu 16.04 - lazarus 1.6 - fpc 3.0.0

first download indy from the repo
Unzip the component from file tar.gz (must be this file, the "zip file" does not work) in directory $(LazarusDir)\components;
Go to directory $(LazarusDir)\components\indy-10.2.0.1\ and to create inside them a directory named "saved"
Copy the content of the directory $(LazarusDir)\components\indy-10.2.0.1\lazarus\ to directory "saved" created above;
Copy the content of directory $(LazarusDir)\components\indy-10.2.0.1\fpc\ to directory $(LazarusDir)\components\indy-10.2.0.1\lazarus, and rewrite all files, ok;
Get the content of directory "saved" and copy inside of $(LazarusDir)\components\indy-10.2.0.1\lazarus and you can delete "saved" directory now;
7.Install the package laz.lpk (available in $(LazarusDir)\components\indy-10.2.0.1\lazarus\indy) by this way:

Open the package
compile it
compile it again / no cleaning / no build all / just plain compile
Build Lazarus (but do NOT select any "clean" option)


Help! Can't boot Windows 10 after installing Ubuntu 14.04

Yep, gone...
Did you choose this option when installing ?


Uninstalled PHP and php -v always returns 7.1.4

I also had the same issue. You have to sudo apt-get purge php*.


ecryptfs - unknown password and possibly lost

If the password you wrote down was the unwrapped passphrase, then you should be able to mount the data by using mount and specifying ecryptfs as the filesystem type, like so:

mount -t ecryptfs my_encrypted_data my_encrypted_data   # yes, you can use the same directory as a mountpoint.

Answer the questions accordingly (probably leave everything as default).

Use password managers and make backups.


I just had the same problem today and was able to fix it by removing the hdd from the system and then putting it back in.... (i tried about 20 different things) but it worked and my battery is now happy and healthy charging away again


According to the ppa, budgie is not currently available for your Ubuntu version.

Here's a snapshot:

Also, if you really want to install the DE then force install the package using the following command, this will also tell you about all the dependencies. So, then you can install them individually later.

sudo dpkg -i --ignore-depends=package_name package_name.deb

EDIT:

Well regarding libupower-glib1, its available under archive.ubuntu.com, i.e., it should be available by default. Here is a screenshot to confirm that:

And about libmutter0d, you are in bad luck, because Launchpad Ubuntu status shows it to be deleted. Here is a screenshot:


Where can user inform Ubuntu Snap Store to update snap from third-party?

Via the CLI
If an application is a snap, you can find the contact info of the third-party publisher by running snap info snap-name.
$ snap info foliate
name:      foliate
summary:   A simple and modern eBook viewer
publisher: John Factotum (johnfactotum)
store-url: https://snapcraft.io/foliate
contact:   https://github.com/johnfactotum/foliate/issues
license:   GPL-3.0+
description: |
...

The contact field shows you how to contact the publisher.
Via the Snap Store website.

Go to https://snapcraft.io/store
Search for the snap
Go to the listing page of the snap and click on the "Contact" link below the description.

Snap Not found?
If you can't find the snap in the online snap store, that means it comes from the regular Ubuntu APT repositories. These can only be updated together with Ubuntu itself, so either you upgrade to a newer Ubuntu release, or you contact the developer of the application and ask them to create a Snap.
VirtualBox, for example, is not available as a Snap yet.
Contact info not found?
Some publishers have not filled in the contact info for the Snap. In that case, you will have to use Google to find who is responsible for the Snap.


For 11.04 and earlier:
Are you installing it from the Ubuntu Software Center?

Go to Applications->Ubuntu Software Center.
Click on Canonical Partners
Click the Adobe Flash Plugin 11 and click install.

Note: this is the method I use on my 64-bit Ubuntu install and it has yet to fail me.


I believe the contents of /dev are automatically rebuilt when you reboot.

To quote someone else:

  When you start the system, the "udev" facility examines the hardware configuration (according to established rules) and dynamically creates the entries in /dev.


What are these comments next to postgres processes in ps?

Any program can change what ps calls it, see man 3 setproctitle :

NAME
     setproctitle — set process title

LIBRARY
     Utility functions from BSD systems (libbsd, -lbsd)

SYNOPSIS
     #include <sys/types.h>
     #include <bsd/unistd.h>

     void
     setproctitle_init(int argc, char *argv[], char *envp[]);

     void
     setproctitle(const char *fmt, ...);

DESCRIPTION
     The setproctitle() library routine sets the process title that appears on
     the ps(1) command.


How to get previous behaviour of alt-tab task switcher in 11.10

Pressing Tab or the up arrow key ↑ will close the preview.


Lubuntu 12.04 change screen brightness. Lenovo ThinkPad

You might want to take a look at your system settings -> power settings.

http://imageshack.us/photo/my-images/809/screenshotfrom201302081.png/

I dont know if you have the same settings though, since mine is mint 14...


Try reinstalling lightdm:

sudo apt-get --purge remove lightdm
sudo apt-get install lightdm


Stuck between upgrade versions -- Ubuntu

You might try dropping into a shell and chrooting to rescue the installation.  Here's a link: http://administratosphere.wordpress.com/2011/11/02/rescuing-an-interrupted-ubuntu-upgrade/

You could boot into a rescue shell, or use the CD.  If you use the CD, make sure you mount all your partitions.  Then open a terminal and chroot to your installation:
ie, type (replace with appropriate path):

chroot [pathtoMountedInstallation] /bin/bash

That will change the terminal to think that your installation is the root.  Then you can:

sudo dpkg --configure
sudo apt-get update
sudo apt-get dist-upgrade

Hopefully that will work, but it may depend on when the upgrade failed.


How get access to mounted usb drive on a Remmina remote windows 10 desktop

in remmina 1.4.8 (I use the snap package) there is an option to bind USB devices called 'USB device redirection' under the Advanced tab of the connection. Still a bit hardwork to find out what and how to bind as there's only a tooltip explaining only a few things.
Pointed out here: https://gitlab.com/Remmina/Remmina/-/issues/2049


Administrator account with no password is unusable

Here's a shorter one if you can still log in:

Open Terminal
Type "passwd."
You will be asked to type your new password right away since you
currently have none. Type away!

Done!

I had this problem too just yesterday. I changed the admin password at the login options to none so I wouldn't have to type anything at login. That was terrible placement because the password at the log-in options is "the password." You can't have an administrator without a password but it's a bug that it allows you. Fortunately, I had auto login turned on.


Finding certain strings with grep (or similar)

Two methods: with regular expressions:

grep "phrase1 .* phrase2" file

This search for phrase1, one space, a string of characters that could be whatever you want, another space, and the phrase2, anywhere in the line (it matches lines that have more material before "phrase1" and after "phrase2")

If the two phrases have to be at the start and end of the line, see @AndreasT answer: you can use ^ and $ to "anchor" the regular expression at the start and end of the line.

If you want to match just numbers between the two phrases, the answer by minerz029 is the correct one; "[0-9]+" matches a repetition of digit ("+" means "a sequence of at least one character").

If you want just numbers and phrase1 and phrase2 must be at the start and end of the phrase, combine the twos:

grep "^phrase1 [0-9]+ phrase2$" file

Or the "trick"/hack...

grep "phrase1" file | grep "phrase2"

Explication: the first command search for all the occurences of phrase1, then "pipes" the resulting lines as input to the second grep, that outputs all the lines that matches phrase2.

However, as noticed by @AndreasT, this second method matches the reversed "phrase2...phrase1" pattern, which could be unwanted.


I have a problem with my monitor mode for wireless

If it used to work but doesn't now, try the following command in terminal:

sudo apt-get install aircrack-ng

thiswill tell you if the latest version is installed, or install it if it not found.


x-systemd.automount & CIFS shares in fstab

systemd was introduced in ubuntu 15.04.

After adding x-systemd.automount to an fstab line, you need to run:

sudo systemctl daemon-reload

and then one, or both, of the following:

sudo systemctl restart remote-fs.target
sudo systemctl restart local-fs.target

only then will the automount become active.


What do the "no"s mean, in the output of unity support test?

GLX texture from pixmap is an extension that can be used to create an OpenGL texture from the contents of a X11 pixmap (such as the contents of an application window).  This functionality is required to efficiently use OpenGL to render window contents to the screen (the alternative being to suck the pixel data into the window manager and then create a texture manually).

GL npot or rect textures refers to the ability to create textures of arbitrary dimensions.  Earlier graphics hardware could only work with square textures whose dimensions were a power of two (e.g. 2, 4, 8, 16, 32, etc).  The npot part stands for "non power of two".  If you are dealing with window contents as textures, this is pretty important.

GL vertex program and GL fragment program are extensions used to program parts of the OpenGL pipeline.

GL framebuffer object is an extension to allow off screen rendering.  Traditionally OpenGL operations render directly to the screen.  Rendering off screen allows the resulting image to be processed further (e.g. used to create a texture for further rendering.

GL version is 1.4+ is just checking what version of OpenGL the driver claims to support.  This check would be to determine whether the driver supports a minimum baseline of functionality required by that version of the specification.


Change IP address when wireless is on hotspot mode

There is no such a thing as IP conflict for different Interfaces(networks), if you're using DHCP.
You could try finding rfkill on your logs to see if you have a "friend".


There are two issues here - really three - that have combined to cause the issue you reported.
One is a bug in gvfs ( gvfsd-smb-browse ) that is hard-wired to use SMB1 ( NT1 ) to get a list of the servers and their shares when you browse for them in your file manager.
The second one is Sambas decision to disable ( but not remove ) SMB1 on both the client and server side.
Your samba server can run between SMB2.02 to SMB3. The bug in gvfs causes the samba client to try to access that server using SMB1 which the server cannot understand so it throws an error:

Failed to retrieve share list from server: Invalid argument

There are three ways to get around this issue:
[1] Bypass gvfsd-smb-browse by asking for the server and its share in Connect to Server: smb://server-host-name.local/share-name
Samba client and server will connect using SMB3.
[2] OR do what you just did and set the min server and client to SMB1 ( NT1 ). IT will also connect using SMB3 because the server and client negotiate with one another to determine the best dialect to use after the initial SMB1 connection.
[3] OR use a mount.cifs mount which will also connect using SMB3. This has to be set up in fstab to happen automatically.
If it makes you feel any better a newly installed Win10 machine will not be able to "discover" your samba server at all because it too disabled SMB1. The solution there is the same as for your Linux system: Connect with a \\server-host-name.local OR enable SMB1 on the client side of Win10 which Microsoft really doesn't want anyone to do.


Ubuntu 18.04 LTS:

Gets the list of updates for connected hardware:

fwupdmgr get-updates

Updates all firmware to latest versions available:

fwupdmgr update

Noteworthy:

Get all devices that support firmware updates:

fwupdmgr get-devices

Downgrades the firmware on a device:

fwupdmgr downgrade [DEVICE_ID]


Can I make gedit embedded terminal cd automatically to the current file's directory?

To my own surprise, it can be done. In the 45 minutes I tested it, it worked quite well actually, and didn't fail on me once.

Nevertheless, it should be considered an experimental option, since it is done completely "from outside", so to speak, with the help of xprop, wmctrl and xdotool. To use it, you will have to accept a few peculiarities: it works well as long as you have all files tabbed in one window, and your mouse click, to select tabs, should be a real click: if you "hold" the click, the tab is opened in a new window.

You should also be aware of the fact that the different gedit tabs (files) share one embedded terminal window. That means that the cd command will be performed on tab switch, no matter what might be running in the terminal.

Alltogether, you will have to see if it works stable enough in your situation and if it behaves well in the way you use it.

How it works

The main trick is based on the fact that gedit by default has the file's directory in its window name. That is used to extract the targeted directory, and set it, if it changes (by clicking another tab of the gedit window).

A script, running in the background, checks:

if gedit runs (at all)
if so, it checks if the frontmost window is a gedit window
if that is the case, it checks if the currently frontmost file's directory is different from the last check, so another tab must have been clicked (since 1 second ago). This also prevents needless cd actions if two tabs work in the same directory (that is: if all files are tabbed in one window).

Then, if a cd action is needed, the script moves the mouse to the middle of the gedit window (x-wise), 70 px from the bottom of the window (y-wise), which will definitely be on the terminal section of the window. Then it clicks, types thecd command + Enter. You will hardly notice, since the mouse is moved back to its original position. You will need to give it time (appr. 0.5 second) to perform the cd before you continue to work, but again, You will probably not notice the delay at all.

How to use

If not yet on your system, install wmctrl and xdotool first:

sudo apt-get install wmctrl
sudo apt-get install xdotool

Copy the script below into an empty file, save it as set_directory.py
Run it by the command:

python3 /path/to/set_directory.py

I suggest you run it from a (minimized) gnome-terminal window while you are working with gedit + embedded terminal; to have it running permanently seems a bit overkill for such a specific task.

The script

#!/usr/bin/env python3
import os
import subprocess
import socket
import time
home = os.environ["HOME"]
last_dr = ""

def get(cmd):
    try:
        return subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8").strip()
    except:
        return ""

def execute(cmd):
    subprocess.call(["/bin/bash", "-c", cmd])

def get_windowid():
    cmd = "xprop -root"
    frontmost = [l for l in get(cmd).splitlines() if "ACTIVE_WINDOW(WINDOW)" in l][0].split()[-1]
    return frontmost[:2]+"0"+frontmost[2:]

def get_dirfromname(name):
    dr = name[name.find("(")+1:name.find(")")].replace(" ", "\\ ")
    if "~" in dr:
        dr = dr[dr.find("~"):]
    if os.path.exists(dr.replace("~", home+"/")):
        return dr
    else:
        return None

def cd(coords, dr):
    currmouse = get("xdotool getmouselocation").split()[:2]
    currcoords = (" ").join([it.split(":")[-1] for it in currmouse])
    x_set = str(int((int(coords[0])+int(coords[2])/2)))
    y_set = str(int(int(coords[1])+int(coords[3])-70))
    execute("xdotool mousemove "+x_set+" "+y_set+"&&xdotool click 1")
    execute("xdotool type 'cd "+dr+"'"+"&&xdotool key KP_Enter")
    execute("xdotool mousemove "+currcoords)

def update_directory():
    global last_dr
    try:
        pid = get("pidof gedit")
    except subprocess.CalledProcessError:
        pass
    else:
        wid = get_windowid()
        wdata = get("wmctrl -lpG")
        wdata = [l for l in wdata.splitlines() if pid in l and wid in l] if len(wdata) != 0 else []
        if len(wdata) != 0:
            wdata = wdata[0]; coords = wdata.split()[3:7]
            wname = wdata.split(socket.gethostname()+" ")[-1]
            dr = get_dirfromname(wname)
            if dr != None and dr != last_dr:
                time.sleep(1)
                cd(coords, dr)
                last_dr = dr

while True:
    update_directory()
    time.sleep(1)

Automatically set the working directory to the currently front most file:

cd on tab switch

The built-in cd menu of the gedit terminal

An alternative, almost with the same comfort, could be the gedit terminal built in function. It only takes two mouse clicks (one right- one left):

Right-click with the mouse in the terminal window
Choose "Change Directory" and the terminal window will cd to the currently frontmost  file's directory:


The license agreement comes from the Oracle Java 14 package, not the Ubuntu Java 14 package. Use the Tab and Enter keys to accept the license in the Oracle license agreement window that pops up.

There is no license agreement for the Ubuntu version of openjdk-14-jdk.  Remove the non-default software sources from your /etc/apt/sources.list file with How do I restore the default repositories? and run sudo apt update to refresh the list of available software.
Now you are ready to install Java. To manually download and install openjdk-14-jdk alongside openjdk-8-jdk and openjdk-11-jdk in Ubuntu 20.04 open the terminal and type:
sudo apt update
sudo apt install openjdk-8-jdk openjdk-11-jdk
cd ~/Desktop/
wget http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-14/openjdk-14-jre-headless_14.0.2+12-1_amd64.deb http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-14/openjdk-14-jre_14.0.2+12-1_amd64.deb http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-14/openjdk-14-jdk-headless_14.0.2+12-1_amd64.deb http://mirrors.kernel.org/ubuntu/pool/universe/o/openjdk-14/openjdk-14-jdk_14.0.2+12-1_amd64.deb
sudo apt install ./openjdk-14-jre-headless_14.0.2+12-1_amd64.deb ./openjdk-14-jre_14.0.2+12-1_amd64.deb ./openjdk-14-jdk-headless_14.0.2+12-1_amd64.deb ./openjdk-14-jdk_14.0.2+12-1_amd64.deb


With a dual-boot system, any partition changes can be dangerous.  Make a clonezilla (or similar program) backup of your entire drive before making any changes to your system.  This way, if you muck it up, you can always restore the image and try again.  I cannot stress this enough.  Make a good backup first!

If you boot into windows (Vista or newer), you can use the drive management system to shrink your windows partition.  (Control Panel -> Administrative Tools -> Computer Management -> Disk Mangement) Right click on your windows partition, and click Shrink Volume.  Then, re-boot into Ubuntu and use Gparted to increase the size of the Ubuntu partition to take up the newly freed space.

Gparted is your best bet for resizing your linux partition.  Windows is your best bet for resizing your windows partition.

If done in that order, you should be good to go!


I already answered your question in another forum, but in the meantime I solved my problem with my wpn511 pcmcia card in 12.04!
Now I can say it runs without any problems. At first the internet speed was very slow and unstable, but then I googled my way out of it. It was a pain in the a**, but I eventually did it and it is quite simple:

Ubuntu 12.04 already comes with the atheros chipset driver you need (ath5k) for the wpn511 pcmcia card, but it seems to be badly configured. So what you have to do is:

In Terminal: sudo nano /etc/modprobe.d/ath5k.conf
Add line or write it as the first line as the file was empty, like in my case: options ath5k nohwcrypt=1
Save (Ctrl-o, then enter)
Enjoy

Hope this helps!


Installing Ubuntu 12.04 on iMac 21.5 using wireless keyboard!

No. The bluetooth daemon has not been started when you're running the installation, it starts when you enter the desktop environment. That's why you can use it with the Live CD but not in the installation process. You should get a wired keyboard (a cheap USB keyboard will do fine, perhaps some friend has one spare) and keep it around - if your computer crashes and you have to do something related to grub or using the terminal before the desktop environment has been started, you will need it.

I'm using an Apple Wireless keyboard myself, but I have a wired Apple keyboard in the drawer for this sort of occasion.


Why does my Ubuntu 14.04 desktop light up my Webcam on startup and login?

What is watching me?

Nobody. Without any proof (I did google for it a little bit): I seriously doubt that a webcam can transmit a stream to the outside world before the desktop is active. It would be very complicated to make software to do that and it would require you to install it yourself.

  And why does this happen?

It is the device being detected by the system. First when the USB system is started the camera gets powered up it will tell you by flashing the light. And the second time will be due to the program that is started during boot to use that webcam (that will probably be the program "cheese" or "skype") that checks if it can find a camera. That again triggers the light to flash.

If you want to get rid of the second one: disable the program to start at boot time and start it manually when you want to use the webcam. If it is indeed during login check "dash", "startup applications" and check for programs that can use webcams; if there is one you could disable it there.

If you want to get rid of the first one you probably need to unplug it before booting (that will also get rid of the second time). As soon as you plug it in it will flash when the webcam gets detected by the system.

Some independent topics related to this (and not per se Linux):

classroom.synonym.com
e-how.com

Use common sense. if it always flashes during boot and always at those two specific moments with every boot I would expect this to be normal behaviour of that webcam.

When you need to worry about it flashing is when it flashes during normal operation; When you are using your computer and not using the webcam. If it flashes then you should investigate this.


My PC slows down after long time computing

Rather than file cleaners like BleachBit, what you need is a RAM optimizer.  Your slowdown is happening due to garbage accumulation that requires ever-increasing amounts of (relatively slow) swap usage.  It's mainly a problem when you're opening and closing programs frequently, and will likely be a bigger problem with software that has a large RAM footprint -- but it will always eventually occur in any system that stays up long enough.

A RAM optimizer will pro-actively find and release RAM blocks that belong to processes that are no longer running, allowing new processes to use those blocks.  Most of them also reallocate RAM to move existing blocks to be contiguous, so that the free RAM is all one chunk instead of a lot of little pieces.  Processes are supposed to release these blocks before terminating, but it doesn't always happen; this is generically called "memory leakage".

I haven't found it necessary to run a RAM optimizer in my own Ubuntu experience, but I have to restart for kernel updates often enough that garbage buildup isn't a major problem for me.  With the problem you report, however, it's likely a RAM optimizer will greatly reduce your slowdown.


It is possible.

You need to install qemu-user-static on your x86/x86_64 computer:

sudo apt-get install qemu-user-static

Let's assume that your rootfs is mounted to /mnt.

Then try:

sudo cp /usr/bin/qemu-arm-static /mnt/usr/bin/
sudo cp /etc/resolv.conf /mnt/etc/resolv.conf

cd /mnt
sudo mount --bind /dev dev/
sudo mount --bind /sys sys/
sudo mount --bind /proc proc/
sudo mount --bind /dev/pts dev/pts
#sudo rm /mnt/etc/ld.so.preload # not sure about this
sudo chroot .


You need to install the package httpie to use the http command.


Assuming your have Ubuntu 12.04 and are using Unity, you can access these games by opening the Dash. (You can use the Windows [Superkey] to open the dash)

When the Dash is opened simply type Free Cell , Pacman for Frozen Bubble and respective icon will appear.

You can drag each icon to the launcher if you wish them to appear there for future use. (Hold the mouse on the Icon, drag it to the launcher then release the mouse button)

For more information on how do do this and other options for opening applications please review this question and answer


Access device with XRDP from an outside connection or network

as others mentioned, you should look up about port forwarding. Another thing that you might need is a STATIC IP, which you can get where I got mine: dyndns.org
I access my ubuntu on XRDP all the times from outside my network


When running commands with && how can I keep it running when one command fails?

That's the whole point of && - ensuring that the previous command succeeded before running the next. If you don't need that, use ; instead. The following will echo foo:

false; echo foo

And the following won't:

false && echo foo

See Bash manual, section List of Commands:

  Commands separated by a ‘;’ are executed sequentially; the shell
  waits for each command to terminate in turn. The return status is the
  exit status of the last command executed.

  AND and OR lists are sequences of one or more pipelines separated by
  the control operators ‘&&’ and ‘||’, respectively. AND and OR
  lists are executed with left associativity.

  An AND list has the form

command1 && command2

  command2 is executed if, and only if, command1 returns an exit
  status of zero.

  An OR list has the form

command1 || command2

  command2 is executed if, and only if, command1 returns a non-zero
  exit status.


Installing Ubuntu 18.04 on systems with AMD APUs: Split screens, or even outright failure to see anything!

This split screen problem could be solved with a simple trick. You insert your usb drive, start the PC, when the GRUB2 screen shows up press E on your keyboard (no upper case). A black screen with set parameters will open. Find the line linux/boot ending with quiet splash. Insert nomodeset before quiet splash. Then press Ctrl-x or F10 to start. You should have a full screen for your installation.


HP Laserjet P1108 Not working in Ubuntu 16.04

My HP LaserJet Pro MFP M125nw was stuck on Idle, and I solved it with the following steps:
(If you have already installed the printer, skip to step 3.)

installed the printer using the Printer program,
installed with the Install button within that program,
ran sudo gedit inside of the terminal,
then printed a page.

In my case, the sudo print with this printer selected initiated the automatic driver installation program. The first attempt did not print for me, but works after the driver installed.

Hope this helps.
-D


Mouse suddenly broken in KDE 12.04, Gnome 12.04 and Ubuntu 12.04, works in Xfce

Use a USB > PS2 adapter to connect your mouse to your PC.
or
Use a different mouse.

It looks like this was a bug in 9.04 for your specific mouse and may not have been resolved: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/364651 using the PS2 port was a work around mentioned.

Using a different mouse will also help determine if the issue is specific to the mouse or just a general issue with all mice you attach to your system.

If your are using a USB hub there could also be issues with how it is operating. I have not had good luck with powered USB hubs, so if you are using a powered hub you can try disconnecting the power (as long as you are not running a hard disk off of it the 500ma that it pulls form the port on the computer should be sufficient mice and keyboards are going to pull about 100ma each)


13.04 nvidia GeForce 8800 GTS - no second monitor and other problems

Install latest nvidia drivers

sudo apt-get install nvidia-313-updates

Enable nvidia drivers to manage your graphics

sudo nvidia-xconfig

Then execute

sudo software-properties-gtk which will show you a window like this

and select the latest driver from that list.

And then do

sudo reboot


When installing user applications, where do "best practices" suggest they be located?

That depends, really. If the application has a makefile, or for example for python apps if the application uses distutils (e.g., has a setup.py file), or a similar build/install system, you should install it into /usr/local/.  This is often the default behavior.

From what I understand, /usr/local/ has a hierarchy that is similar to /usr/. However, directories like /usr/bin/ and /usr/lib/ are usually reserved for packages install via apt. So a program expecting to get "installed" into /usr/ should work fine in /usr/local/.

If you just need to extract a tarball and run directly (e.g. Firefox) then put it into /opt/. A program that just needs one directory and will get all files/libraries relative to that directory can get one directory for itself in /opt/.


How to get conky work even in lock screen?

This is possible with xscreensaver:

1) Install xscreensaver

sudo apt-get install xscreensaver xscreensaver-data

2) run "xscreenserver-demo" once in order to create an initial configuration file

xscreensaver-demo

3) Edit the configuration file .xscreensaver in your home directory

gedit ~/.xscreensaver

4) Append the following line to the list of programs (in my case, directly after the line containing "unicode -root \n\")

"Conky"  conky -q --window-id=$XSCREENSAVER_WINDOW -c ~/.conkyrc-screensaver \n\

5) Put your conky config file under the name .conkyrc-screensaver in your home directory.

Here an example for a sample conky config file for displaying the cpu load:

wget http://pastebin.com/raw.php?i=iBD8bHqj -O ~/.conkyrc-screensaver

6) Start the xscreensaver daemon and open settings in the opening window

xscreensaver &

7) Select "Conky" as screensaver

You can find more information on how to set xscreensaver as default screensaver in Configure screensaver in Ubuntu.

Source: How To: Conky as a Screensaver for xscreensaver


Easiest way to move from Ubuntu to Windows?

I think you can get the activation code from BIOS with some help from this article.

Your general approach is fine, but to be really sure to not loose anything, I'd just make space for a windows partition and try to keep your current install. Have a look this answer and try to adapt it to your situation.


I had this problem before.  To solve it I removed .juju/environments/azure.jenv and bootstrapped again and it worked.  Your mileage may vary, however.  Also, i had to add --upload-tools to the bootstrap command.

edit: that was then, but now I can't seem to replicate my earlier success, I am getting a different error, described at juju bootstrap fails in Azure (BadRequest - The affinity group name is empty or was not specified.).  So, I can't promise that this will solve your issue.


How do I install Ubuntu through virtual box?

When you reach the 'Installation type' screen, you should choose the first option which is usually the simplest. Seeing as you're in a VM, you shouldn't have any problems with other OSes or partitions.

Just choose the 1st option here:


How to configure GNOME 3 to show icons on desktop

It can be reversed in gnome3 so if this is implemented the same should be true.

  Where are my icons on the desktop?

  They are gone, it’s by design. But you
  can reenable them with:

gsettings set org.gnome.desktop.background show-desktop-icons true

  and starting
  nautilus (if it’s not already
  running). (Thanks to bronte for the
  information)

Source


Testing nginx in a Docker container in on Ubuntu Core?

nc (netcat) will do the trick.

nc 127.0.0.1 32771
GET / HTTP/1.1
Host: 127.0.0.1
User-Agent: netcat

32771 is the random port in my case,
a detailed explanation is available here:
download a URL by netcat


Error when trying to connect to VPN on startup

The problem seems to be, that your password in keyring is not accessible.

Source

Solution mentioned there is to open file /etc/NetworkManager/system-connections/ConnectionName and set the

password-flags=0

and add the below lines to the file

 [vpn-secrets]
 password=YourPassword

Then restart network manager to pick up the change:

 sudo restart network-manager

For more info refer the source


Broadcom Wireless card pass-through into Ubuntu VM

I had a similar issue with internal machines not picking up my card so I created a new virtual network in virt-manager with NAT set to forward to my wireless card. I then use virtio and just select that network in the VM settings.

edit - I don't know if you would be able to interact with the wireless card in the way you described using this method, so perhaps its not a canonical answer


What I do is the following --- it is not as versatile as you asked, but it works almost ok. You need to have all your printers defined, and then you need these two scripts:

stop_printers:

#!/bin/bash -f
#
allp=(`cat /etc/printcap | tr "|" "\t" | cut -f 1 | grep -v "#"`)
for i in ${allp[@]}; do
    echo -n Printer $i:
    cupsdisable "$i"
    echo " " paused.
done

start_printers:

#!/bin/bash -f
#
allp=(`cat /etc/printcap | tr "|" "\t" | cut -f 1 | grep -v "#"`)
for i in ${allp[@]}; do
    echo -n Printer $i:
    cupsenable "$i"
    echo " " restarted.
done

You have to put them in your path (for example ~/bin) and make them executable with chmod +x. CAVEAT: I do not have any printer with spaces in their names. The scripts are not tested in that case (but I am sure that one of our shell script's gurus will fix the scripts in a flash ;-)... )

Now, you can issue:

[romano:~] % stop_printers
Printer PDF:  paused.
Printer ColorDEA:  paused.
Printer Deskjet_6980:  paused.
Printer fotocop5:  paused.

And you can print from wherever you want, the printer will be paused:

You can see your queue:

[romano:~] % lpq -PDeskjet_6980
Deskjet_6980 is not ready
Rank    Owner   Job     File(s)                         Total Size
1st     romano  439     Bones_3+RG.pdf — Flesh depth  125952 bytes

(AFAIK, the print queues are persistent across reboots). And when you want to print:

[romano:~] % start_printers
Printer PDF:  restarted.
Printer ColorDEA:  restarted.
Printer Deskjet_6980:  restarted.
Printer fotocop5:  restarted.

Using lprm you can remove a job if you need to; lpr to enqueue a document via command line, and if you want different "lists", no one forbids defining the same printer several times with different names.

You can also resume  each printer by hand, it's just a matter of running cupsenable <printername> from the prompt.

What I do not think you can do with this solution is changing the print options after the fact --- you will have to dequeue and re-enqueue the document for this.


Visual boy advanced emulator runs too fast

This has been a launchpad issue for the last few versions of this particular emulator.

Suggestion would be to use an alternative emulator such as Mednafen (install from software center)


you may need to update your version of Ubuntu to 12.04 to take advantage of the newer versions of LibreOffice.

Remember some newer software does not always work on older operating systems.

If you do decide to update your version of Ubuntu all you need to do is go to update manager > settings > then make sure you have notify me of new Ubuntu version (go with the LTS versions) and that will give you the option to download a newer version of Ubuntu and plus an updated version of LibreOffice


Why do I get contradicting Ubuntu versions?

Let's break-down your issue into two parts:

Your current Ubuntu version from the output of /etc/apt/sources.list
Your current Ubuntu version from the output of everything else.

Now, to the explanation:

From Ubuntu.

The only lines that gets upgraded in that file are the lines that starts with deb, deb-src, #deb or #deb-src because

  Ubuntu uses apt for package management. Apt stores a list of repositories or software channels in the file.

If there are any other lines in the file that are uncommented and doesn't start with deb, etc. then the command sudo apt-get update will produce errors.

But the main part relevant to you is that the file doesn't get updated as a whole but the lines in them that are stated above. So, the file is basically the same one as the time when you installed Ubuntu and to make it more clear you installed Ubuntu 12.04.1 LTS to start with and upgraded your way to 12.04.5 LTS.
Now, for the second part,

From lsb-release --help:

-v, --version      show LSB modules this system supports
-u, --upstream     show upstream LSB data
-i, --id           show distributor ID
-d, --description  show description of this distribution
-r, --release      show release number of this distribution
-c, --codename     show code name of this distribution
-a, --all          show all of the above information

i.e., the command lsb_release -a gives you the exact information as to what your current version of Ubuntu is.

Also about your other question regarding kernels, the latest kernel that is available for Precise is 3.13.*. So, everything's fine with your Ubuntu. But on another note if you want to install the more latest kernels on your current version then you might want to follow this YouTube.

EDIT: As Pilot6 pointed out and from Ubuntu Wiki in 12.04.x Ubuntu Kernel Support section:

It seems that 12.04.5 has kernel version 3.13.*.


Which drivers to install on Ubuntu 16.04 LTS?

You usually do not need any additional drivers, Ubuntu is able to handle most common devices out of the box. This is unless you experience any problems like a not properly working wireless network.

In some cases, you might want to replace the default open source drivers with the proprietary ones provided by the device manufacturer for better performance or support of special features though. This usually applies to graphics cards, mainly nVidia and AMD ones.

You check whether there are additional proprietary drivers available for your specific system by opening the System Settings and clicking on Software & Updates. Navigate to the Additional drivers tab. It takes a while to scan your device and will then offer you a list of devices for which you may chose one of multiple drivers.


Someone knows how to solve error permission denied

Permission is denied when user is not a superuser. not any person can modify your root files (system files).unless u provide authentication to your own machine that you are the superuser. For doing any superuser operation like install remove u have to use the keyword 'sudo' for eg.sudo apt-get update
It will ask you to enter your password(which is not visible when typed) then you can do your operation.


System not checking for updates in Ubuntu 13.04

I found an answer to my own question in this old bug report:

https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/390319

The problem is that the file /etc/cron.daily/apt is not executable.

To solve it, I opened a terminal and entered the following commands:

sudo chmod 755 /etc/cron.daily/apt
sudo rm /var/spool/anacron/cron.daily

(the first command makes the file executable, the second one removes the cron job and it is recreated after reboot)

After rebooting the system I got update notifications again.


juju ERROR subprocess encountered error code 255

I've resolved that thanks to Junaid's suggest


Which DVB-S satellite receivers work with Ubuntu?

If found that the following devices are reported as working with VDR. This usually means that they will work with other software as well:

Hauppauge DEC 3000-s
Hauppauge Nova USB
Technotrend PC-Line USB
Kathrein UFP 500
Pinnacle PCTV 400e
Pinnacle PCTV 450e
Sundtek SkyTV Ultimate DVB-S/S2

I don't know, unfortunately, if you can still buy any of them. My tip is to just try one. Buy one locally and return it if it doesn't work. Generally speaking, many will work.


Syntax for sending notification hint using gdbus or python's dbus module

It's just invalid python syntax. What you do with the strings for hint does not make any sense. Try seeing matching quotes for example.

hint should be:

hint = {'type':'i', 'name':'value', 'value':int(os.system('xbacklight -get'))}


After a quick web search, and a little inventiveness, here's what I came up with.

#! /bin/bash
read -p "Do you want to shutdown (Y/N)" yn
case $yn in
     [Yy]* ) sleep 30 && sudo shutdown now;;
     [Nn]* ) exit;;
     * ) echo "Please answer Y or N.";;
esac

When I ran it, it quit back to command prompt when I selected N, and went to shutdown when I selected Y. However, it seemed to reboot, and when I put in my passwd in the login prompt, THEN it shut down. YMMV. Feel free to expand, test, or change it to your hearts content.

Sorry, didn't read about the time out. Edited post to include it. If you want timeout to be related to how long you have the choice, I'll have to look into it more, but it currently will wait 30 seconds, then shutdown if you select Y.


Wine is used for installing EXE files. Then why am I getting this error?

I agree with @AUmarMukthar, but your problem is a different one: You have a space in the name of your EXE, so you have to enclose it in quotes.

This is the reason for the following error message:

wine: cannot find L"C:\\windows\\system32\\LED.exe"


Most likely the command

sudo tee /etc/modprobe.d/iwlwifi-opt.conf <<< "options iwlwifi 11n_disable=8"

and reboot will fix the wireless problem.


the issue is withing ruby-rvm package installed via apt - use this answer to fix: https://stackoverflow.com/questions/9056008/installed-ruby-1-9-3-with-rvm-but-command-line-doesnt-show-ruby-v/9056395#9056395


Installing Itunes 12 on lubuntu 17.04 32 bit using wine

I am using Ubuntu 16.04.

I am running iTunes12.1.3 32-bit and I was able to purchase a song by VISA on Ubuntu 16.04's iTunes 12.1.3's Store.

I do not have iPhone and iPad, so I cannnot test the integration with those devices. If anyone can test that, please do comment.

How to install iTunes12.1.3 32bit:

Please install Wine2.x Staging.
Please check you have Wine2.18 Staging or newer:

$ wine --version
wine-2.18 (Staging)

If you are running the older version of winetricks before 2017 August, winetricks throws a 404 error, caused by a change of address by Microsoft.

If you encounter that problem, you can run this command.

sudo winetricks --self-update

(I am using the compiled version from winetricks's github)
Run these commands from terminal:

WINEPREFIX=~/.WineiTunes WINEARCH=win32 wineboot
WINEPREFIX=~/.WineiTunes winetricks -q d3dx9 d3dx9_36 directx9 dsound mfc42 vcrun6sp6 comctl32ocx comdlg32ocx gdiplus gdiplus_winxp quicktime72 vcrun2013 ipamona fakejapanese corefonts cjkfonts
WINEPREFIX=~/.WineiTunes wine uninstaller

The packages ipamona fakejapanese corefonts cjkfonts may not be needed for English language. We need them for Japanese.
Install iTunes 12.1.3 32-bit(iTunesSetup.exe) using 'wine uninstaller'. The installer creates the iTunes icon for the desktop automatically.

If you turn on the Autorun option, iTunes is not set to first run automatically. In this case, you run iTunes from its desktop icon.
I think that the Autorun option is a bit dangerous, so test that iTunes is working first, then reinstall it enabling Autorun.

At the last step of installation, you must turn on the first time run option, because if you don't allow it to show the iTunes Quick Tour, it crashes.

If this happens, you must close iTunes Quick tours window extremely quickly, and press the escape key a lot to close.
This is very difficult to close!
To avoid this trouble, at the first run of iTunes, you must open Help > iTunes Quick Tour and close.
Run Quicktime:

 WINEPREFIX=~/.WineiTunes wine ~/.WineiTunes/drive_c/Program\ Files/QuickTime/QuickTimePlayer.exe

Automatically update option is turned off.
If there's a URL error just press OK

Open Edit > Settings > Quicktime settings
Change Video section's DirectX to safe mode (GDI only)
Press [required?] OK
During the installation process, if you encounter an error dialog  such as mscorsvw.exe causes trouble seriously dialog????, to kill the zombie process, remove the ~/.WineiTunes folder and reboot Ubuntu, and re-install iTunes.

If you want to uninstall, please remove ~/.WineiTunes folder.

I also explained this procedure in this YouTube video, and in this post on the Japanese Ubuntu forum. I think iTunes 12.7 is a bit unstable on Ubuntu 16.04, but I made a videoof my test of iTunes12.7 32-bit and how to install for Japanese.


How to restore /etc/sysctl.conf on Ubuntu 18.04 after overwriting

This is mine.

#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com

# Uncomment the following to stop low-level messages on console
#kernel.printk = 3 4 1 3

##############################################################3
# Functions previously found in netbase
#

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
# See http://lwn.net/Articles/277146/
# Note: This may impact IPv6 TCP sessions too
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6
#  Enabling this option disables Stateless Address Autoconfiguration
#  based on Router Advertisements for this host
#net.ipv6.conf.all.forwarding=1

###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Do not accept ICMP redirects (prevent MITM attacks)
#net.ipv4.conf.all.accept_redirects = 0
#net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
#net.ipv4.conf.all.send_redirects = 0
#
# Do not accept IP source route packets (we are not a router)
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv6.conf.all.accept_source_route = 0
#
# Log Martian Packets
#net.ipv4.conf.all.log_martians = 1
#

###################################################################
# Magic system request Key
# 0=disable, 1=enable all, >1 bitmask of sysrq functions
# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html
# for what other values do
#kernel.sysrq=438

Funky: it has no active lines. All are comments.
edit: we probably don't use it and use /etc/sysctl.d/.

See /etc/sysctl.d/ for additional system variables.


Problem with USB Keyboard and Mouse on Raspberry Pi 4B with Ubuntu 20.10

Workaround (inspired by this):
Edit /etc/gdm3/custom.conf and change #WaylandEnable=false to WaylandEnable=false.
I also posted our problem here to make sure developers are aware of it.