What's the lightest Ubuntu desktop environment?

Definitely Lxde
or Xfce.

First remove Unity with this command (make a backup before proceeding for safety!):

sudo apt-get autoremove --purge unity unity-common unity-services unity-lens-\* unity-scope-\* unity-webapps-\* gnome-control-center-unity hud libunity-core-6\* libunity-misc4 libunity-webapps\* appmenu-gtk appmenu-gtk3 appmenu-qt\* overlay-scrollbar\* activity-log-manager-control-center firefox-globalmenu thunderbird-globalmenu libufe-xidgetter0 xul-ext-unity xul-ext-webaccounts webaccounts-extension-common xul-ext-websites-integration gnome-control-center gnome-session

then:

sudo rm /usr/lib/thunderbird-addons/extensions/messagingmenu@mozilla.com.xpi

Now, to install Lxde run this command:

sudo apt-get install lubuntu-desktop

or for Xfce this one:

sudo apt-get install xubuntu-desktop

Lastly, reboot and enjoy!

Hope this helped you.


Nuvola Player - no sound under Ubuntu 13.10

For certain services you need mp3 decoder which is not installed on ubuntu by default.

Depending on gstreamer version installed (you can check by dpkg -l gstreamer*) you need to install

sudo apt-get install gstreamer0.10-fluendo-mp3

or on newer systems

sudo apt-get install gstreamer1.0-fluendo-mp3

You can find whole description in Nuvola FAQ #2011 https://answers.launchpad.net/nuvola-player/+faq/2011


12.04 Ubuntu Software Center won't download when I click install

Try to remove Software Center, and re-installing it.  to do that just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command below.

sudo apt-get purge software-center

and when that's done, do

sudo apt-get install software-center

Then do

sudo apt-get update && sudo apt-get upgrade


USB 3.0 hard drive not being mounted on some reboots

I had a similar problem.  My Seagate USB3.0 drive was not being recognized at the boot time (neither Windows7 nor Ubuntu).  I added a line with the word usb_storage in /etc/modules and it is now being recognized by Ubuntu.

However, Windows7 still has problem recognized it at boot time. I hope someone has a solution for that.


Keyboard layout related issue - fixed in GUI but receive error in terminal

Issue is solved. Added script to ~/.bashrc:

if [ "$TERM" = "xterm" ]; then
setxkbmap -layout "us"
fi


Gnome-shell takes all of cpu after last update of Ubuntu 18.04

Solved.
Just need to update NVIDIA graphic driver to 396 and change display driver in Software & Updates.


Where should I place the .htpasswd file (phpMyAdmin)?

Well, in theory you should be ok with putting your .htpasswd file anywhere in the apache document root since apache default configuration for any file beginning with ".ht" should be this:

<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>

However, I tend to avoid that, and usually put my .htpasswd files somwhere in the apache folder, for example:

/etc/apache2/htpass/.htpasswd

or

/etc/apache2/.htpasswd

I don't think there are any official best practices for this, correct me if I am wrong...


I set an environment variable in /etc/environment, but it's not in printenv using bash.exe with Windows cmd. Why?

There are several methods for bash on Windows

See https://github.com/Microsoft/WSL/issues/24

Basically you add them to ~/.bashrc

If that is not working post your .bashrc

I don't know why /etc/environment is not working.


where are sources for ubuntu sdk qtmultimedia?

Digging deep into synaptic, I was able to find the ubuntu-sdk dependencies and libs and found
qtmultimedia5-dev.  The sources are not installed.  Only the developer headers and compiled libs are installed by default.  That's why I was having difficulty finding them.

Get the sources:

sudo apt-get build-dep qtmultimedia5-dev
sudo apt-get source --compile qtmultimedia5-dev
sudo apt-get install qtmultimedia5-doc

The docs for these are here:

/usr/share/doc/qtmultimedia5-doc
/usr/share/doc/qtmultimedia5-doc-html
/usr/include/qt5/QtMultimedia/

and examples:

sudo apt-get install qtmultimedia5-examples
/usr/lib/x86_64-linux-gnu/qt5/examples/multimedia


Is the windows permission system different from that of Linux?
ANS: Yes. Each OS implements access to files following its own rules.

For example, the rights which can be assigned to a file in Linux are
Read, Write, and Execute. In contrast, Windows permissions are:

Full control
Modify
Read
Read and execute
Write
Special permissions

Why does this happen?
ANS: When this user mounted the Windows driver (and, presumably, its NTFS or FAT32 partition), access was not restricted.

Why does Ubuntu just not block me from accessing them?
ANS: Ubuntu (and Linux in general) have not been told to block their access.

You may notice the access rights of Windows allow greater atomicity, a more detailed set of privileges than does Linux.  Packages do exist which provide more specific levels of access for Linux, if needed.


Use Boot-repair-disk

Boot into your ubuntu os and download the boot repair disk from here and extract it using this to a usb-drive and reboot your laptop and boot up with the usb-drive.

After the boot-repair disk starts up go to the program and open the boot-repair program. Then follow the options and you will be able to fix your boot error.


Get a list of file types that can be opened with a specific application

You can take a look in /usr/share/applications/defaults.list to see a list of file types and their associated apps.

For a specific app, type this into your terminal:

grep "google-chrome" /usr/share/applications/defaults.list

You'll see something like this:

text/html=firefox.desktop;google-chrome.desktop
text/xml=firefox.desktop;google-chrome.desktop
application/xhtml_xml=google-chrome.desktop
x-scheme-handler/http=firefox.desktop;google-chrome.desktop
x-scheme-handler/https=firefox.desktop;google-chrome.desktop
x-scheme-handler/ftp=google-chrome.desktop


I also wish to install Ubuntu on a separate partition.

Yes, it's possible.

  whether or not the boot loader that comes with Ubuntu will interfere with the OS Switch that currently allows switching between Windows 7 and Express Gate Cloud?

Am I correct in assuming that the switch works once you are booted into Windows 7? If so, the Ubuntu bootloader (grub) should not affect it. Of course, you will most probably not be able to switch from within Ubuntu to the Express Gate Cloud (but that's when Privacy Mode comes in handy!).

  My second question is whether or not Ubuntu can be installed on a SDHC, and executed in a similar fashion to EeeXUbuntu?

Yes, it can certainly be installed on the SDHC and executed, provided your eee-pc supports booting from SDHC. Ages ago, my eee-PC 901 certainly did (with Ubuntu!), so I don't see why yours wouldn't. Please note that running Ubuntu from SDHC will be noticeably slower once you start doing things inside Ubuntu.

One option you haven't mentioned is WUBI. This is a Windows installer for Ubuntu which installs Ubuntu on the Windows partition as a virtual hard disk (one large file, minimum 4GB). It then allows you to select Ubuntu at boot-up from the Windows bootloader. This way, nothing critical is changed, and WUBI will certainly be much, much faster than running from SDHC. Besides, it's safer -- what if you accidentally eject the SDHC when you're working?


SD card reader only works if card is inserted during boot

Seems like some people have had better success with the older drivers from Realtek.

However, these have compilation problems on newer kernels. Some people have been able to get around by removing the offending symbols in the source files then installing the module (removing/blacklisting the kernel installed module). See this and this. Apparently there is also a more recent source of the driver mentioned here though it has the same compilation problems which can be fixed as above.

This will be somewhat painful to maintain since it has to be recompiled on every kernel upgrade. Someone has created a dkms package here, and though it is for older 12.04 release, it should be possible to pick up the source deb of that and integrate the patch mentioned above in it.

Still I will suggest trying to get it working with the kernel driver first. I had two suggestions before: a) does it show up in gnome-disks, b) is it enabled in BIOS . In any case I think this should be reported in kernel upstream since the kernel driver is supposed to be created from the GPLed Realtek's driver. Perhaps it has something to do with the "rts5229_ids" list in rtsx.c?


How to install a second graphics card and use 4 monitors?

It is difficult I am using four monitors on Linux Mint 64, this is my /etc/X11/xorg.conf.

Also using the recomended binary driver from Ubuntu0.0.4 nvidia-331 .113

Section "ServerLayout"

#    Screen   2  "Screen2"  LeftOf  "Screen0"
#    Screen   3  "Screen3"  LeftOf  "Screen2"
# Removed Option "Xinerama" "on"
    Identifier     "Layout0"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option         "Xinerama" "1"
    Option         "Clone" "off"
    # You would need one screen for each monitor
EndSection

Section "Files"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"

    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "Unknown"
    ModelName      "LG Electronics W2253"
    HorizSync       30.0 - 83.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

Section "Monitor"
    Identifier     "Monitor1"
    VendorName     "Unknown"
    ModelName      "Philips 190WV"
    HorizSync       0.0 - 0.0
    VertRefresh     0.0
    Option         "DPMS"
EndSection

Section "Device"

#    Driver      "nouveau"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 730"
    BusID          "PCI:1:0:0"
Option "AddARGBGLXVisuals" "true"
EndSection

Section "Device"
    Identifier     "Device1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 730"
    BusID          "PCI:2:0:0"
Option "AddARGBGLXVisuals" "true"
EndSection

Section "Screen"

#    DefaultDepth    24
#    SubSection     "Display"
#        Depth       24
#    EndSubSection
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "DVI-I-1: nvidia-auto-select +0+0, HDMI-0: nvidia-auto-select +1920+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"

#    DefaultDepth    24
#    SubSection     "Display"
#        Depth       24
#    EndSubSection
    Identifier     "Screen1"
    Device         "Device1"
    Monitor        "Monitor1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "metamodes" "DVI-I-0: nvidia-auto-select +1280+0 {rotation=right}, VGA-0: nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Maybe will help, because this was the hardest thing to get


What can I accomplish with a Juju charm?

You can deploy any service juju has a charm for, here's the list of charms.
Not really, juju can use LXC containers to deploy charms, we call this the "local provider". So for example if I want to test deploying MySQL and Wordpress on your laptop juju can use LXC so that you can deploy them both on the laptop as if you were deploying them on EC2 or OpenStack. It would make a container for each one.
Upstart is like SMF. There's no real analogy for juju that I can think of. It's been called "apt for the cloud", except that instead of managing whatever service on individual machines you manage just the service and it manages that over a set of machines, so in that case it's more of a deployment tool than a lower level tool like Upstart or SMF.


how do i install ubuntu on macbook 10.7.5

There are several steps to installing ubuntu. You can find them on the web, but I'll also list them out for you :)

Ubuntu 16.04 will work fine

Partition your drive

When you boot into ubuntu through your bootable medium, select the "try ubuntu" option, not the "install ubuntu" option. Now you can use ubuntu. Open gparted and partition your hard drive. Make a new partition with an ext4 file system. If you don't know how, check out this guide:

https://www.lifewire.com/do-you-need-home-partition-2202048

Alternatively, you can partition your hard drive from the installation menu, just make sure to select the "something else" option.

Install Ubuntu

Now your hard drive is partitioned for installing ubuntu. Follow the instructions and when you get to the "Installation Type" menu, select the "Install Ubuntu Alongside Another OS" option.

Now, you follow the rest of the instructions and wait for ubuntu to install!

Hope this helps to you!

P.S.

If you want more detail, check this out:

https://www.ubuntu.com/download/desktop/install-ubuntu-desktop


In: No such command - trying to create a symlink and 'in' does not work

I see the post header says 'in'. The command name is LN (in lowercase of course). The program is probably contained in some core package like binutils, coreutils like that. You can also try if the sln command is present (it probably won't be there but it's worth a shot). It is the static-linked version of ln.


How to enable systemd user units in 14.10

For me this worked:

systemctl --user enable myunit

The following command shows if the unit is enabled:

systemctl --user status myunit


First of all check your graphic card details using command given on Find Graphics Card/Driver Details
The RAM you specified in question should be 1.5 GB not in MB ,you can check RAM size by clicking on system settings> details or search in your dash for RAM details.
Basically this problem occurs with old graphic cards , you can have a look at what kind of divers and graphic card ubuntu supports here or Unity Graphics Requirement .
The solution as proposed on ubuntu askubuntu website and many other dissussion formus is that:

Either install Light weight versions of ubuntu like Lubuntu or Xubuntu.
After installing ubuntu try for ubuntu 2D, thats works fine for me.


If you'd like to use the USB instead of the internal, blacklist its driver so it won't load. From the terminal:

sudo -i
echo "blacklist ath9k"  >>  /etc/modprobe.d/blacklist.conf
exit

Reboot and let us know how it's working.


There is an easy way to solve it. The problem is not in nvidia-docker, the problem is in nvidia-container-toolkit. You need to change the user who execute nvidia-container-toolkit. To do that, you need to uncomment or add
user = "root:video"
in the file located in /etc/nvidia-container-runtime/config.toml
I hope this help.


You can try:

sudo apt-get install --reinstall ubuntu-desktop

also refer:

How to restore unity after gnome-shell installation?


Ubuntu 18.04 LTS won't boot. BusyBox (initrams) pops up instead. What to do?

It works now.
I just typed exit and hit 'enter'.
It displayed something like
/dev/sda8: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY.
among many other lines. Then I ran fsck /dev/sda8 and typed y for each input request until the (initramfs) was displayed again. Then reboot and enter.
Source


Alternative to Thunar that can access Android fs (Samsung Galaxy Tab S SM-T700) via USB

Try to use gigolo to mount the device.

or

You can try to use mtp type:

fusermount -u /media/mtpdevice/
mount | grep mtpfs


I can't install libtiff on my 64-bit Ubuntu

libtiff has no installation candidate. Your choices are:

sudo apt-get install libtiff4

for Ubuntu 12.04, 12.10, 13.04, and 13.10 ... or

sudo apt install libtiff5

for Ubuntu 14.04-20.04


no permission to run -rwxrwxrwx 1 tux tux 19 Jan 23 12:46 idea_tmp_check.sh file

It seemed to be because of the settings in fstab.

I had no exec-permissions set in the configuration

Changing

LABEL=linux /home ext4 rw,auto,user 0 1

to

LABEL=linux /home ext4 rw,auto,user,exec 0 1

solved it.


Dock disappeared after upgrade to Ubuntu 19.10, only visible in Activities overview

I had the same problem. I uninstalled dash to dock extension and execute this

dconf reset -f /org/gnome/shell/extensions/dash-to-dock/

then reboot.


Problem with installing VBox guest additions in 13.10 (shared folders)

I had the same issue. On my side, the host is WindowsXP and the guest is Ubuntu 13.10.  I was upgrading the guest from 13.04 to 13.10 and at the same time, I've upgraded VirtualBox from 4.2 to 4.3 (in the host).
I was trying to compile the Guest Extensions with
/etc/init.d/vboxadd setup

without success.
Then, I tried from the new Virtualbox ISO:
sudo /media/x/VBOXADDITIONS_4.3.2_90405/VBoxLinuxAdditions.run

It works :-)
I don't know how you tried to compile the guest additions, but maybe trying from the ISO will help you.


Pulseaudio can't enable/disable the S/PDIF ports, this has to be done from ALSA.
Install gnome-alsamixer and there you will see the specific options to enable and disable SP/DIF (or IEC 925 as they call it)


Does the `reset` command wipes up the session memory used by commands?

From man reset:

reset - reinitialization
       When  invoked  as  reset,  tset  sets  cooked and echo modes, turns off
       cbreak and raw modes, turns on newline translation and resets any unset
       special  characters  to  their default values before doing the terminal
       initialization described above.  This is useful after  a  program  dies
       leaving a terminal in an abnormal state.[...]

So it completely reinitializes the terminal session you are in, purging all data (it will still be stored it ~/.bash_history though, delete that if you're feeling secretive). If you just want to reload the settings, you can run . ~/.bashrc. If you just want to have a blank terminal window without resetting, run clear or hit Ctrl + L.


If you are not joking then this can be a mistake. May be there is some web script or a background process running.

So what you can do is:

Close browser and see if animal appears again.
If appears again then type ps -A in terminal and watch for any suspicious process and terminate it as soon as you see it.
If you can not see any suspicious process, restart your computer.
If nothing works feed it what it wants and pray to God that it runs away without harming you.
:D


Open a Terminal and put in:

sudo apt-get remove opera-stable

to remove opera and

 sudo apt-get remove google-chrome-stable

to remove chrome


Is it safe to delete the old kernels from menu.lst?

Safe but pointless. The next time update-grub runs, they'll probably pop back up.

Kernels are installed as packages and so can be removed like other packages.
The massive benefit over just hitting on grub is you will free up hundreds of megabytes of disk space.

They used to be installed as non-auto but can now be safely removed with:

sudo apt-get autoremove

If you have manually installed kernels and various auxiliary packages, you can see the kernel versions installed with this command:

dpkg -l | awk '$2~/linux-(im|he|to).+[0-9]/ {print $2}'

And that'll show you something like this:

linux-headers-3.13.0-24
linux-headers-3.13.0-24-generic
linux-image-3.13.0-24-generic
linux-image-extra-3.13.0-24-generic

From there you can remove things using sudo apt-get purge <package-name>. Just make sure you don't remove your current or latest kernel (uname -a to see what version you're on) and I agree with what other have said, keep the next newest one in case things blow up.

Here's my best effort at detecting and performing this safely:

current=$(uname -r)
kernels=( /lib/firmware/[0-9].* )

dpkg -l | awk '$2~/linux-(im|he|to).+[0-9]/ {print $2}' \
| grep -Ev "$current|${kernels[-1]##*/}" \
| xargs sudo apt-get purge

Notes: This will still trample over tricky situations. It'll remove things like linux-image-generic if you have a HWE stack installed. This may or may not be a big issue for you. Those packages (though they look important) won't cascade-delete your entire desktop. You'll be left with the current (because it works) and the highest version kernels. That may be one and the same if you've rebooted recently.


I've succeed! I' just needed to mess around with:

$ alsamixer -c 0


Try EasyBCD (a Windows software)  http://neosmart.net/EasyBCD/

or,

Rescue Grub2 http://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/

Hope it will help, thanks


14.10 fails to boot from live USB on Alienware 14

First do a MD5 hash check of the ISO to verify it.

In case the ISO is valid, you may be facing an issue because of your GPU, ie Nvidia GTX 765M.

Try the following to make it work.

As soon as you boot from the USB, press any key to enter the splash screen.
Press F6 and select the nomodeset option

Now select Try Ubuntu without installing option and check whether the problem persists.
In case nomodeset does not work, try either acpi=off or nolapic options and try again.

ALTERNATIVELY, you can edit the /boot/grub/grub.cfg on your live USB and add the nomodeset option.

Edit :

What is nomodeset?

The newest kernels have moved the video mode setting into the kernel. So all the programming of the hardware specific clock rates and registers on the video card happen in the kernel rather than in the X driver when the X server starts.. This makes it possible to have high resolution nice looking splash (boot) screens and flicker free transitions from boot splash to login screen. Unfortunately, on some cards this doesnt work properly and you end up with a black screen. Adding the nomodeset parameter instructs the kernel to not load video drivers and use BIOS modes instead until X is loaded.

Note that this option is sometimes needed for nVidia cards when using the default "nouveau" drivers. Installing proprietary nvidia drivers usually makes this option no longer necessary, so it may not be needed to make this option permanent, just for one boot until you installed the nvidia drivers.

Source


I have a few suggestions:

Change desktop environment. Changing to a more lightweight environment WILL speed up your machine (a lot), since Unity is one of the most bloated ones. I recommend Xfce for your machine. LXDE is a bit TOO lightweight and it's not worth it. Xfce is highly customizable and beautiful. No big cons. To install it in Ubuntu, run the command sudo apt-get install xubuntu-core (don't use xubuntu-desktop since it will install some possibly unwanted programs).

My computer is a 9 year old fighter with an Intel Celeron CPU @ 2.8GHz, 1512 MB of RAM and a GeForce 6200 GPU, and Xfce runs incredibly smooth.

Install proprietary drivers

If you have NVidia or AMD drivers, look for the "Additional drivers" program, which comes preinstalled in Ubuntu. Install all proprietary drivers, reboot and feel the performance difference. Intel hardware usually won't need any extra drivers, since they are included in the kernel.

In Xfce, disable Window compositing in the "Compositor" settings. You won't have that much eye candy such as shadows in the back of windows or transparency but the system will run better.


Certificate issues when using Landscape python API.

Make sure your API endpoint URI is exactly as shown in the Landscape server. Typically it will end with /api/ (trailing slash included). And, of course, that the access keys are correct.


Cedilha (getting "ć" rather than "ç") after upgrade to 20.10

Olá!
I just updated from 18 to 20.04 and had the same issue.
This worked for me:
sudo gedit /etc/environment

include this line in the file:
GTK_IM_MODULE=cedilla

save & reboot


I installed a bunch of software updates, and now Ubuntu won't log me in. How can I undo these updates?

It turned out to be a problem with LightDM. For anyone coming across this problem, I ran the following commands and was able to log in properly afterwards:

chown username:username .Xauthority

sudo chmod a+wt /tmp

sudo service lightdm restart

Source: Posted by OP in the question itself.


chili555 gave a very good hint (thanks!), netplan was overriding all my settings.
I've followed this tutorial to set it up, and now it works.


How to copy local git repository from local machin

Go to settings in virtualbox and set up shared folder between host and guest. Then you will be able to copy from virtual machine to mounted folder, and whatever you copy there will be available in host as well. You will need sudo privilege to copy the files inside VM, because shared folder is owned by root


Is it possible to run a bootable image.iso Windows from USB?

Is it acceptable for you to have Windows on the internal HDD and other OS on USB, so that grub on the USB gives option to boot OS on USB or Windows on HDD?

If so give mkusb a try, there is a grub option to boot internal drive or USB.

In the old days it was possible to install and boot Windows XP from flash drive using the Ngine method:

http://tdoui.webs.com/Install%20And%20Run%20Windwos%20XP%20From%20USB.pdf .

WinUSB and it's forks claimed to be able to run later versions of Windows from USB but I have not heard of anyone having success using it. There are for money Windows to USB tools out there many of which look like scams.

Windows To Go will allow running later versions of Windows off of flash drive but only as a installation, not as an ISO file. I have not heard of anyone dual booting with a WTG install.

You can install Windows to VBox on USB, (it is slow for me even using USB3 and it runs as a VDI file and not as an ISO).

I have had most success using VBox with a Full Ubuntu install to USB rather than a Persistent install. With a Persistent install I eventually got corruption in the casper-rw partition and fragmentation in the NTFS partition, (it took about 6 months to happen).


Keyboard shortcuts are not working with NumLock key on

Finally found it. One of the shortcuts has contained the Mod2 key. I don't even know which key Mod2 is but after removal of the shortcut all works fine.


How does External HDD with NTFS format works on Ubuntu?

You can read and write NTFS in Ubuntu and you can connect your external HDD in Windows and it will not be a problem.
To see how this works you can visit here.


Microphone no longer works on Firefox, how to revert settings of pavucontrol?

If you're sure the reason for the problem is only because you've messed the settings, try rm ~/.config/pulse or rename it to another file. It will force pavucontrol to generate a new user-file.


I had all kinds of issues including yours with remmina, but I recently installed the new rc version and it fixed everything. I wouldn't normally recommend a release version but the normal remmina was way too buggy. it also adds a ton of new features. Highly recommend.I love it!The version is Remmina 1.2.0rcgit.3


remove software on Kubuntu with apt command

To remove software, you can use remove. For example:
sudo apt remove tableplus

This will still leave configuration files behind, though. If you want to completely remove an application that was installed via apt, you can do this:
sudo apt purge tableplus

Hope this answers your question.


You can use Wine (available from the Software Center) to run Photoshop. According to the WineHQ AppDB's entry for Photoshop, Photoshop is working relatively well under wine. Don't expect perfection, though, and if you run into problems, consult the entry. Not the different Wine versions mentioned; you may have to use the Wine PPA.

Before you make a purchase, try Gimp, the relatively bitmap-based image manipulation software available from the Software Center. For something more akin to Illustrator that is vector-based, try Inkscape.

You can install Windows in a virtual machine, if your system is powerful enough - Photoshop is a very big program.


How to disable btrfs snapshots created by apt?

you can disable the rule from apt.conf.d, it should be enough renaming the file with a suffix .disabled (apt only reads configuration files ending with .conf or without any extension)
$ cat /etc/apt/apt.conf.d/80-btrfs-snapshot
DPkg::Pre-Invoke {"if [ -x /usr/bin/apt-btrfs-snapshot ] && apt-btrfs-snapshot supported; then apt-btrfs-snapshot snapshot; fi "; };

you could then remove the scheduled job from /etc/cron.weekly
Anyway check your own package to see the installed files
dpkg -L apt-btrfs-snapshot


How to answer a question that the terminal gives you?

Just type your answer and hit Enter!

Typically, the system will accept yes/y for "yes" or no / n for "no", but this may differ based on the system and the program you're setting up.

Any answer in brackets (like in your image) is the "default" option and will be selected automatically if you just hit Enter. Alternatively, if you see things like [y/N], it means that the default is n or no, but you can override if you need to.


Install netgear WNA1000m on Ubuntu Server 12.04 LTS

I found this link to be of great help.

How to install driver for RTL8188CUS Wireless adaptor?

It discusses the pitfalls of going about it on your own with third party software and provides you with what worked for my problem which is just a slightly different version then what you printed.


Your Total memory is 1GB , 923 Megabyte used, 71 Megabyte free Now , yes your memory is fully Used, Buffer is Reading your files that mean accessing your Drive to read the files, To Find more which process consuming more Memory use. to know more about memory usage use the command in following link to know more

TOP Commands


Trouble when connecting paired bluetooth headphones on Ubuntu 20.04

tl;dr: I tried suggestions from different web search results, but what ended up working for me was: I found and killed redundant pulseaudio processes.
Original posting as follows:
I also had trouble with pulseaudio failing to connect to my bluetooth headset sometimes, even after I had done the following:

kill pulseaudio with:
pulseaudio -k

unload module-bluetooth-discover with:
pactl unload-module module-bluetooth-discover

deleting pulseaudio config with:
rm ~/.config/pulse
(Actually, I use a script to rename the directory to something else.)

wait 6 seconds (in my script)

restart the bluetooth service with:
sudo service bluetooth restart

load module-bluetooth-discover once again with:
pactl load-module module-bluetooth-discover

restart pulseaudio with:
pulseaudio
(actually, it automatically restarts, but I thought I'd restart it just in case)

Sometimes the above would fix things, but sometimes pulseaudio refused to connect to the bluetooth headset, even though the bluetooth connection itself was obviously there, listed under blueman-manager (and also the headset made beeps to indicate that it was connected).
This is what I discovered tonight: it failed because there were multiple copies of pulseaudio running.  I found this with:
ps -ef | grep puls

I killed the older process with
kill 7734

(or whatever process number your output of the preceding command "ps -ef|grep pulse" showed)
Hopefully this covers all those cases where it previously did not connect.
Incidentally, sometimes there is an extra copy of blueman-manager running (ie. there is already one running before I run the "blueman-manager" command), and I have to use the "kill" command on it also, with "killall blueman-manager".
Not sure if this helps you, but I wanted my answer to exist somewhere out there in searchable web space, because I kept finding a dozen or so responses to "pulseaudio doesn't connect to my bluetooth" but none of them solved my problem.


How can I search for photos by height or width?

you can use simple shell script for this.
create any file search.sh in your photos folder using

gedit search.sh

and paste bellow lines:

#!/bin/bash

mkdir  /home/$USER/test
for i in *.jpg; do
read -r w h <<<$(identify -format "%w %h" "$i")
if [ `expr $h / $w` ==  `expr 4 / 3` ]; then
cp "$i" /home/$USER/test/
fi
done

save this file using Ctrl+s and make it executable using

sudo chmod +x search.sh

then execute it using command

./search.sh

it will copy all photos that have 4:3 to test directory in your home directory.
if you want copy to flash drive or somewhere else then make change in script and if identify command is not available in your system then you can install is using command:

sudo apt-get install imagemagick


status of Ubuntu Phone for HTC One, with instruction, is available from here: https://wiki.ubuntu.com/Touch/Devices/M7

Note, that this is community support, and by looking at it, no much change seems to have happened during the last 6 month.


make terminal show up when called in a shell script

If you're planning for this script to always execute in a windowed environment, and these messages are only used for rare errors, consider using xmessage or gmessage instead of echo. This will bring up a new window with the message, which the user can click to dismiss.

On the other hand, if the messages are common or frequent, you might want to always run your entire script inside a new terminal window for that mime type. Instead of configuring it to run your script, try running this:

gnome-terminal -e "path to your script"

I assume you also need to pass the name of the file to open to the script, but I'm not sure how that parameter is encoded in the context where you're doing this. It might be as simple as putting something like $* or %s at the right spot inside the quotes.


All of the /home on HDD, OS on SSD
At a minimum, split your / from your /home for your "production" OS (Ubuntu). If you want to split even more have a look at the FHS.  64GB /, 2TB /home
One swap partition for both OSes (Minimum size = RAM, Max size=RAM*2)
If Arch is to mess around with, 32GB /, 512 GB /home
Yes, not all of your disk space is allocated: just keep that as 'spare' to move & extend existing partitions if needed. (or bcache the HDDs)
Some other possibilities

Freebies you didn't ask for:

If you plan on adding another 3TB drive: Don't use software RAID!  It's prone to software and hardware errors so divide your MTBF by 2 for 1 OS and by 4 for 2 OSes
If you plan to use hardware RAID: Don't use RAID0: divide your MTBF by 2 if you do.
Make frequent system back-ups (You're definitely user type 4)


Ubuntu freezes during boot with Intel UHD 620 graphics card

The issue was with the intel microcode update. I was able to disable it at the grub screen and rollback to a previous version and hold it.


The basic steps will be:

1 - Copy files from your D drive to somewhere that won't be deleted
2 - Delete and repartition your drive to be a single drive again, (you will need repartitioning software for this and as far as I know it is not supported under Windows without third party software.  I'd suggest Gparted here to do this (make a USB stick with it, boot from there and repartition.
3 - Boot back into windows and confirm it worked.

Note:  Repartitioning used to be considered dangerous, as with all things it pays to have a backup, though this is fairly safe these days, there's still a chance.

Hope that helps.


Listing and removing albums with too small audio bitrate

Here's a shell approach. It will delete any directories that don't contain .mp3 files of the >= 320 kbps bitrate:
find /path/to/Music -type d -print0 |
    while IFS= read -r -d '' dir; do
     mp3=$(find "$dir" -type f -iname '*.mp3' | head -n 1);
     [ -e "$mp3" ] && [[ $(mp3info -x "$mp3" | grep -oP '\d+(?=\s*kbps)') -lt 320 ]] &&
            rm -rf "$(dirname "$mp3")";
    done

Notes

This will remove any directories that contain at least one mp3 file with a bitrate less than 320. If another file exists in the same directory with the right bitrate, that will be deleted as well. This approach assumes that all files in a directory have the same bitrate.

This will miss files of variable bitrate.

It should work with any type of file name, including those with spaces, newlines or even backslashes.

You might need to install mp3info: sudo apt-get install mp3info

Run it on a test directory first.

Explanation

find /path/to/Music -type d -print0 :  find all directories under /path/to/Music and print them separated by the null string. This is needed to deal with strange file names.

while IFS= read -r -d '' dir; do : go through each of the results of find, saving them in the $dir variable.

mp3=$(find "$dir" -type f -iname '*.mp3' | head -n 1);  : save the name of the first mp3 file in this directory as $mp3.

[ -e "$mp3" ]  : if this file exists. This is needed for skipping directories with no mp3 files.

[[ $(mp3info -x "$mp3" | grep -oP '\d+(?=\s*kbps)') -lt 320 ]] : this checks the bitrate of $mp3. It runs mp3info, greps the bitrate and checks if it is less than 320.

rm -rf "$(dirname "$mp3")";  : delete the directory that contains the mp3 file. This will only be run if its bitrate is less than desired.


It can be both a permission and configuration problem.

The web server (user www-data) needs +x on every folder in the path, so for /home/username/web/, /home, /home/username/ and /home/username/web has to have the +x set for world. In addition /home/user/web has to have read permission for web server, and same for content.

In addition, Apache has to be configured for this. As you ask for a per user folder, I presume you're thinking about the typical example.com/~username?

This is traditionally the folder public_html with Apache. This is configured with the UserDir directive. This is fairly well documented in the Apache Documentation. Thus you'd have to add UserDir web to use the folder web instead of public_html.


You don't know how to source a file (script). The right way is to use one of the following commands:

source /etc/fls/5.0/fls.sh

or

. /etc/fls/5.0/fls.sh

See also:

What is the difference between "source x", ". x" and "./x" in Bash?


how to mount ipod touch 4th generation 16gb

Try this : (http://www.simplehelp.net/2007/07/07/how-to-use-gtkpod-to-manage-your-ipod-in-ubuntu/)

Works for me :)

This is a bit outdated - Skip the installation instruction and go to step 2 of "Using gtkpod".


WOL doesn't wake PC (keyboard does). How to fix?

The issue was caused by a malfunctioning motherboard.


Secondary monitor not being detected anymore after kernel upgrade

I have a Nvidia 340 driver for my G92 GeForce GTS250 graphics card. I had the monitor not detected the problem after a kernel upgrades from Kernel 4.10.0-42. I just tried out the open source driver and I don't know why but it works and I can get the full-screen showing. Before I had a big black band around the display. I don't know what problems I will have with the open source driver but if nothing serious goes I have to use it or go back to an older kernel. I am using Linux Mint 18.3. This is only a a possible work around if the original driver is proprietory. The open source doesn't take advantage of many of the features of the graphics card I understand. For my purposes I have a functioning monitor.


There is a place it can be set although I don't know why it would have been changed on you.

From the Thunderbird Menu, choose Edit->Preferences->Advanced->General->Config Editor

In the Config Editor, enter 'wrap' as a search term

I've enclosed a screenshot of my settings for this, which work and have not been changed that I know of.


How to let Virtualbox guest capture the full screen (including system bar area)?

Same here. The problem is that the Qt-subapplication (vbox menu) is always having the focus rather than the main vbox window. That causes Unity system bars to be on top. You can just close the Qt-subapplication and vbox will be the top window again. The easiest way to get the vbox menu back again when needed is hitting two times Right-Ctrl+F to leave and reenter full screen mode. These are just workarounds. Hope that vbox will fix it with next release.


Why doesn't the delete key move a file to the trash?

Because it's a Mac keyboard, the key labeled as "delete" is actually "backspace" (left delete), not "delete" (right delete).

You have to hold "fn" while hitting the delete key:  fn + delete


100% Usage by /usr/sbin/apache2 -k start

Your processes may be leaking memory, or you are allowing more threads than you have memory for.  If the memory leak is slow it may take a while for this to manifest.

https://serverfault.com/questions/694538/limiting-memory-and-cpu-usage-per-httpd-worker-with-apache-mod-wsgi/694621?s=15|0.6421#694621 may provide some guidance


You cannot change your partition while you are using that partition. The best thing is to define your partitions before installing Ubuntu with the Live CD.

If while you are installing from the Live CD you select Something else as your choice on the Installation Type window, you can define the partitions as you please.

You will need to format one partition as /, create a swap partition (approx equal to your amount of RAM), and, if you do not want to lose documents etc.,  make a separate /home partition. (This also means these files are separate if you need to reinstall to the / partition or upgrade or try a different distro - /home does not need to be formatted1).

There are hundreds of how to's all over the internet on how to do this.

Following is an example setup for multibooting and sharing between Windows and Linux on 300gb.

sda1 = ntfs 50gb (Windows 7)
sda2 = extended 250gb (for the following)
sda3 = ext4 25gb  (/ for 10.04)
sda4 = ext4 25gb (/ for 12.04)
sda5 = ext4 100gb (/home shared between 10.04 and 12.04²
sda6 = fat32 or ntfs 100gb for a shared drive between all 3 OS's

All that being said - and my preferred method - you can still use gparted from a Live CD and shrink and edit partitions with a risk of losing data. Plenty of tutorials out there on how to do that also - including some on YouTube.

1 Some configuration files (ones that start with a ., for example .config) can botch a different install if you use the same username.

2 (each Linux OS requires a different user name to avoid conflict.)


How to make a 4.8 kernel config change for I2S sound?

The option you look for is

CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y

Set the option to n to switch to I2S mode.

Make sure that you edit kernel config a debian way.

Run

fakeroot debian/rules clean
fakeroot debian/rules editconfigs

Then say "yes" to the flavour you want to edit. When you get into "menuconfig" interface, find the option by pressing / and clear the field by pressing "Space" key.

Then exit the intrface by "ESC" key and save the config.

Now you can build your kernel.


Ubuntu 17.04. install driver for USB Ethernet Adapter

A1: No, you needn't install the driver. It is already included in Ubuntu 17.04. It is r8152. From the module aliases:

filename:       /lib/modules/4.10.0-28-generic/kernel/drivers/net/usb/r8152.ko
version:        v1.08.8
license:        GPL
description:    Realtek RTL8152/RTL8153 Based USB Ethernet Adapters
author:         Realtek linux nic maintainers <nic_swsd@realtek.com>
srcversion:     382765E0356A7F7FA08EF4C
<snip>
alias:          usb:v0BDAp8152d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v0BDAp8152d*dc*dsc*dp*icFFisc*ip*in*
<snip>

A2: Insert the device. Check to see if the driver loaded:

lsmod | grep r8152

Check to see if an interface is created:

ifconfig

Check to see if there are any clues in the log:

dmesg | grep r8152
dmesg | grep <interface_you_found>

For example, ifconfig says that my ethernet interface is enp0s25. Therefore, looking for clues, I'd check:

dmesg | grep enp0s25

Post your findings in an edit to your question and I will edit this answer to add troubleshooting steps.


Unable to install Ubuntu 14 LTS (64bit) on Lenovo Ideapad S205

Try disabling Secure Boot. If that doesn't help, check the following questions/answers:

Boot problems after uninstalling Ubuntu
Upgrading from 13.10 to 14.04 broke Grub
Dual Boot Win8.1-Ubuntu 14.04 - Cannot load Win8.1 after reinstalling Ubuntu

These questions all include the same error message you've reported, but I haven't studied them carefully enough to judge how useful they'd be to your situation. Chances are one of them will help, though.


How to Find Out Which Program is Responsible for Outgoing Traffic on Certain Ports

the command you used shows for both outgoing and incoming traffic. If you add -l to your flags, then it would show listening ports. You also could have added a -cflag for continuous and then appended a  | grep 6969 to see matching lines for 6969...
It would still been a little difficult to isolate only outgoing traffic from that...
ss offers more options to play with than netstat.
or something like nethogs presents that live data.
apt-get install nethogs


How can I remove un-installed programs from the Unity dash menu?

These applications leave Desktop Files somewhere in ~/.local/share/applications. Search through this folder (and any sub folders) for the relevant launchers, and if you find any, delete them :).

Then simply run unity from the run dialogue (alt+f2) to restart Unity.


How to install snapd on ubuntu 18.04 server

It is pre-installed software.

Type dpkg -l snapd to check snapd package status. It will show you it is installed, configured, deleted and so on.


Can you prevent Juju from destroying machines?

I am also new to juju but what I do to prevent this is by deploying an ubuntu charm and then deploying the service on that machine.
So, first we should assign a tag to that node in MAAS UI before deploying ubuntu charm. Then

juju deploy ubuntu --constraints tags=<tag that we set>

A new node with ubuntu will come up.
Now deploy the service on that machine

juju deploy <charm_url> --to <machine_number>


nVidia driver update causes unbootable system

If you got the terminal run the below command to remove xorg.conf file

sudo rm /etc/X11/xorg.conf

After installing nvidia drivers,it generates xorg.conf file.This file causes the system not to boot.If you does'nt got the terminal press Ctrl+Alt+(F2-F10) when booting.


Why is my search results layout skewed in Launcher?

As UnKNOWn has suggested, this is probably an issue related to the GNOME Shell theme you are using. Changing the theme is expected to solve this problem.
In general, themes can cause unexpected issues, like the one you experienced. This is one of the reasons why some GNOME developers try to raise awareness against third party theming and ask distributions not to theme their apps.
Regarding users tinkering with themes, they mention:

If you like to tinker with your own system, that’s fine with us.
However, if you change things like stylesheets and icons, you should
be aware that you’re in unsupported territory. Any issues you
encounter should be reported to the theme developer, not the app
developer.


How to install gnome extensions from gnome software?

The Ubuntu Software Center currently is a Snap. While it is designed to replace the old Software Center, it is currently malfunctioning. At some stage, only Snap packages would be shown. Gnome Shell extensions not being available may be another issue.

As a workaround until issues with the new Ubuntu Software in 20.04 are fixed, you may install the Gnome Software application. You can do so with the terminal command:

sudo apt install gnome-software

Look for the icon labeled "Software" instead of "Ubuntu Software" to start this "classical" version.


dkms drivers for rtl8812au & rtl8814au network dongles fail to build on 17.10 (kernel 4.13)

You might try:

git clone https://github.com/zebulon2/rtl8814au.git
cd rtl8814au
make
sudo make install
sudo modprobe 8814au

It makes perfectly on my 17.10 system. I am not confident that I can recommend a dkms process, so kernel updates require a recompile.


Ok, this was just bad network configuration which was fixed by re-running the network setup configuration:

sudo console-conf


Internal microphone not detected: 20.04, HP Envy x360, Ryzen 5 4500

this device uses digital mics and the one you selected in hdajackretask is the 3.5mm Jack in the Left Side of the device, not the internal digital one.
I think the SOF-Firmware Driver should be the solution to your problem.


Error building .click package with click build .: '...' is not a directory

Solved it.  Turned out that "scope"'s corresponding value is supposed to specify a directory:

    "hooks": {
        "my-scope": {
            "apparmor": "my-scope.apparmor",
            "scope": "my-scope"
        }
    },

I changed "scope": "my-scope" to "scope": "." to specify the current directory:

    "hooks": {
        "my-scope": {
            "apparmor": "my-scope.apparmor",
            "scope": "."
        }
    },

My .click package now builds and installs!


Can I install Ubuntu into an Acer Aspire 5634 WLMI notebook?

This article states that your model has a 1.83 GHz processor, 1 GB of RAM, and 120 GB storage. If that is correct, you meet the installation requirements of 700 MHz processing speed, 512 MiB RAM, and 5 GB storage space. Assuming you have a functioning USB port or optical drive, you can install Ubuntu.


How to develop in Android Studio inside VM, but launch parallel VM with Android?

ADB allows devices to be connected over TCP/IP, in addition to the default USB option. You need your Ubuntu and Android VMs inside the same virtual network, Developer options enabled in your Android VM, root access to your Android VM, and you need to know your Android VM's IP address (say a.b.c.d).

As root in your Android VM, execute the following commands in a shell:

setprop service.adb.tcp.port 5555
stop adbd
start adbd

You may now connect to your Android VM from Ubuntu. Execute:

adb connect a.b.c.d

And then execute your required commands, like you would do when a device is connected over USB.


How to allow SSH from internet when it is forwarded to a non-standard port

you can add another line: 'Port 2222' in /etc/ssh/sshd_config and ssh will listen to that port as well


After installing Catalyst Center, my Ubuntu 13.10 has changed user password

You can boot into recovery mode by pressing Shift after bios screen. From there you can get a root prompt and from there you can change the password with the command:

passwd iveralvik


There are tons of reasons to have an "eject" button on an internal hard disk:

On laptops: to save power: if you have both an SSD and a HDD, you can turn off the (power hungry) HDD
On servers: to remove the drive while keeping the rest of the server running
On desktops: to power down a backup HDD prior to removing it
...


Should I remove the HPlip packages from the Ubuntu repositories before installing the latest version with the HP provided .run installer?

I would suggest removing the packages provided by Ubuntu if you're about to replace them with a more recent version from the vendor.


where are the apt indexes stored and can they be removed?

NB: all of the following was tested on Ubuntu 14.04.

Up front: don't remove any directories, just files inside of the directories. Also make sure no apt-related processes are running (or could get auto-started during your cleanup).

/var/cache/apt/archives/*

The files in /var/cache/apt/archives, i.e. the downloaded packages, can be cleaned using apt-get clean. This is the method that is linked in the other answer.

/var/cache/apt/*.bin

As long as you ensure that no apt-related process is running the index files /var/cache/apt/pkgcache.bin and /var/cache/apt/pkgcache.bin can also be cleaned out. Unless they are leftover, there should not be any other files that would match /var/cache/apt/*.bin, but you can remove them using that pattern as long as no apt-related process is running.

The next run of apt-get update will regenerate these files.

Unfortunately this question asking about the index files was closed as duplicate, although it isn't a duplicate at all.

/var/lib/apt/lists/*

You can also remove the cached package lists, but might want to leave the lock file untouched.

Yes, the file lock can also be removed, provided no apt-related processes are running or would start during cleanup. But I mentioned that already once or twice.

Rationale

I wondered about this possibility to be able to create a template archive to use for creation of containers (LXC, Docker). In such a case you usually want to trim down the system as much as possible before packaging.

Turns out it is harmless to remove the files. In my particular case I can be sure no apt-related processes are running, as the "system" - after the chroot part finishes - isn't actually running.

Potential apt-related processes

cron-apt, but also unattended-upgrades and similar would be examples apt-related processes that you don't want to run during a cleanup.


can not play avi file on ubuntu 18.04 lts

Im not sure why maybe your multimedia dont have the dependency to run that file. try-

sudo apt-get install ubuntu-restricted-extras   (this contains most of the multimedia codecs)

AND

sudo apt-get install ubuntu-restricted-addons

OR ELSE if while installing vlc maybe it didnt install the dependency  so also run
sudo apt-get install -f


The steps to go:

1) Identify your adapter (lsusb will list all usb devices, lspci all pci devices ....)
2) Google for the appropiate driver (module) to load. Mostly, if you know what device you are trying to install will help you find a solution.
3) Make sure the device is enabled (in your bios).


Using Apache2 proxy_html module on Ubuntu 12.04

I have always told Wordpress that my site address was example.com (so that none of the urls created by wordpress have an ip address) and then had my proxy config look something like this:

    ServerName example.com

    ProxyRequests Off
    ProxyPreserveHost On
    ProxyPass / http://192.168.1.1
    ProxyPassReverse / http://192.168.1.1

keeps it simple.


Since another users dont have that issue, problem was in home dir. I think it was caused by upgrades from 3.0 -> 3.5 -> 4.0 firefox from PPA in the past.

Solved by deletion of some duplicated firefox,*firefox.desktop* files from home dir.


Reboot from terminal waiting running apps to quit

As per this answer, reboot do not immediately reboots the system, but has a clean-up procedure that also sends the TERM signal to all processes (see the source code linked in the answer).

It is up to the processes receiving the signal to handle that signal and clean-up before exiting.

Alternatively, a somehow softer alternative could be to stop the display manager before the reboot:

sudo service lightdm stop
sudo reboot


Installing npm package is having and issue related with sharp node modules

The needed file glib-object.h is located in libglib2.0-dev package (see search results from packages.ubuntu.com).

Install it with

sudo apt-get install libglib2.0-dev

and then proceed.


Preseed Ubuntu installation with full disk encryption

I think the way to go here is to set the passphrase in the preseed. This way the disk is encrypted with a known passphrase. Then after the install. Prompt the user to "rekey". The Luks encryption scheme has a few passphrase slots by default. The one your setting up in the preseed can be removed as part of the rekeying action.

More here:

How to change the password of an encrypted LVM system (done with the alternate Installation)?


Why is there a skip option when installing Ubuntu?

This button skips attempts to download updates from Internet. If, during installation, Ubuntu detects any network, it attempts to get updates from it.


Looks like your video driver gets messed up when you scroll the webpage. You can try Using Alt+PrintScreen+"REISUB" (i.e. hold Alt+PrintScreen and press R E I S U B key sequence; B might not work, so you'll have to press reset) to safely restart the system and save the logs. Then you can examine /var/log/kern.log near end of file. There'll likely be some BUG or Oops messages indicating what's going with the driver.


Can I have a window showing small live preview of another workspace?

EDIT

(New answer)

DONE.
The answer below is now available in a polished form, as an indicator, as a ppa for Trusty, Xenial, Yakkety and Zesty :

sudo apt-add-repository ppa:vlijm/windowspy
sudo apt-get update
sudo apt-get install windowspy

Th indicator (including preview window) is now nicely low on juice. Options include a settings window, setting window border size/color, window size.

In the meantime, I found it useful to keep an eye on the AU window; see if there are any messages :)

OLD ANSWER

(first second rough concept)

Have a minimized representation of a window on another workspace

To my own (big) surprise, it can be effectively done, be it with
trickery and deceit; have an updated representation of a window on another workspace. Not fit to watch a movie, definitely good enough to keep an eye on a window elsewhere (example: my tv-card window):

How it works in practice

With the window in front, press a shortcut key:

(the window will minimize)
Move to another workspace, press the shortcut key again, a small representation of the window will appear, updated every 4 seconds:

The window always shows on top of other windows. As it is, the window is 300px (width), but can be set to any size.
To end it, press (again) the shortcut key. The small window will close, you will move to the viewport of the original window, which will appear again, unminimized.

The scripts

The control script

#!/usr/bin/env python3
import subprocess
import os
import sys
import time

# paths
imagepath = os.path.join(os.environ["HOME"], ".showcase")
wfile = os.path.join(imagepath, "currentwindow")
vpfile = os.path.join(imagepath, "last_vp")
# setup path
if not os.path.exists(imagepath):
    os.mkdir(imagepath)

def get(command):
    try:
        return subprocess.check_output(command).decode("utf-8").strip()
    except subprocess.CalledProcessError:
        pass

def get_vp():
    open(vpfile, "wt").write(get(["wmctrl", "-d"]).split()[5])

def run(command):
    subprocess.Popen(command)

def convert_tohex(widxd):
    return widxd[:2]+((10-len(widxd))*"0")+widxd[2:]

def check_windowtype(wid):
    check = get(["xprop", "-id", wid])
    return not any([s in check for s in [
        "_NET_WM_WINDOW_TYPE_DOCK",
        "_NET_WM_WINDOW_TYPE_DESKTOP"]])

def edit_winprops(wid, convert=True):
    run(["xdotool", "windowminimize", wid])
    if convert:
        widxd = convert_tohex(hex(int(wid)))
    else:
        widxd = wid
    run(["wmctrl", "-i", "-r", widxd, "-b", "add,sticky"])
    get_vp()
    open(os.path.join(imagepath, "currentwindow"), "wt").write(widxd)

def initiate_min():
    # if not, minmize window, write the file
    wid = get(["xdotool", "getactivewindow"])
    if check_windowtype(wid):
        edit_winprops(wid)
    else:
        pidinfo = [l.split() for l in wlist.splitlines()]
        match = [l for l in pidinfo if all([
            get(["ps", "-p", l[2], "-o", "comm="]) == "VirtualBox",
            not "Manager" in l])]
        if match:
            edit_winprops(match[0][0], convert=False)

# windowlist
wlist = get(["wmctrl", "-lp"])

if "Window preview" in wlist:
    # kill the miniwindow
    pid = get(["pgrep", "-f", "showmin"])
    run(["kill", pid])
    window = open(wfile).read().strip()
    viewport = open(vpfile).read().strip()
    run(["wmctrl", "-o", viewport])
    time.sleep(0.3)
    run(["wmctrl", "-i", "-r", window, "-b", "remove,sticky"])
    run(["wmctrl", "-ia", window])
    os.remove(wfile)

else:
    # check if windowfile exists
    wfileexists = os.path.exists(wfile)
    if wfileexists:
        # if file exists, try to run miniwindow
        window = open(wfile).read().strip()
        if window in wlist:
            # if the window exists, run!
            run(["showmin", window])
        else:
            # if not, minmize window, write the file
            initiate_min()
    else:
        # if not, minmize window, write the file
        initiate_min()

The window representatiom

#!/usr/bin/env python3
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, GObject
from PIL import Image
import os
import subprocess
import time
from threading import Thread
import sys

wid = sys.argv[1]
xsize = 300

imagepath = os.path.join(os.environ["HOME"], ".showcase")
if not os.path.exists(imagepath):
    os.mkdir(imagepath)
img_in = os.path.join(imagepath, "image.png")
resized = os.path.join(imagepath, "resized.png")

def get_img():
    subprocess.Popen([
        "import", "-window", wid, "-resize", str(xsize),  resized
        ])

get_img()

class Splash(Gtk.Window):

    def __init__(self):
        Gtk.Window.__init__(self, title="Window preview")
        maingrid = Gtk.Grid()
        self.add(maingrid)
        self.image = Gtk.Image()
        # set the path to the image below
        self.resized = resized
        self.image.set_from_file(self.resized)
        maingrid.attach(self.image, 0, 0, 1, 1)
        maingrid.set_border_width(3)
        self.update = Thread(target=self.update_preview)
        self.update.setDaemon(True)
        self.update.start()

    def update_preview(self):
        while True:
            get_img()
            time.sleep(3)
            GObject.idle_add(
                self.image.set_from_file, self.resized,
                priority=GObject.PRIORITY_DEFAULT
                )

def miniwindow():
    window = Splash()
    window.set_decorated(False)
    window.set_resizable(False)
    window.set_keep_above(True)
    window.set_wmclass("ShowCase", "showcase")
    window.connect("destroy", Gtk.main_quit)
    GObject.threads_init()
    window.show_all()
    window.move(70, 50)
    Gtk.main()

miniwindow()

How to use

Install python3-pil, xdotool and wmctrl

sudo apt-get install xdotool wmctrl python3-pil

Create, if it doesn't exist yet, the directory ~/bin.
Copy script 1, he control script, as (exactly) showcase_control (no extension) in ~/bin, and make it executable.
Copy script 2, the mini- window script, as (exactly) showmin (no extension) in ~/bin, and make it executable.
Log out and back in, and add the following command to a shortcut of your choice:

showcase_control

Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

showcase_control

and it should work!

Press the key once to grab the current window
move to the other workspace where you'd like the mini-window
Press again to show the miniwindow
Press again to move back to the original workspace, (automatically)  un-minimize the original window and close the mini -one.

Downsides?

The setup, as it is currently,  adds some work for your processor. On my (very) old system however, it adds (on average) appr. 4-5% I reckon, which I did not notice in any way.

Update: It turns out import can resize the image in one step, together with fetching the window image. This means a substantial reduction in processor load. At the same time the refresh time is shorter (3 seconds now), still at lower "costs".

Explanation

My starting point was the way OP mentioned he wanted to use the option to keep an eye on a window on another workspace, waiting for either something to finish.
While literally having an exact (mini) copy of a window on another workspace seems impossible, we can make an image of an existing window with the import -command, once we have the window id. While this both works on minimized windows or windows without focus, there is however one issue: the window needs to be on the current workspace.
The trick is then to temporarily (while the mini- window is used) make the window "sticky" (be virtually available on all workspaces) with wmctrl, but minimized at the same time.
Since all is done automatically, the difference effectively is none, since also returning to the initial viewport, "un-" sticky the original window and un- minimizing it, is done automatically.

In short:

Pressing the shortcut once: targeted window is made sticky, but minimized
Pressing it again (presumably on another workspace): a small mini- version of the window appears in the upper left corner, updated once per four seconds.
Pressing it again: mini- window is closed, the desktop moves to the initial workspace of the window, the window is restored un- sticky and un- minimized.

Specifically for VirtualBox

When the VBox window is in front, it turns out Ubuntu shortcut keys are disabled(!), so the control script needs to be launched in another way. Below a few brief ones.

Option 1

I edited the control script. Now only in the case of VirtualBox:

Click anywhere on the desktop, Then press your shortcut key. After that, simply use the shortcut key to show the window and exit.

Explanation: The control script was made to exit if the window was of type "desktop", since you wouldn't want to minimize the desktop. Now the script first looks for possibly existing VirtualBox windows, to target, if the currently active window is the desktop.

Option 2

Copy the icon below (right- click -> save as), save it as minwinicon.png

Copy the lines below into an empty file, save it as minwin.desktop in ~/.local/share/applications:

[Desktop Entry]
Type=Application
Name=Window Spy
Exec=showcase_control
Icon=/path/to/minwinicon.png
StartupNotify=false

You'd need to log out and back in for the launcher to "find" the local ~/bin path!
Drag the icon on to the launcher to use it.

The second solution has an important downside: after using it from the launcher, it will keep blinking for a few seconds, waiting for a window to appear. During that, clicking again won't have any effect. That can be solved, as described here, but including that in this answer would really make it too long. If you want to use option two, please look into the link.


The Ubuntu/Linux equivalent of ipconfig in Windows is ifconfig.

Try typing sudo ifconfig.

The result will look something like this:

eth0      Link encap:Ethernet  HWaddr 00:0c:29:94:37:b6
          inet addr:192.168.1.231  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fe94:37b6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:519374 errors:0 dropped:0 overruns:0 frame:0
          TX packets:110611 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:332864737 (332.8 MB)  TX bytes:11113451 (11.1 MB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:33651 errors:0 dropped:0 overruns:0 frame:0
          TX packets:33651 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2951078 (2.9 MB)  TX bytes:2951078 (2.9 MB)


'sudo tee' command gone wrong | Removing a source.list that can't be read?

Your first command

sudo tee /etc/apt/sources.list.d/mono-xamarin.list

is wrong. The command waits for an input and writes into

/etc/apt/sources.list.d/mono-xamarin.list

Therefore simply remove the file

sudo rm /etc/apt/sources.list.d/mono-xamarin.list

and start the correct command again and don't forget the

sudo apt-get update

Your second command

echo deb http://repository.spotify.com stable non-free | sudo tee /etc/apt/sources.list.d/spotify.list

is correct. After this command you have the line

deb http://repository.spotify.com stable non-free

in your /etc/apt/sources.list.d/spotify.list. Check with

cat /etc/apt/sources.list.d/spotify.list

The command tee read from standard input and write to standard output and files. Two examples

echo "foo" | tee bar

writes the string foo into the file bar. The previous content will be overwritten.

echo "foo" | tee -a bar

appends the string foo to the given file.

The command tee bar reads from the standard input and writes into the file bar

Start a test with

tee bar

Type some words and stop with Ctrl-C. Now start

cat bar

to see your changes.

Example

% tee bar
foo
foo
bar
bar
^C
% cat bar
foo
bar


Docky runs as regular plank. How can I get docky back?

I got the same problem for some time ago. Then it turned out that I've added another repository for Docky, which made it like Plank.

Open Software center, go to "Edit" -> "Software Sources", and click on "Other Software". Look for a repository that has plank or docky in its name, and if you fine one, uncheck it, and close the window. (Docky is in the default repos)

Now run sudo apt-get update and then re-install docky normally (as you did earlier.)


Wireshark showing no encryption in OpenVPN

OpenVPN is connected in this way:

 [you - tap0-]-- INTERNET --[-tap0 - server ]

The traffic between you and tap0 is unencrypted, the same applies to tap0 <> server. The traffic between both tap0s is encrypted.

tap0 is connected through a physical network adapter, eth0 for wired connections, wlan0 for wireless connections. That would look like this:

 [ YOUR COMPUTER ]--wlan0-- INTERNET --eth0--[ SERVER ]

If you are using a wireless connection, you should listen on wlan0 insteap of tap0 using wireshark. You'll see traffic between UDP ports 1194, which is encrypted.

Don't worry, OpenVPN will use the BF-CBC cipher if the cipher is omitted. Uncommenting it implies using this BF-CBC cipher.


upgrade to 16.04 from 14 did not complete, how to fix?

UPDATE - I followed the instructions from this and it seemed to fix the problem.

https://administratosphere.wordpress.com/2011/11/02/rescuing-an-interrupted-ubuntu-upgrade/

  First step is to boot the machine to a shell that you can use to
  recover. This can be done in the standard system by using the Recovery
  Mode. Press the left Shift key as the system boots up and
  choose a recovery mode kernel from the menu that appears – it will be
  labeled with "(recovery mode)" at the end of the line. The recovery
  mode kernel will present you with the option to use a recovery shell.

  You could use the rescue mode by booting with an Ubuntu install CDROM
  and entering "rescue" at the boot prompt, but then you must remember
  to mount all of your partitions and to perform a chroot to /target
  where the root partition is mounted.

  After the system has booted to the menu, select the item that says
  "“Drop to root shell prompt with networking". This provides you with
  the ability to update the software packages from the internet.

  When the prompt appears, start by making sure that all currently
  installed programs are configured:

dpkg --configure -a

  This may take a long time, depending on how many programs were
  installed before the system stopped. Then go ahead and update the
  current list of packages:

apt-get update

  Following this, upgrade the software on the system:

apt-get upgrade

  This last step, again, may take a long time to complete. You should
  pay attention to the list of packages held back (listed at the top of
  the output from this command); these packages will have to be
  requested specifically. Usually, packages are held back because they
  require new software or other drastic changes: the Linux kernel is
  always held back. Use a command like this one to install these
  packages:

apt-get install some-package some-other-package

  You may have to repeat this more than once until all of the packages
  have been installed and none are held back.

  Then, you should repeat the update and upgrade in order to completely
  verify that the system is as updated as it can be:

apt-get update
apt-get upgrade

  These last commands should execute quickly, as everything is probably
  complete – however, it is not impossible that the upgrades would have
  affected something that requires another upgrade. Not doing this
  probably won’t matter, but why not do it anyway?

  Once done, a reboot is required to make sure that the old software is
  no longer being used and all that is used is the new upgraded
  software. Don’t just continue the boot: reboot.

reboot

  One more thing can be done to clean up afterwards, possibly after the
  reboot. At a command shell, enter this command to remove unneeded
  software:

sudo apt-get autoremove


Well it seems that your DVD's are encrypted. In this case, installing the restricted packages only would not help. You would also need to install libdvdcss to play encrypted DVD's. Run this from terminal:

sudo /usr/share/doc/libdvdread4/install-css.sh

Also remember you need to have libdvdread4 installed before running the above code. You may not need to install libdvdread4 since you have already installed ubuntu-restricted-extras. A reboot may be necessary after running the script.
For more reference you can view: RestrictedFormats/PlayingDVDs


Create shortcut to double click and select upto white space

You cannot configure a different behavior for Ctrl+doubleclick. You can, however, configure the behavior of doubleclick (without modifiers). Assuming GNOME Terminal version 3.16 or newer, see https://bugzilla.gnome.org/show_bug.cgi?id=730632#c33.
Shift+click expands the selection even after you've released the mouse. Another possibility is to "one and a half click" and then drag the mouse while the button is pressed down.


Game "Zen Bound 2" from Humble Bundle doesn't run

Edit the file ~/.ZenBound2/zb2config.ini and switch the antialias value to false.

All thanks to José Neto comment: http://www.omgubuntu.co.uk/2012/03/latest-humble-bundle-brings-4-new-games-to-linux/#comment-472599409


To debug sudo use sudo -ll to list the flag settings that apply to the user and also all the entries that will be checked against any command for a match.
In the settings, secure_path= will show which directories will be searched for the command. This usually includes /usr/bin and /bin, and your entry would need to use the right directory if it is in only one of them. However, on some systems /bin is a symbolic link to /usr/bin, so it doesn't matter.
If the command matches several entries, the last one found will be used. This sometimes means that an explicit NOPASSWD: entry for a command is ignored because there is a later global ALL=(ALL) ALL entry that overrides it. Typically, to avoid this, it is useful to put explicit entries at the end of the sudoers file, or in an individual separate included file.


I have a faint memory of it looking something like this: scrot
  '%d/%m-lulzol.jpg' -e imgur $f and then some xargs. It does not
  recognize $f now though.

$f is using parameter substitution. It sounds like you were using it in a for-loop, probably something like for f in $(ls);....

  Is there some kind of general variable used for stdout from a previous
  command in Bash?

I/O redirection. (there is no such thing as a 'general variable' in BASH btw.)

  What I want to do is take a scrot, upload it to imgur and send the
  stdout from imgur.sh to xclip so the imgur url is added to my
  clipboard.

I am unfamiliar with imgur.sh, but based on your memory of using xargs, I would say the command would look something like:
scrot '%d/%m-lulzol.jpg' -e imgur.sh <imagename> | xargs xclip

This uses scrot to execute imgur.sh on a given image (< day >/< month >-lulzol.jpg), then pipes the stdout (presumably the image URL?) to xargs, which feeds it as an argument to xclip, which copies it to your clipboard.


When using Skype all other audio is muted

Install pavucontrol package. After you installed that package, Skype options -> Sound devices dialog presents a button to open that volume control dialog.

Screenshot:


Laptop suspends on shutdown with lid closed

You have to go to System settings => Power :

And put the When the lid closed value to Do nothing like it is shown in the image.


Turns out, I've been going about it wrong. In order to run a script when the Gnome shell boots up, use the command gnome-session-properties and add a .sh script to it.


Can't log in after a shutdown apparently deleted my user account

If it is a duplicate of Can't login to my user account, here is what you have to do.

You have to change the ownership of .Xauthority so press Ctrl+Alt+F1 and try to connect.
If you can't connect with yousef, try to connect as root (so as username gives it root and as password it might be the same than yousef).
Then do

chown yousef:yousef ~/.Xauthority
reboot

and see if it has worked.
You can also just delete .Xauthority using nautilus if you can login to graphical session (you can install other display manager such as GDM to login, the problem lies in LightDM), or you can delete it via the terminal

rm ~/.Xauthority


According to my understanding you need to "start or power on" the server remotely. The solution you are looking for is "Wake-on-Lan".

Here is a good solution for the problem you described, Wake-on-LAN through Internet

To use it via Internet, you need a static IP from your ISP or you can use a Dynamic DNS. Both will cost you a few extra bucks. There are free Dynamic DNS solutions available but use them at your own risk!


I suggest that you include

alias crontab="crontab -i"

in your ~/.bashrc file (start a new shell before testing!)

This means that every time you run crontab, you always select the "-i" option. If you now give the crontab -r command, it is processed at crontab -ir, which prompts before removing the crontab file:

nick@serv2:~$ crontab -r
crontab: really delete nick's crontab? (y/n) n


Force device name / order - SAS tape drive

You can use an udev rule o for the static device name, here is an example how to do it for an USB device:

http://www.wains.be/index.php/2010/04/10/udev-always-the-same-device-name-for-your-usb-drives/


maas-cli login always returns 403 Forbidden

To answer my own question, it were the http-proxy/https-proxy environment variables.

As I'm using private IP's for POC, I had to setup http-proxy/https-proxy environment variables. Especially since maas-import-pxe-files needs this.


Trouble with installing Bookworm on Ubuntu 17.10

Try adding the elementary PPA:

sudo add-apt-repository ppa:elementary-os/stable
sudo apt-get update
apt-get install com.github.babluboy.bookworm

And once bookworm is installed, remove the elementary PPA.


How to change application's top bar appearance in Xubuntu 16.04?

Xubuntu needs two settings change to change the theme completely. What you changed in Appearance is just the gtk style. You didn't change the Window manager theme yet

To change that, follow these steps

Go to Settings Manager
Click on Window Manager
Then select the matching window manager theme style from Style Tab.

Here is a screenshot after I changed the window manager theme


Two volume levels, if headphones are in and out

The only way I know is this:

Go to Accessories → Terminal Emulator
Type alsamixer

Something that resembles the Windows 7 menu should appear.

Just use the cursor to navigate and m to mute or un-mute.


What's the difference between shell builtin and shell keyword?

There's a strong difference between a builtin and a keyword, in the way Bash parses your code. Before we talk about the difference, let's list all keywords and builtins:

Builtins:

$ compgen -b
.         :         [         alias     bg        bind      break
builtin   caller    cd        command   compgen   complete  compopt
continue  declare   dirs      disown    echo      enable    eval
exec      exit      export    false     fc        fg        getopts
hash      help      history   jobs      kill      let       local
logout    mapfile   popd      printf    pushd     pwd       read
readarray readonly  return    set       shift     shopt     source
suspend   test      times     trap      true      type      typeset
ulimit    umask     unalias   unset     wait

Keywords:

$ compgen -k
if        then      else      elif      fi        case
esac      for       select    while     until     do
done      in        function  time      {         }
!         [[        ]]        coproc

Notice that, for example [ is a builtin and that [[ is a keyword. I'll use these two to illustrate the difference below, since they are well-known operators: everybody knows them and uses them regularly (or should).

A keyword is scanned and understood by Bash very early in its parsing. This allows for example the following:

string_with_spaces='some spaces here'
if [[ -n $string_with_spaces ]]; then
    echo "The string is non-empty"
fi

This works fine, and Bash will happily output

The string is non-empty

Note that I didn't quote $string_with_spaces. Whereas the following:

string_with_spaces='some spaces here'
if [ -n $string_with_spaces ]; then
    echo "The string is non-empty"
fi

shows that Bash isn't happy:

bash: [: too many arguments

Why does it work with keywords and not with builtins? because when Bash parses the code, it sees [[ which is a keyword, and understands very early that it's special. So it will look for the closing ]] and will treat the inside in a special way. A builtin (or command) is treated as an actual command that is going to be called with arguments. In this last example, bash understands that it should run the command [ with arguments (shown one per line):

-n
some
spaces
here
]

since variable expansion, quote removal, pathname expansion and word splitting occurs. The command [ turns out to be built in the shell, so it executes it with these arguments, which results in an error, hence the complaint.

In practice, you see that this distinction allows for sophisticated behavior, that wouldn't be possible with builtins (or commands).

Still in practice, how can you possibly distinguish a builtin from a keyword? this is a fun experiment to perform:

$ a='['
$ $a -d . ]
$ echo $?
0

When Bash parses the line $a -d . ], it sees nothing special (i.e., no aliases, no redirections, no keywords), so it just performs variable expansion. After variable expansions, it sees:

[ -d . ]

so executes the command (builtin) [ with arguments -d, . and ], which, of course is true (this only tests whether . is a directory).

Now look:

$ a='[['
$ $a -d . ]]
bash: [[: command not found

Oh. That's because when Bash sees this line, it sees nothing special, and hence expands all variables, and eventually sees:

[[ -d . ]]

At this time, alias expansions and keyword scanning has long been performed and is not going to be performed anymore, so Bash tries to find the command called [[, doesn't find it, and complains.

Along the same lines:

$ '[' -d . ]
$ echo $?
0
$ '[[' -d . ]]
bash: [[: command not found

and

$ \[ -d . ]
$ echo $?
0
$ \[[ -d . ]]
bash: [[: command not found

Alias expansion is something rather special too. You've all done the following at least once:

$ alias ll='ls -l'
$ ll
.... <list of files in long format> ....
$ \ll
bash: ll: command not found
$ 'll'
bash: ll: command not found

The reasoning is the same: alias expansion occurs long before variable expansion and quote removal.

Keyword v.s. Alias

Now what do you think happens if we define an alias to be a keyword?

$ alias mytest='[['
$ mytest -d . ]]
$ echo $?
0

Oh, it works! so aliases can be used to alias keywords! nice to know.

Conclusion: builtins really behave like commands: they correspond to an action being executed with arguments that undergo direct variable expansion and word splitting and globbing. It's really just like having an external command somewhere in /bin or /usr/bin that is called with the arguments given after variable expansion, etc. Note that when I say it's really just like having an external command I only mean with respect to arguments, word splitting, globbing, variable expansion, etc. A builtin can modify the shell's internal state!

Keywords, on the other hand, are scanned and understood very early, and allow for sophisticated shell behavior: the shell will be able to forbid word splitting or pathname expansion, etc.

Now look at the list of builtins and keywords and try to figure out why some need to be keywords.

! is a keyword. It seems it would be possible to mimic its behavior with a function:

not() {
    if "$@"; then
        return 1
    else
        return 0
    fi
}

but this would forbid constructs like:

$ ! ! true
$ echo $?
0

(in that case, I mean not ! true which doesn't work) or

$ ! { true; }
echo $?
1

Same for time: it's more powerful to have it a keyword so that it can time complex compound commands and pipelines with redirections:

$ time grep '^#' ~/.bashrc | { i=0; while read -r; do printf '%4d %s\n' "$((++i))" "$REPLY"; done; } > bashrc_numbered 2>/dev/null

If time where a mere command (even builtin), it would only see the arguments grep, ^# and /home/gniourf/.bashrc, time this, and then its output would go through the remaining parts of the pipeline. But with a keyword, Bash can handle everything! it can time the complete pipeline, including the redirections! If time were a mere command, we couldn't do:

$ time { printf 'hello '; echo world; }

Try it:

$ \time { printf 'hello '; echo world; }
bash: syntax error near unexpected token `}'

Try to fix (?) it:

$ \time { printf 'hello '; echo world;
time: cannot run {: No such file or directory

Hopeless.

Keyword vs alias?

$ alias mytime=time
$ alias myls=ls
$ mytime myls

What do you think happens?

Really, a builtin is like a command, except that it's built in the shell, whereas a keyword is something that allows for sophisticated behavior! we can say it's part of the shell's grammar.


Backups is kind of complicated, because everybody has different needs.

Clonezilla is an option, as you mentioned, but for a desktop system something lighter like Duplicity or Deja-Dup might be a better fit, as smaller, incrimental backups can be stored on a remote server or an external drive.

Tarsnap is a lighter, secure alternative.

If you've got multiple systems in your environement, something like Bacula might also be useful, but requires a much more complicated setup.


How can I run a program and watch its activity using top?

Another suggestion: open a new tab on your terminal emulator.


Possible values for apt-get "Automatic-Reboot-Time"

The unattended-upgrade program is a python script, the relevant portion of which appears to be:

# reboot at the specified time
when = apt_pkg.config.find(
    "Unattended-Upgrade::Automatic-Reboot-Time", "now")
if shutdown_lock > 0:
    os.close(shutdown_lock)
logging.warning("Found %s, rebooting" % REBOOT_REQUIRED_FILE)
subprocess.call(["/sbin/shutdown", "-r", when])

Hence the time formats supported are those supported by /sbin/shutdown, namely (from man shutdown):

The time string may either be in the format "hh:mm" for hour/minutes
specifying the time to execute the shutdown at, specified in 24h clock
format. Alternatively it may be in the syntax "+m" referring to the
specified number of minutes m from now.  "now" is an alias for "+0",
i.e. for triggering an immediate shutdown. If no time argument is
specified, "+1" is implied.


After kernel upgrade, audio stops working when I plug in my Dell universal Dock D6000

I was able to solve this issue by rebuilding the pulse directory.
I ran the command:
mv ~/.config/pulse ~/.config/old_pulse

and then rebooted, and the sound was restored when pulse was rebuilt.


Bash function named with the question mark char does not work anymore

? is a glob (pattern, wildcard) that'll match filenames consisting of exactly one character; it gets replaced by matching files in the current directory. If there are no matching files in the current directory, ? will remain unchanged, and your function will be triggered. This is called Pathname Expansion in man bash and Filename expansion in the bash reference manual

In this case, you apparently have a file named 0 in the current directory, so ? foo gets changed to 0 foo by pathaname expansion, then it tries to run a command named 0 with foo as argument. If you remove/rename that file to something longer than one character, your function should start working. Alternatively you can use \? or "?" or '?' instead, to avoid it being treated as a glob.

On a side note, using ? in a function name is undocumented and not recommended. Only alphanumerics and underscore are documented to work (same as what's allowed for variable names).


Installing heartbeat can be done easily with Apt:

sudo apt-get install heartbeat

Through configuring your cluster is highly dependant on what you're are trying to accomplish. By default on Ubuntu, the main configuration file /etc/ha.d/ha.cf does not exist and the service will not be started. You must create it yourself. It should identify the nodes in your cluster. For example:

node primary
ucast eth0 1.1.1.1
node secondary
ucast eth0 1.1.1.2

More information on the ha.cf file can be found here.

You'll also need to configure /etc/ha.d/haresources with a list of services and the default node to run them on. It can be as simple as:

primary my-service

Here, primary is the name of the default node and my-service corresponds to an init script at /etc/init.d/my-service More information about the haresources file can be found here.

The file /etc/ha.d/authkeys also needs to be created with an auth toke which will be shared on both nodes, like:

auth1
1 sha1 d1e6557e2fcb30ff8d4d3ae65b50345fa46a2faa

More information on the authkeys can be found here.


Just installed Ubuntu on Windows, is there a way to boot into Ubuntu using Windows 10?

Ubuntu on Windows is a product distributed by Microsoft for their Windows 10 operating system.

It is not a full Ubuntu virtual machine including a kernel, and doesn't "boot", it is an Ubuntu userspace (ie the programs that make up Ubuntu) made to run under Windows.  You can't "boot into Ubuntu" from it.  But you can run most common Ubuntu tools from the command line.


Try installing pulseaudio-equalizer. It helped with issues with my Xonar DS (very low volume sound, and only stereo mode worked, no 5.1).

To do so, do the following:

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install pulseaudio-equalizer

If you get stuttering audio while using equalizer, edit /etc/pulse/default.pa as root with a text editor and add "tsched=0" to the "load-module module-udev-detect" and "load-module module-detect" lines - this is how it should look:

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect tsched=0
.else
### Use the static hardware detection module (for systems that lack udev/hal support)
load-module module-detect tsched=0
.endif

Source: SYSTEM-WIDE PULSEAUDIO EQUALIZER UPDATED FOR UBUNTU 16.10, 16.04 AND 14.04, LINUX MINT 18 AND 17


Numeric pad stops working after turning on keyboard backlight with 'xset led on'

Had the same problem with my Cooler Master Storm.
I had xset led 3 set in ~/.bashrc to turn on the LED's on my keyboard, but also had the non-working Numpad situation.

Although xset -led is supposed to turn off all LEDs, I found xset -led actually returned Numlock use without actually turning "off" the LED's.

This may not be a 'fix' as much as a workaround; and it must be said that my 16.04 is currently running in VMBox, so this may alter the behaviour as opposed to a bare-metal installation.

May want to have a look at the xset qoutput: Might give some insight into what is and isn't set.


How do I configure xscreensaver to use the GNOME lockscreen on Ubuntu 14.04?

Ok I've resolved this issue now, and am posting the solution for anyone else that wants to do the same as I have.

xscreensaver needs to be launched at startup via "Startup Applications" (hit Super and type "Startup").  Add a new entry to launch the xscreensaver daemon on startup as xscreensaver -no-splash.
You need to bring up the xscreensaver config app.  Hit Super and type screensaver.  Set the "Blank after x minutes" to your desired amount (e.g. 5 minutes).  Remember this value for later.  Ensure "Lock screen after" is UNCHECKED.
Finally, go to System Settings / Brightness & Lock.  Set "Turn screen off when inactive for x minutes" to the same value as you set xscreensavers "Blank after x minutes" setting (e.g. 5 minutes).  Then still under Brightness & Lock, set "Lock screen after:" to "Screen turns off".

And you're done!  If your system is idle for the set amount of time, the screensaver will kick in, and in the background your session will also lock.  When you wake your system, you will find it locked and asking for your password.  No ugly 90's login prompts... awesome.  The one caveat is that your screensaver will apparently not kick in if your session is already at a login prompt, the screen will simply turn off.


It doesn't, really. bison is merely a suggested package.

$ apt-cache show flex
Package: flex
Priority: optional
Section: devel
Installed-Size: 468
Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
Original-Maintainer: Manoj Srivastava <srivasta@debian.org>
Architecture: i386
Version: 2.5.35-10.1ubuntu2
Depends: libc6 (>= 2.11), m4, libfl-dev (= 2.5.35-10.1ubuntu2), dpkg (>= 1.15.4) | install-info
Pre-Depends: debconf | debconf-2.0
Recommends: gcc | c-compiler
Suggests: bison, build-essential
Filename: pool/main/f/flex/flex_2.5.35-10.1ubuntu2_i386.deb
Size: 198826
MD5sum: 27cb81027d75db58240873ec3f8fd3ed
SHA1: 253c08edd934d7e3a85beca7c527c7598544dada
SHA256: 870bc45e20265ba718ee9872a04d2d95e0af414eeb3129a16c53f0229965df5f
Description-en: A fast lexical analyzer generator.
 Flex is a tool for generating scanners: programs which recognized lexical
 patterns in text. It reads the given input files for a description of a
 scanner to generate. The description is in the form of pairs of regular
 expressions and C code, called rules. Flex generates as output a C source
 file, lex.yy.c, which defines a routine yylex().  This file is compiled
 and linked with the -lfl library to produce an executable. When the
 executable is run, it analyzes its input for occurrences of the regular
 expressions. Whenever it finds one, it executes the corresponding C code.
Description-md5: 2e3fd254c37c87fd9abf35386a54cb30
Multi-Arch: foreign
Homepage: http://flex.sf.net/
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
Supported: 5y

You can simply install flex using sudo apt-get install flex.


Installation

sudo apt-add-repository ppa:elementaryart/elementary-dev
sudo apt-get update
sudo apt-get install slingshot-launcher

LInks

http://ubuntuguide.net/install-slingshot-elementary-os-launcher-in-ubuntu-11-04-unity
http://www.noobslab.com/2012/02/install-slingshot-launcher-mac-os-style.html


Ubuntu 14.04 Dual graphics Nvidia doesn't work

If you have nvidia prime installed just go to nvidia x server settings and choose it in prime profile (you need to relog to apply the changes).

To install prime:

First make sure bumblebee not installed! Or just remove it:

sudo apt-get purge bumblebee*

Install:

sudo apt-get install nvidia-prime

You can also install prime-indicator for easier switching.

sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install prime-indicator

If you prefer to use bumblebee/have it installed you have to run the application with a command to use the video card (advantage: you don't need to relog).

optirun <program-name>

To install bumblebee make sure you remove prime!
More info: https://wiki.ubuntu.com/Bumblebee


External display is showing and reporting wrong resolutions

You might want to try out the UseEDID option to switch off reporting from the monitor.

See here for more information.


I think, you need to make owner of that folder:

sudo chown -R www-data:www-data /var/www/myservice

It's more secure, than adding writing permissions to others: sudo chmod -R o+w /var/www/myservice


Dual boot: Ubuntu 20.04 can't recognize a data drive (SATA SSD) while Windows 10 can

I eventually solved this by formatting the data disk as NTFS again. Magically, Ubuntu recognizes it at this time. This is not exactly the method I was hoping to get because I had to spend some time moving the data in and out, but it did work for me!


It comes down to what graphics driver you have installed. By default, Ubuntu will install a driver based on Mesa, which does not support OpenGL 4.1. To get full support, you need to install a proprietary driver for your GPU.

With that being said, you will have to install the proper driver yourself. Check here: https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers

or simply:

sudo add-apt-repository ppa:oibaf/graphics-drivers
sudo apt-get update
sudo apt-get upgrade

After that restart your computer. Try launching the game again. It should work!


Ubuntu 13.10 freezes at times; *ERROR* stuck on render ring

I seem to have finally solved this problem. Someone online suggested that I switch to SNA instead of UXA, which is a setting for the graphics drivers. I followed these instructions:

Create an xorg.conf file:

gksu gedit /etc/X11/xorg.conf

and add the following text:

Section "Device"
    Identifier "intel"
    Driver "intel"
    Option "AccelMethod" "sna"
EndSection

Save and exit, and reboot.

I also had to install the xorg-edgers drivers, which is also explained in the article. The PPA's Launchpad page explains the usage of the PPA

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

To remove this ppa if necessary, be sure to use ppa-purge to avoid problems.


Realised I had never posted the "Resolution" to this.

It seems our server was hacked and it was being used to launch DOS attacks.

The server is on the Amazon cloud, however it comes through a chain of two resellers. (Don't ask me why?). Amazon notified the first reseller that they were blocking access because of the above reason, and they tried to notify the second. It being the weekend, nobody from the second reseller received the message to tell us.

Thanks for trying anyway


I think this should install everything you need, and a few other bits besides.

apt-get build-dep gcc-4.6

You might find that some of the tools are too new to build gcc 4.3 though (autoconf, automake, perhaps?) but I doubt there's any packages for that old stuff anyway.


Ubuntu 16.10 GTK 3.0 Include Path for Headers

It looks like you are missing a '-' sign in your first pkg-config statement. Try adding the '-' sign so that the entire command is:

gcc `pkg-config --cflags gtk+-3.0` -o First_Window First_Window.c `pkg-config --libs gtk+-3.0`

You should also amend the include path back to how it was before:

#include <gtk/gtk.h>

And then try compiling again.

Gnome offers more help on using/testing pkg-config here.