Keyboard Shortcuts Don't Work Properly After 14.04 -> 16.04 Upgrade

I had a similar problem upgrading from 15.04 to 16.04 I worked around it by using compiz settings manager to add commands with identical bindings.
ie.
/usr/bin/gnome-terminal -> ctrl + alt + t

I found that it was generally isolated to shortcuts that were launching programs in my case.

On 15.04 - I was able to resolve it by removing the package appmenu-qt5

apt remove appmenu-qt5

Previously this didn't help for 16.04 but now its working fine

I realise this isn't a perfect solution but I hope it is helpful


Uninstall Ubuntu 13.10 and install Ubuntu 12.04

Solution 1:

You can disable the frequent appearance of the system crash/send report dialogue boxes.
you need to edit /etc/default/apport

Graphical:

gksudo gedit /etc/default/apport

or

Command line:

sudo nano /etc/default/apport

Change enabled from "0" to a "1" so it looks like this:

enabled=1

To turn it off make it:

enabled=0

to turn it off at boot, and then turn it off with a sudo service apport stop

Solution 2:  Ubuntu don't restrict the installation of it's own older version.  Make sure the pendrive is bootable.
An easier way to make a bootable USB of Ubuntu is by using LinuxLive USB Creator
Then try searching the web for 'how to boot a pendrive' with specifying your Laptop model. Make a Youtube search too.


Session Jobs are managed by the users own Session Init.

Session Init is used to manage the default graphical user session. And using Session Init on a server is not fully supported.


Imgur provides tools for this. You can even download a shell script from imgur.com which works from the command line.

Of course, installing software directly instead of using Ubuntu's official repository opens a security hole which makes GNU/Linux vulnerable to trojan malware. While usually not recommended, you can still do it, if you want to. Here's how.

First, if you do not have a personal bin directory to store executables, create one by running the following commands:

cd
mkdir bin
source .profile

To download and install the imgur script, run the following commands (you do not need to be root):

wget http://imgur.com/tools/imgurbash.sh
chmod a+x imgurbash.sh
mv imgurbash.sh ~/bin/imgur

Now, simply run imgur with the path to an image to upload it to Imgur.

For example:

imgur /usr/share/banshee/icons/hicolor/128x128/devices/phone-google-nexus-one.png

This gives the following output:

http://i.imgur.com/SoIwv.png
Delete page: http://imgur.com/delete/VTtZOI9LOhtZ2oB
Haven't copied to the clipboard: no $DISPLAY

The first line is the link to the Imgur page, and the second line is the link to delete the image you just uploaded. If possible, the script will also copy the Imgur url to the clipboard for immediate use.

Enjoy!

[Note: this answer previously suggested running the commands as root in order to put the imgur script into /bin. Using root should be avoided whenever possible. In this case, we can create a user's personal ~/bin directory. It's an extra step, but the security is worth it.]


How do I directly access the shares of a machine?

I'm assuming you are talking about shares on a Windows machine. I usually just open a nautilus window and type

smb://machinename

then press enter.

You might need to press Ctrl+L in Nautilus to get the location bar to put than it.

That will show you the shares on that computer, including the administratively hidden ones like admin$ which a Windows client won't show you.


Wireless does not work on Ubuntu 10.04 but does work on Ubuntu 11.10

The problem is solved now. The issue is with intel wireless on ubuntu 10.04. So I get the linux-firmware from Oneiric 11.10 and it works!

Maybe you will have to upgrade to the latest kernel. you can find all versions here Kernel.Ubuntu.com

Thanks to peppe84 :)


Intel Wireless-N 7260 dropping connection

I have the same problem with a carbon X1 gen2. The only solution that worked, was to download and install a new kernel. Download the following packages from

http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.17-rc2-utopic

linux-headers-3.17.0-031700rc2-lowlatency_3.17.0-031700rc2.201408251935_amd64.deb
linux-headers-3.17.0-031700rc2_3.17.0-031700rc2.201408251935_all.deb
linux-image-3.17.0-031700rc2-lowlatency_3.17.0-031700rc2.201408251935_amd64.deb

Type the command below on the terminal:

sudo dpkg -i Downloads/linux-*

After that reboot with the new kernel.


While I can't provide a solution to fully quit Skype & Spotify from the dock, I can show you how to fully quite them both.

Once you close the window, as you've seen, the program minimizes to the top bar. From there, you can quit them both.

Spotify:

Skype:

If you have no Skype icon, run this command:

sudo apt-get install sni-qt:i386

and then restart. It should enable the Skype icon.


Unable to access USB after unplugging by mistake

You have a fair chance to repair the NTFS file system when booted into Windows and using Windows tools. See this link for more details,

Repair the partition table and file system of a pendrive

Often when a pendrive does not work, it is not bricked, but the file system or partition table is damaged. This can be repaired with the same kind of tools as are used for hard disk drives.

Repair Windows file systems (FAT and NTFS) with Windows tools: a graphical tool or the following command line,

chkdsk /f X:

or if you suspect bad sectors,

chkdsk /r X:

where X: is the drive letter (volume letter) for the target partition as seen from Windows.


For me it was good to instal python-dev package before.


I would just trust GNU/Linux for the management of the memory.
When memory demands are high, GNU/Linux indeed will swap inactive processes to swap memory to increase available physical memory (RAM) for running processes and for file cache. Even when memory demands decrease, that swap memory may not be released back to RAM if there is no need. This way, the available memory is at max for the processes that actually need it, and for file buffers. The inactive processes keep sitting away in the swap.
Is 'swap off' safe when app is running on production?
Yes, even when there would be not enough RAM to take all swap usage. If there is enough RAM  next to the current needs, turning off the swap will succeed. If there is not enough physical memory, swapoff will not succeed and issue a swapoff failed: Cannot allocate memory error. So also there, thanks to system design, it remains safe.
However, again: it is not recommended to proceed this way: it will not provide any performance gains. In contrast, it will result temporarily in less available RAM for running processes and file caches, because part of it is actually wasted to reallocate parts to RAM that were not in active use/needed anyway.


How to create VMWare Player Image with linux as the OS

This wiki will help you to customize the Ubuntu ISO : https://help.ubuntu.com/community/LiveCDCustomizationMaverick

Alternatively you can install Ubuntu in Vmware. Then after installing all required s/w you can export this Guest os to an VMPlayer image.

reference : http://www.linux.com/news/enterprise/systems-management/8252-how-to-use-vmware-player-to-create-your-own-images

Hope this helps.


Difference between installing Xfce4 and Xubuntu-desktop?

XFCE is only the desktop environment. xubuntu-desktop, on the other hand is XFCE + additional packages to improve the user experience.

Packages in xubuntu-desktop -

  abiword abiword-common abiword-plugin-grammar abiword-plugin-mathview
  apt-offline blueman brltty-x11 catfish desktop-base exo-utils gigolo
  gmusicbrowser gnome-desktop-data gnome-icon-theme-full
  gnome-system-tools   gnome-themes-standard gnome-themes-standard-data
  gnumeric gnumeric-common   gnumeric-doc gtk-theme-config
  gtk2-engines-pixbuf libabiword-3.0   libchamplain-0.12-0
  libchamplain-gtk-0.12-0 libdigest-crc-perl libexo-1-0   libexo-common
  libexo-helpers libgarcon-1-0 libgarcon-common libgdome2-0
  libgdome2-cpp-smart0c2a libgoffice-0.10-10 libgoffice-0.10-10-common
  libgsf-1-114 libgsf-1-common libgstreamer-perl libgtk2-notify-perl
  libgtk2-trayicon-perl libgtkmathview0c2a libgtksourceview2.0-0
  libgtksourceview2.0-common libgtkspell0 libjpeg-progs
  libjpeg-turbo-progs   libkeybinder0 liblink-grammar4 libloudmouth1-0
  liboobs-1-5 libotr5 libots0   libsexy2 libtagc0 libthunarx-2-0
  libtidy-0.99-0 libtumbler-1-0 libvte-common   libvte9 libwv-1.2-4
  libxfce4ui-1-0 libxfce4ui-2-0 libxfce4ui-common   libxfce4ui-utils
  libxfce4util-bin libxfce4util-common libxfce4util6   libxfcegui4-4
  libxfconf-0-2 light-locker light-locker-settings   lightdm-gtk-greeter
  link-grammar-dictionaries-en menulibre mousepad mugshot   orage parole
  pastebinit pidgin pidgin-data pidgin-libnotify pidgin-otr
  plymouth-theme-xubuntu-logo plymouth-theme-xubuntu-text
  python3-pexpect   python3-psutil ristretto shimmer-themes
  system-tools-backends thunar   thunar-archive-plugin thunar-data
  thunar-media-tags-plugin thunar-volman   tumbler tumbler-common
  xbrlapi xchat xchat-common xchat-indicator xfburn   xfce4-appfinder
  xfce4-cpugraph-plugin xfce4-dict xfce4-indicator-plugin
  xfce4-mailwatch-plugin xfce4-netload-plugin xfce4-notes
  xfce4-notes-plugin   xfce4-notifyd xfce4-panel xfce4-places-plugin
  xfce4-power-manager   xfce4-power-manager-data
  xfce4-quicklauncher-plugin xfce4-screenshooter   xfce4-session
  xfce4-settings xfce4-systemload-plugin xfce4-taskmanager
  xfce4-terminal xfce4-verve-plugin xfce4-volumed xfce4-weather-plugin
  xfce4-whiskermenu-plugin xfce4-xkb-plugin xfconf xfdesktop4
  xfdesktop4-data   xfwm4 xscreensaver xscreensaver-data xubuntu-artwork
  xubuntu-community-wallpapers xubuntu-default-settings xubuntu-desktop
  xubuntu-docs xubuntu-icon-theme xubuntu-wallpapers


Will updates and security updates update my Ubuntu version?

Update vs Upgrade.

No.

Updates do not change your version.  To change version, it will ask if you want upgrade.


How do I get Terminator to start up with my custom layout?

After setting up your layout, right-click on any terminal background and choose Preferences → Layouts tab and click on Add button.
Give it a name and hit Close.
This should create the mentioned ~/.config/terminator/config file.
Now you can start terminator using the saved layout using: terminator -l yourLayout (replace yourLayout with whatever you chose on step 2).
(optional) Edit the ~/.config/terminator/config file so that where it says [layouts] and nested below it [[yourLayout]], rename yourLayout to default and remove/rename the previous default layout. Now, when Terminator starts without any parameters, it will load your custom [[default]] layout!


HP BIOS should let you pick boot device by hitting F9 as soon as you see the HP logo.  If it's not F9, start trying Del/Esc/F1/F2/...

Test that everything works before you go and install on it.


I like Workspaces to Dock GNOME Shell extension.

Drag the mouse pointer to the right side of the screen. A dock will slide out. In the dock, just drag the desired window from one workspace to another.

Find it at https://extensions.gnome.org/extension/427/workspaces-to-dock/


External links are opened as blank tabs in new browser window in Chrome

As unfulvio said, the issue is with google-chrome.desktop, and it is missing the %U argument .

Open file: $HOME/.local/share/applications/google-chrome.desktop

Find the line:

Exec=/opt/google/chrome/chrome

Add a space and %U:

Exec=/opt/google/chrome/chrome %U

Then save the file.


Location and Nature of "*-doc" Documentation?

As you can see here
https://packages.ubuntu.com/bionic/all/mit-scheme-doc/filelist mit-scheme-doc installs documentation.

You can also see this list by

dpkg -L mit-scheme-doc

If you open /usr/share/doc/mit-scheme-doc/html/index.html in a browser, you'll be able to read it.

There are also some pdf files in /usr/share/doc/mit-scheme-doc/pdf directory available.

Regarding other -doc packages, you can check what they install by

dpkg -L <package name>

Generally documentation is installed to /usr/share/doc directory.


Because when you use du -hc /home/test2, as you can see you don't have permission access at some files from /home/test2. Use:

sudo du -hc /home/test2

as you used for repquota -a.

Also, if you used -h (--human-readable) for du you should use -s (--human-readable) for repquota. See man du and man repquota for more info.


Elaborating on @Rinzwind's comment: pip is a manager for python packages. You need the python 2.7 version of pip, which can be installed like this

sudo apt-get install python-pip

Take a look at the pip documentation for installation details and alternative installation options.

I would recommend using a distribution like anaconda to manage your python installation. This can be installed in your home folder and does not need administrator right. Also you can easily change python and pip versions if you decide to use another python version.


If you can, log in to Ubuntu (Unity) 2D, and run unity --reset, then try to login the regular session again. This should fix the problem.


Dell Laptop E6430 DVD Doesn't Work in Ubuntu 20.04 (Files and VLC) But Will Boot From BIOS

For DVD-Video playback in any internal or external drive you need the following:
sudo add-apt-repository multiverse   #only needed if the multiverse repository isn't enabled
sudo apt install libdvd-pkg

Use TAB then cursor keys to navigate and answer "OK" in the following screens. Then:
sudo dpkg-reconfigure libdvd-pkg

and again use TAB and cursor keys to navigate and answer "Yes" to the following screens.
Source: https://help.ubuntu.com/community/RestrictedFormats/PlayingDVDs
In Ubuntu 20.04 you may find an error about a missing libdvdread7 library. Install it:
sudo apt install libdvdread7

Lastly, you may want to install VLC. And for good measure install adiitonal codecs and fonts (important for other media players; VLC uses its own set of codecs):
sudo apt install ubuntu-restricted-extras

(NOTE: Use xubuntu-restricted-extras for Xubuntu and lubuntu-restricted-extras for Lubuntu.)


How to get a Wacom Graphire4 to work in 17.10

The control panel not recognizing your stylus seems to be a bug. I don't see anything about it in GNOME's bug tracker, however, so they may not be aware of it.

As for using xsetwacom, you must provide it with the full device name (i.e., the first column of the output of xsetwacom --list). In your specific case, you will need to use "Wacom Graphire4 4x5 Pad pad" rather than "Graphire4 4x5 pad".


http://fullcirclemagazine.org/category/podcast/feed/atom/ is an Atom feed, not an RSS feed, and Banshee doesn't currently support Atom feeds.

Anyway, there is an RSS feed for the Full Circle Podcast at http://fullcirclemagazine.org/category/podcast/feed.

This does work with Banshee.


This is an antialiasing bug only in the top bar of the Unity environment when using the Radiance theme instead of the default theme Ambiance. In all other places the text will be fine. You can install gnome-tweak-tool and try different fonts for using in the titlebar, change antialiasing, hinting, etc. to see better results.


Upgrading from 12.10 WUBI install to 13.04

Yes you can upgrade a Wubi install to 13.04, but Wubi support has been officially pulled by Ubuntu, therefore it's not recommended to do this.

Confusingly though, the 13.04 wubi.exe (signed by Canonical UK Ltd.) has been published on http://releases.ubuntu.com/13.04 (for undisclosed reasons).
And no, the 13.04 wubi.exe doesn't only create a guest account. This bug was fixed.

If you do decide to upgrade which is generally not recommended on Wubi installs, then review this: Upgrading my Wubi 11.04 to 11.10
Also consider that you may not be able to get support from this site or other Ubuntu support sites.


How to uninstall (totally remove) tonido from Ubuntu 14.04?

You haven't installed the application, only downloaded via wgetand extracted via tar and the script ./tonido.sh start installs nothing.

Therefore there is nothing to uninstall.

You could remove the misplaced archive in /usr/local/tonido.

sudo rm /usr/local/tonido/tonido64.tar.gz

and the extracted content. The archive doesn't contains a parent folder for tonido, therefore we can't delete a folder.

Remove the extracted files via

sudo tar tf tonido64.tar.gz | sudo xargs rm -r 2>/dev/null

Ok, I see now, you have created a folder /usr/local/tonido. You could also simply remove the folder /usr/local/tonido

sudo rm -r /usr/local/tonido


Internet error hanging on TLS handshake and TB at connected to pop3

I am very happy that I found the 'solution' for this problem.
It turns out that the ethernet connector on my motherboard (Foxconn 671-MX)did not work in Ubuntu but it does in Windows. I ordered a new pci ethernetcard today and ethernet works again.
1 year and four months without Ubuntu and many attemps with commands that did not help but back on Ubuntu again :).


Is my system in a consistent state now after failed upgrade from 16.04 LTS to 18.04 LTS?

First clean up everything:

sudo apt autoremove && sudo apt autoclean

Install debsums to be able to create MD5 hashes for all packages that would not have any and generate the MD5 hashes next:

sudo apt install debsums
sudo debsums_init

Now check them:

sudo debsums --all | grep FAILED

and if you get an output like below:

/etc/kernel/postinst.d/apt-auto-removal                                   FAILED
/etc/bash.bashrc                                                          FAILED
/etc/skel/.bashrc                                                         FAILED
/usr/share/bash-completion/bash_completion                                FAILED
/etc/grub.d/40_custom                                                     FAILED
debsums: missing file /etc/init.d/keyboard-setup (from keyboard-configuration package)
debsums: missing file /etc/xdg/autostart/nautilus-autostart.desktop (from nautilus package)
debsums: missing file /usr/share/pkg-config-crosswrapper (from pkg-config package)
debsums: missing file /usr/share/pkg-config-dpkghook (from pkg-config package)
/etc/sysctl.conf                                                          FAILED
/usr/lib/python3/dist-packages/cupshelpers/__pycache__/__init__.cpython-35.pyc FAILED
/usr/lib/python3/dist-packages/cupshelpers/__pycache__/config.cpython-35.pyc FAILED
/usr/lib/python3/dist-packages/cupshelpers/__pycache__/cupshelpers.cpython-35.pyc FAILED
/usr/lib/python3/dist-packages/cupshelpers/__pycache__/installdriver.cpython-35.pyc FAILED
/usr/lib/python3/dist-packages/cupshelpers/__pycache__/openprinting.cpython-35.pyc FAILED
/usr/lib/python3/dist-packages/cupshelpers/__pycache__/ppds.cpython-35.pyc FAILED
/usr/lib/python3/dist-packages/cupshelpers/__pycache__/xmldriverprefs.cpython-35.pyc FAILED
debsums: missing file /usr/lib/rhythmbox/plugins/rbzeitgeist/__pycache__/rbzeitgeist.cpython-35.opt-1.pyc (from rhythmbox-plugin-zeitgeist package)
debsums: missing file /usr/lib/rhythmbox/plugins/rbzeitgeist/__pycache__/rbzeitgeist.cpython-35.pyc (from rhythmbox-plugin-zeitgeist package)
/etc/apt/apt.conf.d/10periodic                                            FAILED

you're fine if and only if:

for every fail you know that you've changed the configuration yourself (manually or through an application)
they're just missing files
they're just cache misses
and you know why gimp-gmic is being held back in your particular case.


Can't transfer photos from Kodak Easy Share C195 Camera

Before you try all the suggestions below, there is a useful note in the FAQ on gphoto.org that may suggest a quick solution:

  3.3.2.  I have a Kodak EasyShare™ camera, and gphoto2 can't detect it. What shall I do ?

  Just press the button on the dock so that the USB device gets detected by the system and [then the] gphoto2 software can detect it.

Note: This answer may also be useful for anyone who has a similar problem mounting their camera and is not just applicable to this particular camera model.

Digital cameras are usually mounted automatically using libgphoto2 and are not mounted as usb storage devices; there is more information on the gphoto project here. There are several solutions to your problem:

1) Try to get the camera mounted; connect it and switch it on. Even 'unsupported' models can actually be mounted. By entering lsusb you can find the device and bus addresses:

Bus 001 Device 009: ID 040a:0565 Kodak, Inc.

and then manually mount it with gvfs-mount by specifying those usb bus and device addresses:

gvfs-mount gphoto2://[usb:001,009]

You could also create a script and make it executable and then run that script to mount your camera:

NOTE: I recommend to grep the vendor/product id string, as that is one of the unique identifiers; just grepping Kodak could identify other products or the wrong one.

You MUST replace the vendor/product string below with the correct one for your device, found with lsusb.

#!/bin/bash

val1="$(lsusb | grep -i "040a:0565" | awk '{print $2}')"
val2="$(lsusb | grep -i "040a:0565" | awk '{print $4}' | tr -d ':')"

gvfs-mount gphoto2://[usb:"$val1","$val2"]

exit 0

Now, use your file browser and click to show hidden files and your camera should be accessible from your .gvfs folder in your home folder. You should also be able to import photos by using applications such as gthumb.

Some cameras switch off after a while, so if this happens you will have to mount it again using the steps above.

Note: For Ubuntu 12.10 (and beyond) this ~/.gvfs folder is now: /run/user/username/gvfs.

2) The second option is simply to take the memory card out and put it in a card reader and then there will be no problems accessing it from your computer. I find this is often the best way if no other solutions work.

Also, the program you were using, Rapid Photo Downloader, does not detect digital cameras and is best used with a card-reader, as the developer notes on his site. So gthumb's (or Shotwell's) import facility is probably what you want to use; Shotwell's import facility even managed to import my pictures even when the camera was not mounted or available in the .gvfs folder because Shotwell always requires that a camera is unmounted anyway, unlike gthumb. So if you don't want to go through all the steps detailed in the first method everytime you connect your camera a workaround would be to use Shotwell to import your pictures (although you won't be able to browse them in your file browser or in the .gvfs folder).


There are many reasons a persistent USB might not boot.

BIOS

USB not set as first hard drive in BIOS
Problems with BIOS or UEFI boot partitions or files.
Secure Boot is not turned off
Drive not compatible with computers BIOS or UEFI boot mode
Incorrect partition table
Out of date BIOS/UEFI firmware
Junk in volatile memory
Fstab entry in Full install USB referring to HDD's efi boot partition on drives created on uefi machines.

GRUB

Incorrect root partition in grub
Incorrect path to ISO in grub
Incorrect persistent-path, (if used), in grub
Grub menu entry structure not suiting OS
Incorrect file type for vmlinuz and initrd (.efi and .lz)
The word "persistent" is missing from grub.cfg, txt.cfg, syslinux.cfg or text.cfg

Persistence (casper-rw and home-rw)

Persistence partition is not an ext filesystem
Persistence file not on FAT filesystem
Persistence file/partition reused from different version
Persistence file full of data, or file update attempted

Hardware

Corrupted flash drive, reformat and reload
Bad flash drive
Not enough RAM to run Ubuntu
Bad or incorrect USB socket
Incompatible computer CPU
Incompatible computer GPU
Computer does not meet minimum specs, a lighter version of 'buntu is required
Motherboard voltage irregularities
Motherboard BIOS limitation with multiple USB devices

Software

Bad MD5SUM / corrupt ISO file
Modified or corrupted ISO9660 partition
USB was removed from computer before ISO file is completely copied
Out of date boot drive creation tool
User inexperienced with boot procedure

Thanks to karel and sudodus for help with the answer.
See Why Doesn't my Bootable USB Boot


unable to access dash after uninstalling google chrome

Whole day i researched about this error on askubuntu and other ubuntu and finally i found my answer on a raspberry forum. The solution is as follows:

wget http://archive.ubuntu.com/ubuntu/pool/main/e/eglibc/multiarch-support_2.17-93ubuntu4_i386.deb
dpkg -i --force-depends multiarch-support_2.17-93ubuntu4_i386.deb

after this i installed libgcc1 package with the following command:

sudo apt-get install libgcc1

Through these commands you are correcting wrongly set dependencies for the multiarch-support package


"failure reading sector 0x728b6c0 from hd1" after dual boot

I suggest that you do three things...

- Use the Disks app to check the SMART Data & Tests

Edit your question with a screenshot of the SMART Data and I'll take a look
run the SMART Tests

- fsck your Ubuntu partition

boot to a Ubuntu Live DVD/USB
open a terminal window
type sudo fdisk -l
identify the /dev/XXXX device name for your "Linux Filesystem"
type sudo fsck -f /dev/sdb3 # replacing XXXX with the number you found earlier
repeat the fsck command if there were errors
type reboot

- Perform a bad block scan

Boot to a Ubuntu Live DVD/USB, backup any data from /dev/sdb3, and in the terminal...

Note: do NOT abort a bad block scan!
Note: do NOT bad block a SSD
Note: backup your important files FIRST!

sudo e2fsck -fcky /dev/sdb3 # read-only test

or

sudo e2fsck -fccky /dev/sdb3 # non-destructive read/write test (recommended)

The -k is important, because it saves the previous bad block table, and adds any new bad blocks to that table. Without -k, you loose all of the prior bad block information.

The -fccky parameter...

   -f     Force checking even if the file system seems clean.

   -c     This option causes e2fsck to use badblocks(8) program  to  do  a
          read-only  scan  of  the device in order to find any bad blocks.
          If any bad blocks are found, they are added  to  the  bad  block
          inode  to  prevent them from being allocated to a file or direc‐
          tory.  If this option is specified twice,  then  the  bad  block
          scan will be done using a non-destructive read-write test.

   -k     When combined with the -c option, any existing bad blocks in the
          bad blocks list are preserved, and any new bad blocks  found  by
          running  badblocks(8)  will  be added to the existing bad blocks
          list.

   -y     Assume  an answer of `yes' to all questions; allows e2fsck to be
          used non-interactively.  This option may not be specified at the
          same time as the -n or -p options.

Update #1:

After checking the BIOS version with sudo dmidecode -s bios-version it was determined that there was a newer BIOS available. Installed the newer version and so far it seems to have fixed the problem.


Installing TLP power save stopped my wifi adapter from working

To disable wifi powersave in TLP permanently on battery you don't have to fiddle with iwconfig or rc.local (won't work reliable anyway).

Change the following line in TLP's configuration instead:

WIFI_PWR_ON_BAT=N


Getting Star Wars - Rogue Squadron working on linux

Do your current drivers support 3D acceleration? If you're running other games in Wine, then the answer is likely yes. If you aren't, or you don't know or otherwise want a sanity check, open terminal and run glxgears. For modern graphics cards, the gears demo should run, and the output should show an FPS well over 1000.

If your current drivers don't support 3D acceleration, you'll need to install ones that do. This will depend on your card, but generally, the easiest way is to install the proprietary drivers. You can find them in the "Drivers" tab of the "Additional Software Sources" app.

Have you tried PlayOnLinux? PlayOnLinux is a wrapper for Wine that's available in the respositories. It can aid in getting games to work by installing specific versions of Wine (they don't overwrite one another) that are known to work best for the application in question. Often, this is one of the easiest ways to get a game working.


Screen on Lenovo W530 turns on and off every second upon startup

Never you people mind, I got it working. I'll explain how for future reference.

So, to fully describe my problem, upon starting up, my computer would show the Ubuntu MATE splash screen, then go straight to a black screen with my cursor. The monitor on my laptop would turn off, then on, forever. It would never go to a login screen.

So, I went into a live boot of Ubuntu, mounted my hard drive (/dev/sda6) as /mnt as rw, chroot'd into it, logged in, then did:

sudo dpkg --configure -a

then suddenly I could get to the login screen! Upon logging in, it put me back to the login screen, so I deleted ~/.Xauthority, then my laptop was perfectly fixed!

I really should have mentioned that I had just done a botched do-release-upgrade. That was foolish of me. But at least I deducted how to fix my laptop, and now I feel like a god.

By the by, future updates worked fine, so I'm in the clear.


I'd use the torrent to download the iso. The torrent clinet should do it's own verification too, and the iso should match the MD5 when it's done, and torrent's often faster.

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


Ubuntu 20.04.1 Server, bonded network interfaces, keepalived not working

After trying a solution, which entailed added mac addresses to the netplan configuration, I found that the same issue with keepalived was occurring, which was that both machines were showing up as the master.  Further investigation showed that the mac address using for the bonded interface on both servers was identical, which ended up being the problem.
By changing the name of the bonded interface in netplan on the second server, to bond1 (rather then bond0), then using that name  in the keepalived config file solved the issue, as both bonded interfaces then had unique mac addresses.  Keepalived can know properly tell which server is the master and which one is the backup.
Thanks for all the help,
Leo


You have an unsupported 5.10.10 kernel.
You can't get Linux headers from Ubuntu repositories for this kernel. You should get the headers from the place you got the kernel image.


Rhythmbox unity launcher icon Quit action won't work - Howto quick Quit

I found a desktop file in /usr/share/applications that has a new persistent dirty* action StopQuit which works the same way my dirty "Die" does, i.e. leaks a dirty hourglass for seconds. My original .desktop file was maybe from Trusty or before.
*dirty because as my own, it remains displayed …even the application is not running. Funny how true devs worked around this: it was surely very difficult


You can go through this command

  sudo apt-get clean && sudo apt-get update

to clean the cache (and partially downloaded files) and then update your package lists.


Ubuntu keeps one CD distribution, not a sFedora, debian or CentOs, where you can download complete x CD distribution (where x>1). But you can try live distribution, try to set dial up connection according to this guide (https://help.ubuntu.com/community/DialupModemHowto) and/or download packages from here (http://packages.ubuntu.com/).


Easiest way to change mac address on nic is:

sudo ifconfig eth0 down
sudo ifconfig eth0 hw ether  xx:xx:xx:xx:xx:xx
sudo ifconfig eth0 up

Where xx:xx:xx:xx:xx:xx represent mac address

For wlan

sudo ifconfig wlan0 down
sudo ifconfig wlan0 hw ether  xx:xx:xx:xx:xx:xx
sudo ifconfig wlan0 up


How do I open an .eml file in Evolution?

Evolution will not display such thing inline, and it will rely on the environment to open the file. Try downloading the file outside of Evolution. That should present you with a dialog where you can choose which application should handle that file type. Evolution should then use that application to open it.


You are right. Your W-LAN "HWAddr" (Hardware Address) is your wireless devices MAC Address. You can look it up by typing

ifconfig wlan0

which will show you something like this

wlan0     Link encap:Ethernet  Hardware Adresse 00:c0:ca:19:d3:1e
          UP BROADCAST MULTICAST  MTU:1500  Metrik:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          Kollisionen:0 Sendewarteschlangenlänge:1000
          RX-Bytes:0 (0.0 B)  TX-Bytes:0 (0.0 B)

In case your wireless adapter uses another interface name, which you do not know, do the following:

Use ifconfig to get a listing of all interfaces
Disconnect the USB-Device
Check which one is missing, by reissuing ifconfig


unable to read/write CIFS mounts in Ubuntu 11.10

Try mounting share with noperm option, e.g. your /etc/fstab line should be:

//192.168.1.1/stories /home/paul/Documents/Stories cifs rw,user,exec,auto,**noperm**,username=,password= 0 0

It is useful when client and host uids/gids differs (see 'man smbmount')


c# - Opening the terminal process and pass commands?

Try this:

using System;
using System.Diagnostics;

namespace runGnomeTerminal
{
    class MainClass
    {
        public static void ExecuteCommand(string command)
        {
            Process proc = new System.Diagnostics.Process ();
            proc.StartInfo.FileName = "/bin/bash";
            proc.StartInfo.Arguments = "-c \" " + command + " \"";
            proc.StartInfo.UseShellExecute = false;
            proc.StartInfo.RedirectStandardOutput = true;
            proc.Start ();

            while (!proc.StandardOutput.EndOfStream) {
                Console.WriteLine (proc.StandardOutput.ReadLine ());
            }
        }

        public static void Main (string[] args)
        {
            ExecuteCommand("gnome-terminal -x bash -ic 'cd $HOME; ls; bash'");
        }

    }
}


Is there a way to know the creation date of a folder?

I don't think creation date is stored. There is a modification date associated with any file, which you can see by running ls -l in terminal (Ctrl+Alt+T should open it). But if you modify any file inside the directory, I believe this modification date is touched.

EDIT: Here's a more precise answer: https://stackoverflow.com/questions/14842195/how-to-get-file-creation-date-time-in-bash-debian. Seems like you can see creation date, using debugfs. But only for ext4 fs.


Ubuntu wont function normally after newest update

FIRST:

Using a live cd.

Boot the Ubuntu Live CD, choose "try without installing" and then establish an internet connection.

Press CTRL + ALT + T to open a terminal.

Assuming Ubuntu is on /dev/sda7, run the following commands:

sudo mount /dev/sda7 /mnt

cd /mnt

sudo mkdir -p /mnt/boot/efi

sudo mount /dev/sda1 /mnt/boot/efi

sudo mount --bind /dev /mnt/dev

sudo mount --bind /dev/pts /mnt/dev/pts

sudo mount --bind /proc /mnt/proc

sudo mount --bind /sys /mnt/sys

sudo chroot /mnt

echo 'nameserver 208.67.222.222' | tee /etc/resolv.conf

echo 'nameserver 208.67.220.220' | tee -a /etc/resolv.conf

apt-get update

apt-get -f install

apt-get dist-upgrade

Click here for more info.

NEXT

Proceed with the following instructions if you still cannot update.

If you can ping 8.8.8.8 but you get a cannot resolve error when you run apt-get update, run the following commands.

The following commands will first make a copy of your /etc/apt/sources.list file. Then, switch the URLs to IP addresses allowing you to finish the update and then when a successful update is done, switch the old backup copy with the new one (note: this skips the security updates so be sure to do those later).

Run these commands after you chroot into your partition:

sudo cp /etc/apt/sources.list /etc/apt/sourceslist
sudo sed -i 's|http.*archive.canonical.com|http://91.189.92.191|g' /etc/apt/sources.list
sudo sed -i 's|http.*archive.ubuntu.com|http://91.189.91.26|g' /etc/apt/sources.list
sudo sed -i 's/^.*security.*$//g' /etc/apt/sources.list
sudo apt-get update
sudo apt-get -f install
sudo apt-get dist-upgrade

At this point pleas post any errors. If there are no errors, continue:

sudo mv /etc/apt/sourceslist /etc/apt/sources.list

Exit the chroot environment and run the following command to reboot:

sudo reboot

ALSO

To manually create this file run the following command (again, in the chroot environment of course):

sudo nano /etc/apt/sources.list

Here is an example of the lines that should be in the file.

deb http://91.189.91.26/ubuntu/ xenial main restricted universe multiverse
deb http://91.189.91.26/ubuntu/ xenial-updates main restricted universe multiverse
deb http://91.189.91.26/ubuntu/ xenial-backports main restricted universe multiverse
deb http://91.189.92.191/ubuntu xenial partner

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

The following is a copy of /etc/apt/sources.list provided for reference with all of the repositories enabled:

deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse

deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse

deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse

deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse

deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner


Install Ubuntu 16.04 alongside windows 8

Grub should be able to do this, but you didn't tell it to look for your Windows installation before rebooting.  Fixing your MBR caused it to forget your Ubuntu, so in some sense you're starting over from the beginning.

I recently did an alongside install with Windows 7 and got it working, but I don't have UEFI.  Did you do grub-install and grub-update before rebooting out of your Ubuntu install?  If you boot from your Ubuntu USB again you may be able to run those commands against your installed partition.  Otherwise, perhaps just reinstall Ubuntu and then run those commands before rebooting?

I was able to fix some of my errors using boot-repair.  It can remove grub and reinstall it.  I was booted into the instance I was repairing, I'm not sure whether it can do it for one that's not booted.

I don't know enough to give more specific advice, but hopefully these ideas give you some possible ways forward.


Ubuntu Live CD customization with automated install

There is a method of creating a live CD, customized on Help.Ubuntu.com


while moving to a new server, is it ok to create system accounts?

The package which depends on a system account is also responsible for setting up the account.  For example, www-data is created by any HTTPD server when you install it.  Doing it manually is redundant and has a high potential for messing up the standard defaults which are required for the account in question.


How to change keyboard shortcut for Compiz Magnifier (currently alt-enter)

It is a bug and I am afraid it is currently in low priority. I guess the best would be to enable / disable per requirement.

https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/770515


No, it just dumps a load of stuff (slab objects and pagecache) from the system cache.

If your system is out of memory (and I mean: deep into swap usage, nothing free, hard disk churning) then yes, this might help... But not as much as:

Buying more RAM, it isn't expensive or hard to fit.
Closing something that's using lots of memory (or tabs from a browser).
Using something faster for swap space (eg SSD)
Compressing swap

So while it may work for a few seconds, if you have something rampaging all over your RAM, you'd do better just to close it, or buy it more RAM with which to rampage over. Freeing up inode and page cache isn't going to help you for long.


To use putty in Ubuntu 17.10, you need to launch Ubuntu in XOrg.  Follow the following answer to launch XOrg:  How do you switch from Wayland back to Xorg in Ubuntu 17.10?

Your USB Serial device is at /dev/ttyUSB0.  Make sure that you are using that for your putty connection.

sudo putty /dev/ttyUSB0 -serial -sercfg 9600,8,n,1,N

Make sure that you set the speed correctly for the console connection to the switch.  It might be 115200 or 19200 or 9600.

Hope this helps!


Corrupted theme for certain applications

This problem is no longer valid after upgrades.


Script to Restart Network Manager after Resume from Sleep

You should be able to create a script in the /etc/pm/sleep.d/ directory (or supposedly the /lib/systemd/system-sleep/ directory if you are running 15.10+) which executes that restart command on system resume. Make sure to make that script executable.

Create a network_restart file in said directory with these contents:

case "${1}" in
  resume|thaw)
    sudo service network-manager restart
;;
esac

Make the file executable: sudo chmod +x network_restart


What you're looking for is called NAT.

First we want to enable portforwarding:

sysctl net.ipv4.ip_forward=1

Now we should add a rule that forwards all incoming traffic on 8080:

iptables -t nat -A PREROUTING -p tcp --dport 8080 -j DNAT --to-destination 192.168.33.99:80

Then all that is left, is iptables to masquerade

iptables -t nat -A POSTROUTING -j MASQUERADE

What is masquerade?


How do I change my email address for Git?

Just configure it again in git, the new value will override the old one.

For the current project only:

git config user.email 'your.email@example.com'

For your whole Ubuntu user account:

git config --global user.email 'your.email@example.com'


How can I move, in-place, the root partition of an AWS t2.micro instance?

The message seems (to me) to be incorrect.

16065 is where the root partition starts on instances launched from official Ubuntu AMIs on AWS.

Disk /dev/xvda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 sectors

    Device Boot      Start         End      Blocks   Id  System
/dev/xvda1   *       16065    16771859     8377897+  83  Linux

Given that the EBS volume claims 255 heads and 63 tracks, 16065 would seem to be in perfect theoretical alignment, as 63 × 255 = 16065... so assuming my math is correct, this is the first sector of the first track on the second cylinder -- though none of that geometry is real, as the disk is an EBS volume.

I'd be inclined to leave this exactly as it is.  If it's wrong, it seems like Canonical and/or AWS have some explaining to do, given the countless millions of instances with exactly this configuration.


problem in recording video in Ubuntu 14.04

Try lowering the resolution of your video camera, with my Logitech C170, this is the way it works with Cheese.


Can I do a multiseat having only an integrated and a dedicated graphic card?

To be able to use multiseat the graphics card you can use for it need to be shown in the output of lspci. If you have both the integrated and the dedicated card in it at the same time you can use both. So yes.

Mind though that some systems do not allow you to use both (the card you can pick in BIOS but only one at a time).
There is also: xephyr.


Kubuntu 18.10 - How to make Window List larger on Task Manager (Panel)

There's a plasma widget available, at least in Kubuntu 18.04, that is at the bottom of the widget list you see when you click on ☰ at the bottom or extreme end of your panel:
Window List widget:

And, after you install it, clicking on it ( (outlined in red)) shows something like this:

But even with this widget, items longer than a fixed number of characters are terminated with an ellipsis (…).
I don't know if you'll find this more convenient.


Why does copy pasting in python from atom give me errors?

Python demands you to use indenting. Either a fixed amount of spaces or tab per ident (do not mix them).  In your example the "if" needs to be under the "c" of "cost. The original probably did not have enough spaces.

I used 4 spaces (and 2 empty lines after the end of a "def") and this will validate ...

def cost_trip(days):
    cost = days*10
    if days>7:
       return cost-20
    elif days<=7:
       return cost

def vac_ation(days):
    return cost_trip(days)

print vac_ation(5)


How to get a list of all owners of files in a directory

You can use find to print the user (owner) and group and then extract the uniq combinations e.g.

$ sudo find /var -printf '%u:%g\n' | sort -t: -u
_apt:root
avahi-autoipd:avahi-autoipd
clamav:adm
clamav:clamav
colord:colord
daemon:daemon
lightdm:lightdm
lp:lp
man:root
root:adm
root:crontab
root:lp
root:mail
root:mlocate
root:root
root:shadow
root:staff
root:syslog
root:utmp
root:whoopsie
speech-dispatcher:root
statd:nogroup
steeldriver:crontab
steeldriver:lightdm
steeldriver:steeldriver
syslog:adm
systemd-timesync:systemd-timesync
testuser:crontab


How do I delay Upstart's net-device-up signal until a condition is met?

One solution is to put a script in /etc/network/if-up.d/ that executes before any other if-up.d script and waits for a specific condition to be met or a timeout occurs. For example, here's a script to wait for an non-link-local IPv6 address on an IPv6 interface configured with the "auto" method:

#!/bin/sh

LOG_FILE="/tmp/autoipv6.log"

if [ "$ADDRFAM" = "inet6" -a "$METHOD" = "auto" ]; then
        echo "Auto method detected, waiting for IP address" >> $LOG_FILE

        #wait until we have an IP address, or a timeout occurs
        TIMEOUT=50 #5 second timeout--each iteration sleeps for 1/10th of a second
        #get the number of addresses, excluding link-local addresses
        ADDRESS_COUNT=`ip addr show dev eth0 | grep inet6 | grep -v fe80 | wc -l`

        until [ $TIMEOUT -eq 0 ]; do
                NEW_ADDRESS_COUNT=`ip addr show dev eth0 | grep inet6 | grep -v fe80 | wc -l`

                # break out of the loop if more IPv6 addresses have been assigned
                # this is implementation is naive: no guarantee is given that the new addresses
                # are the result of the autoconfiguration request
                if [ "$NEW_ADDRESS_COUNT" -gt "$ADDRESS_COUNT" ]; then
                        echo "Detected new IP address, exiting" >> $LOG_FILE
                        ifconfig >> $LOG_FILE
                        exit 0;
                fi

                TIMEOUT=$((TIMEOUT-1))
                sleep .1
        done

        echo "Timeout waiting for IP address" >> $LOG_FILE
        exit 1;
fi

It's important this "wait-for-condition" script run before the if-up.d Upstart script runs (the Upstart if-up.d script is where the net-device-up signals are generated). The if-up.d scripts are executed by run-parts in lexical sort order (the same order as the default output of the ls command), so a simple technique for guaranteeing order is to name the script "000wait-for-condition".


Prevent machine from sleeping when SSH connections are on

Until Ubuntu 14.10 (Upstart-based)
Have a look at pm-action(8) and search for /etc/pm/sleep.d in section “FILES”. If one of these scripts returns with a non-zero exit status, suspension is prevented.
Updated instructions for clarity:

So create a file /etc/pm/sleep.d/05_ssh_keepawake.

Put a shebang (#!/bin/sh) and the code mentioned in the question in this file.

Set execute permissions on it:
chmod +x /etc/pm/sleep.d/05_ssh_keepawake

Since Ubuntu 15.04 (systemd-based)
systemd doesn’t use pm-utils to manage its power state hooks but has its own infrastructure to the same end. Sleep inhibitor checkers are no longer executed on sleep but must be set by the action that inhibits sleep (see 1).
As such you’d have to add commands to the SSH session log-in and log-out that registers a sleep inhibitor with systemd (e. g. via systemd-inhibit(1)) and later releases the inhibitor. If somebody knows how to hook into SSH log-in and log-out, I’d welcome a comment or edit so that we could work out the relevant steps and commands.
The following section is work in progress – Only use it when you know what you’re doing!
You might be able to write a systemd unit /etc/systemd/system/ssh-inhibt-sleep.service that makes itself a dependency of sleep.target using the RequiredBy option. If your new unit fails (with a non-zero exit status from its invoked process), it will make sleep.target and thus the subsequent sleep action.
[Unit]
Description=Check for running SSH sessions and, if any, inhibit sleep
Before=sleep.target

[Service]
Type=oneshot
ExecStart=/bin/sh -c '! who | grep -qv "\(:0\)"'

[Install]
RequiredBy=sleep.target

As always you need to activate systemd units for them to take effect:
sudo systemctl enable ssh-inhibt-sleep.service

For more info see systemd.unit(5) and systemd.service(5).


What different WM's are available on ubuntu?

KWin (kde-window-manager)
Description - KWin, the KDE window manager, featuring hardware-accelerated compositing effects.
Windows Manager Type - Compositing Windows Manager
Properties - Can have Little to Many Visual Effects, Less Efficient (More Power Hungry compared to Lightweight WMs), More Eye-Candy
Install - sudo apt-get install kde-window-manager
Screenshot


It depends what you mean by a "word", and what you mean by a "CSV file".

If you just want to convert horizontal whitespace to commas, you could use something like

tr -s '[:blank:]' , < file.txt > file.csv

or

sed 's/[[:blank:]]\{1,\}/,/g' file.txt > file.csv

or

awk '{$1=$1} 1' OFS=, file.txt > file.csv

If you want a header row (especially if it needs to count the maximum number of columns) and / or things like `NULL's for unpopulated fields, it will be more complicated.


Browser hanging when copying large files

This is probably because the CFQ I/O scheduler isn't being particularly fair for you. This probably happens because of a lot of dirty pages that need writing back to the disk and firefox is issuing file system syncs which don't really help.  You may get some mileage in either tweaking the virtual memory system as follows:

echo 10 | sudo tee /proc/sys/vm/dirty_ratio

or changing the I/O scheduler to deadline:

echo deadline | sudo /sys/block/sda/queue/scheduler

where sda is the device name of the drive.


How can I run a program on startup, minimized?

Starting an application minimized

Starting up an application in a minimized way takes two commands:

starting the application
minimize its window

Therefore, the command or script needs to be "smart"; the second command should wait for the application window to actually appear.

General solution to startup an application minimized

The script below does that and can be used as a general solution to startup an application in a minimized way. Just run it in the syntax:

<script> <command_to_run_the_application> <window_name>

The script

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

subprocess.Popen(["/bin/bash", "-c", sys.argv[1]])
windowname = sys.argv[2]

def read_wlist(w_name):
    try:
        l = subprocess.check_output(["wmctrl", "-l"]).decode("utf-8").splitlines()
        return [w.split()[0] for w in l if w_name in w][0]
    except (IndexError, subprocess.CalledProcessError):
        return None

t = 0
while t < 30:
    window = read_wlist(windowname)
    time.sleep(0.1)
    if window != None:
        subprocess.Popen(["xdotool", "windowminimize", window])
        break
    time.sleep(1)
    t += 1

How to use

The script needs both wmctrl and xdotool:

sudo apt-get install wmctrl xdotool

Then:

Copy the script into an empty file, save it as startup_minimizd.py
Test- run the script with (e.g.) gedit the command:

python3 /path/to/startup_minimizd.py gedit gedit

If all works fine, add the command (for your application) to Startup Applications

Explanation

The script starts up the application, running the command you gave as first argument
Then the script checks the window list (with the help of wmctrl) for windows, named after your second argument.
If the window appears, it is immediately minimized with the help of xdotool
To prevent an endless loop if the window might not appear for some reason, the script practices a time limit of 30 seconds for the window to appear.

Note

No need to mention that you can use the script for multiple applications at once, since you run it with arguments outside the script.

EDIT

recognizing the window by its pid

If the window title is unsure or variable, or there is a risk of name clashes in the window's name, using the pid is a more reliable method to use.

The script below is based on the use of the application's pid, as in the output of both wmctrl -lp and ps -ef.

The setup is pretty much the same, but the window title is not needed in this version, so the command to run it is:

python3 /path/to/startup_minimizd.py <command_to_run_application>

Just like the first script, it needs both wmctrl and xdotool

The script

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

command = sys.argv[1]
command_check = command.split("/")[-1]

subprocess.Popen(["/bin/bash", "-c", command])

t = 1
while t < 30:
    try:
        w_list = [l.split() for l in subprocess.check_output(["wmctrl", "-lp"]).decode("utf-8").splitlines()]
        proc = subprocess.check_output(["pgrep", "-f", command_check]).decode("utf-8").strip().split()
        match = sum([[l[0] for l in w_list if p in l] for p in proc], [])
        subprocess.Popen(["xdotool", "windowminimize", match[0]])
        break
    except (IndexError, subprocess.CalledProcessError):
        pass
    t += 1
    time.sleep(1)

Note on the second script

Although in general the second version should be more reliable, in cases when the application is started by a wrapper script, the pid of the command will be different from the application that is finally called.

In such cases, I recommend using the first script.

EDIT2 a specific version of the script for Steam

As requested in a comment, below a version, specifically made for starting up STEAM minimized.

Why a specific version for Steam?

It turns out Steam behaves quite different from a "normal" application:

It turns out Steam does not run one pid, but no less then (in my test) eight!
Steam runs on start up with at least two windows (one splash- like window), but sometimes an additional message window appears.
Windows of Steam have pid 0, which is a problem in the script as it was.
After the main window is created, the window is raised a second time after a second or so, so a single minimization won't do.

This exceptional behaviour of Steam asks for a special version of the script, which is added below. The script starts up Steam, and during 12 seconds, it keeps an eye on all new windows of the corresponding WM_CLASS, checking if they are minimized. If not, the script makes sure they will be.

Like the original script, this one needs wmctrl and xdotool to be installed.

The script

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

command = "steam"
subprocess.Popen(["/bin/bash", "-c", command])

def get(cmd):
    return subprocess.check_output(cmd).decode("utf-8").strip()

t = 0

while t < 12:
    try:
        w_list = [l.split()[0] for l in get(["wmctrl", "-l"]).splitlines()]
        for w in w_list:
            data = get(["xprop", "-id", w])
            if all(["Steam" in data, not "_NET_WM_STATE_HIDDEN" in data]):
                subprocess.Popen(["xdotool", "windowminimize", w])
    except (IndexError, subprocess.CalledProcessError):
        pass

    t += 1
    time.sleep(1)

To use it

Simply copy it into an empty file, save it as runsteam_minimized.py
Run it by the command:

python3 /path/to/runsteam_minimized.py


Two NIC's - one for Internet, the other for LAN

The link to the geekstuff.com article is a very good explanation but does not describe exactly how to do this for a dual-homed scenario.

Assuming:

eth0 - office network with static IP address      (10.x.x.x addresses);
eth1 - Internet connection via router with DHCP   (172.168.1.x addresses)

The following worked for me:

sudo route add -net 10.0.0.0 netmask 255.0.0.0 gw 10.14.21.1 dev eth0
sudo route del default gw 10.14.21.1
sudo route add default gw 172.168.1.1 dev et

In my case, Internet access was needed temporarily, so the appropriate files were not modified to make this permanent.


Freezes with Ubuntu 20.10 on Lenovo Thinkpad T14 AMD

uninstall last kernel update, or install a previous kernerl, surely there was an update in the kernel not ok for your system.
Also ubuntu 20.04 is more stable thant 20.10 if you prefer for lts and stability.


How to run a python program in the background even after closing the terminal?

Use the shebang line in your python script. Make it executable using the command,

chmod +x test.py

Use no hangup to run the program in the background even if you close your terminal,

nohup /path/to/test.py &

or simply (without making any change in your program)

nohup python /path/to/test.py &

Do not forget to use &  to put it in the background.

Role of nohup: nohup makes your script ignore SIGHUP, and redirects stdout/stderr to a file nohup.out, so that the command can continue running in the background after you log out. If you close the shell/terminal or log off, your command is no longer a child of that shell. It belongs to init process. If you search in pstree you'll see it is now owned by process 1 (init).

To see the process again, use in terminal,

ps ax | grep test.py

That cannot be brought back to the foreground because the foreground (as the terminal already closed) no longer exists. So there is no way to get that terminal back again once it is closed.


How do I get Gajim to show up in Unity's system tray?

Well, in a strange twist, killing Gajim and restarting it seems to have worked.

Apparently the correct value is Gajim.


I've seen the same error today on a laptop running Ubuntu 15.10 which I always kept up-to-date but had not rebooted for a month until I wanted to test a current kernel (i.e., there might have been a recent change).

Anyways, I found that in my case the underlying cause was actually a "missing" swap partition due to a setup glitch when following the above tutorial. If this is the case and/or you're actually using lvm, you might be able to skip step 2 below.
Of course, you might also see the above error message in case your system (or a secondary data) partition has been damaged or cannot be found (see step 3).

Step 1: Mount your system, boot partitions following the aformentioned tutorial

Let's say your (ext2) boot partition is /dev/sdX1, your (encrypted) swap partition is /dev/sdX2, your (encrypted) data partition is /dev/sdX3 and you've successfully decrypted the latter using cryptsetup luksOpen /dev/sdX3 data, followed by mounting it: mkdir /tmp/data; mount /dev/mapper/data /tmp/data.

Pay attention to the bind mounts in the tutorial and make sure to mount /dev/sdX1 so that you can access it from your system partition's /boot directory (this is crucial as we have to execute update-initramfs).

In the following, we're assuming you've sucessfully executed chroot /tmp/data/@ubuntu1510 (or whatever your mounted system partition is called)

Step 2: Get rid of the above error message

I'm using btrfs (as you might have guessed from the mentioned subvolume name), so lvmetad can easily be disabled as follows without loss of functionality:

edit /etc/lvm/lvm.conf and change use_lvmetad=1 to use_lvmetad=0
execute update-initramfs -k $(uname -r) -u ; sync

Now, you could reboot and the error message should be gone. However, in my case, the next error message[1] pointed me to the underlying problem mentioned above, so while we're at it, ...

Step 3: Make sure that /etc/crypttab points to the correct, undamaged partitions

First, run sfdisk --list /dev/sdX and check that your encrypted swap partition (in my case, /dev/sdX2) actually does not show up as a (normal) swap partition. If it did (as in my case), this meant that booting, e.g., using a rescue disk will likely make use of that available swap partition, thereby overwriting your cryptsetup related metadata (keyphrase and UUID).

Next, have a look at /dev/disk/by-uuid and compare the respective UUIDs of your encrypted partitions with those contained in /etc/crypttab. My guess at this point: In your case, there's a mismatch.

If the dedicated encrypted swap partition is nowhere to be found below /dev/disk/by-uuid, that's because it's currently in use by your rescue system. In that case, do the following:

make sure to stop using the partition: swapoff -a
reformat it: mkfs.ext2 /dev/sdX2 (this is crucial, especially when using GPT partitions[2], as it undoes the glitch I mentioned earlier. The likely cause of the partition showing up as type "swap" in the sfdisk listing is that you/I mistakenly used mkswap /dev/sdX2 when setting up the partition in the beginning.)
follow the tutorial to encrypt the partition and set a passphrase; afterwards, open it using cryptsetup and properly reformat the now-decrypted partition (using something like mkswap /dev/mapper/swap)
ensure that sfdisk --list /dev/sdX will not identify the swap partition as such (in that case, repeat the last steps)

Now, recheck that the UUIDs listed in /etc/crypttab are in line which what you see below /dev/disk/by-uuid for your respective encrypted partitions.

Again, to make the changes permanent, you must execute update-initramfs as shown above.

If you're satisfied, make sure everything is written to disk and reboot the system (no need to unmount everything manually). Afterwards, your problem should be gone.

[1] maybe I did not pay attention the first time or the first error message "masked" the second one; i.e., only after rebooting (with use_lvmetad=0), I was presented with "Reading all physical volumes. This may take a while..." (repeated multiple times), followed by "ALERT! /dev/disk/by-uuid/... does not exist.". (It should be noted that update-initramfs also complained about a missing partition.)

[2] because their type is deducted from analysing their contents and not ultimately specified by a flag/byte (that's why there's no easy way to, e.g., change the GPT file system type using [g]parted.)


sudo nmap -sP 10.8.0.0/24(replacing the IP address as required) works for me.

Results look like

Starting Nmap 7.01 ( https://nmap.org ) at 2018-04-06 18:49 CDT
Nmap scan report for 10.8.0.8
Host is up (0.21s latency).
Nmap scan report for 10.8.0.1
Host is up.
Nmap done: 256 IP addresses (2 hosts up) scanned in 17.27 seconds


How do I install Windows on a computer with Grub?

It seems that you might deleted windows vista recovery partition.
Usually laptops doesn't come with OS installation CD, but comes with recovery partition that you can use to reinstall windows.

Do you have windows vista installation disc?
If not then your repair disc won't help, cause there is nothing to repair, you can try to download windows vista installation ISO and then burn it to a CD or make bootable USB drive with vista installation.


When partitioning with Gparted how do I create a 1 gigabyte partition?

Not everyone uses gigabyte with the same meaning. Gigabyte can mean 1 000 000 000 bytes, or 1 073 741 824 bytes.
Personally I use the IEC standard in which a gigabyte equates to 1 000 000 000 bytes, and a gibibyte is 1 073 741 824 bytes. Ubuntu
also officially uses this standard.

Steps:

Option #1 = If you consider a gigabyte to be 1 073 741 824 bytes, then input 1024 MiB in Gparted.

Option #2 = If you consider a gigabyte to be 1 000 000 000 bytes, as Ubuntu officially does then input 954 MiB [Which is slightly over as it should be 953.67431640625 MiB]

Useful Information:

If you consider a gigabyte to be 1 000 000 000 bytes then you can use parted to verify the size after partitioning in Gparted.

"sudo parted -l"

This will list the disk and partition sizes in gigabytes or megabytes with the assumption that 1 000 000 000 bytes is a gigabyte.

Screenshot of this = https://copy.com/NL3KZjzQRsre

Notes:

I believe Windows operating systems refer to a gigabyte as 1 073 741 824 bytes, as in this rather old article they refer
to divisions by 1024 rather than 1000. Things may be different now as this article is pre-NT. #h#t#t#p#://support.microsoft.com/kb/121839

Sources:

http://postbin.djun.net/pages/article19/page.php

h#t#t#p#s#://wiki.ubuntu.com/UnitsPolicy


Which Ubuntu is oriented to programming and robotics? server, desktop or other distro?

There "under the hood" difference between ubuntu flavours is very minor. All flavors use the same archive (use the same packages). Each flavor is basically just a set of default installed packages. You can install all flavors concurrently, or switch between them, by adding and removing packages.

So, no, there's no good reason to install "Ubuntu Server" if you are intending to use the machine as a desktop, and vice-versa.


Screen Saver Does Not Show When On Battery

Open Settings → Power Management Preferences, select the On Battery Power tab, and adjust the “Put display to sleep when inactive for” option to suit your needs.


Warning: Make sure you have a backup in case anything goes wrong.

Quick step-by-step:

Boot to live media.  Do not mount any hard drives or partitions.
Run gparted.  Choose swapoff for swap partition by right-clicking swap.
Expand/Resize Extended partition (sda2) to take up 4GB of remaining unallocated space.
Move swap partition (sda7) to end of Extended partition.
Move /home (sda6) next to swap partition.
Expand/Resize / (sda5) to take up rest of space between sda5 and sda6.

Hope this helps!


How to preview contents of an online archive before download

You really can't, in a generic sense.

You can use the Open in… feature in Firefox at least, which will download the file to the /tmp/ directory and open it in File Roller, the default archive application. Some file formats are not able to be opened, without both the beginning, and end, of the file in place, so the entire file must be downloaded, whether it is to /tmp/ or the location you wish to save it in. In Chrome or Chromium, the file will always be downloaded to the configured Downloads folder, regardless of whether you are saving it, or just want to open it for viewing.


Cannot mount NTFS volume; fixntfs doesn't resolve the problem

ntfsfix can only do basic NTFS repair tasks. It's main functionality is marking the file system dirty so that Windows will automatically scan it.


#!/bin/bash

# run this script,
# then select the appropriate display size in the display manager

# remove HD mode in case it exists
##xrandr --rmmode extHD &> /dev/null
##xrandr --rmmode extSD &> /dev/null

# add HD as additional mode
modeParam=$(cvt 1920 1080 60 | grep Mode | sed -e 's/.*"/r1920/')
xrandr --newmode $modeParam && xrandr --addmode VGA2 r1920
#xrandr --newmode \"$(cvt 1366 768 60 | grep Mode | sed -e 's/.*"/1366/')\" && xrandr --addmode VGA2 1366
#xrandr --newmode \"$(cvt 1280 720 60 | grep Mode | sed -e 's/.*"/1280/')\" && xrandr --addmode VGA2 1280
#xrandr --newmode \"$(cvt 1024 576 60 | grep Mode | sed -e 's/.*"/1024/')\" && xrandr --addmode VGA2 1024


Virtual keyboard and tablet mode for KDE

This stuff is implemented, with a few caveats:

It only works when using Wayland. On X11 there seem to be some ways to work around that though.
The virtual keyboard only works for Qt apps, although there is ongoing work to improve this
The tablet mode detection requires support for the hardware in the kernel, which sadly is missing sometimes


Here are the two solutions that have have worked for me.

Boot Linux from a Live cd or usb and make sure you’ve a working Internet connection and type the following on the terminal.

1. Solution

sudo apt-get install syslinux

If the package got installed, use the following command to write the MBR:

sudo dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda

2. Solution

sudo apt-get install mbr

If the package got installed use following to write the MBR.

sudo install-mbr -i n -p D -t 0 /dev/sda

Common for both

Replace sda if you want to install the MBR to a different drive. Do not put sda1,sda2,  or sda3. Just put it as sda for the hard disk. Finally reboot and your Windows should boot.


IDLE won't open .py files when I use ctrl+O

You need to edit this file /usr/lib/python2.7/idlelib/IOBinding.py:

def coding_spec(str):
"""Return the encoding declaration according to PEP 263.

Raise LookupError if the encoding is declared but unknown.
"""
# Only consider the first two lines
str = str.split("\n", 2)[:2]
for line in lst:

Replace str with lst:

def coding_spec(str):
"""Return the encoding declaration according to PEP 263.

Raise LookupError if the encoding is declared but unknown.
"""
# Only consider the first two lines
lst = str.split("\n", 2)[:2]
for line in lst:

I had the same problem and this worked for me.


From the official documentation of os module:

os.getlogin():

Return the name of the user logged in on the controlling terminal of the process

As the user raja is logged in on the tty where the python process is running, you are correctly getting the output raja.

To get what you want you can use the subprocess module to run native Linux commands on python:

$ who
foobar   :0           2015-11-01 18:04 (:0)
foobar   pts/1        2015-11-01 18:04 (:0)
foobar   pts/9        2015-11-01 18:04 (:0)

>>> python2
>>> import subprocess
>>> print subprocess.check_output("who")
foobar   :0           2015-11-01 18:04 (:0)
foobar   pts/1        2015-11-01 18:04 (:0)
foobar   pts/9        2015-11-01 18:04 (:0)

Or check the get_users() function from psutil package.


The annoyed configuration of java-6-openjdk

In my system (Ubuntu 10.04.LTS) /usr/lib/jvm/java-1.6.0-openjdk is symbolic link pointed to /usr/lib/java-6-openjdk directory.

In /etc/environments JAVA_HOME refers the link only.

Maybe you check this link in your system.


register DNS for connecting to my computer

You PC should already have a name. You can find out which one that is by executing command:

hostname

The ip address tied to that name is found via:

nslookup `hostname`

or alternatively:

ifconfig

But now back to your original question ;-)

You will only be able to access your computer at university remotely, if the university has set up remote access for their local network. You will have to talk to the IT department to find out how to access your computer remotely and what VNC or RDP software you have to install.

This can be set up in different ways, so there is no standard answer.


I want to be asked for password for mounting drives

To re-enable that feature, you have to change the default policy. Follow this procedure:

Open terminal with Ctrl-Alt-T keyboard shortcut.
Type the command below ( you can copy and paste at the terminal )
and hit Enter.

gksu gedit /var/lib/polkit-1/localauthority/10-vendor.d/com.ubuntu.desktop.pkla

In the first section, under the heading of [Mounting, checking, etc. of internal drives] There will be a line with  ResultActive=yes. Change the yes to auth_admin. The section after modification will look like this

[Mounting, checking, etc. of internal drives]
Identity=unix-group:admin;unix-group:sudo
Action=org.freedesktop.udisks.filesystem-*;org.freedesktop.udisks.drive-ata-smart*
ResultActive=auth_admin

Save the file by pressing Ctrl-S and Exit gedit.

The feature is now activated.


Is it possible to use WiFi Hotspot to serve files?

I have a solution for you and it implies installing software only on your laptop.

install hostapd to create a wifi access point
install dnsmasq to handle DHCP and DNS
install a webserver, like nginx
compress the files (e.g. .zip) and store them on the nginx root folder
connect any wireless device to that wifi access point and insert its ip address into a browser

I didn't gave you a tutorial as there are tons of tutorials on Google.

I know that it's a tedious process, but now you download any file from your laptop.

And you can go a step further to create a virtual domain on nginx to something you can remember (e.g. myfiles.com). This way you don't have to connect via ip address.


Get a mail notification whenever anyone connects a storage device

The simplest way to do this is to monitor for the word 'mount' in /var/log/syslog on a cronjob.  This sample would run every 10 minutes.

#!/bin/bash
# Gets the time and date 1 minute ago (00:00 would return 23:59 previous day)
TIME=`date +"%b %d %H:%M" --date '-1 min'`
# Truncate the minutes
TIME=${TIME::-1}

# Gets the past 10 minutes of logs and looks for 'mount'
MOUNT=`grep "$TIME" /var/log/syslog | grep mount`

if [ {{ '${#MOUNT}' }} -ge 1 ]; then
    echo -e "$MOUNT" | sendemail -t {{ email_address }} -f {{ from_address }} -u "$(hostname) Mount Detected" -s {{ smtp_server }} > /dev/null
fi

Make sure the date format matches what is in your logs.  You can use whatever sendmail command you wish.  If you wanted once a minute just remove the time truncate line.  If you wanted immediate, you'd need to monitor udisksctl monitor for output.  Once the email is sent, you can use any email notification for your popup.


When you changed the userid and groupid of the user you essentially "made" a new user without adding that user to the groups that the original was in. Type

groups

to see what groups a given user is in. By default on Trusty I am in the following groups:

eagle adm cdrom sudo dip plugdev lpadmin sambashare

Your problem user will likely be in no groups or only the user's personal group. To add more groups you will need to use the usermod command as root. In order to allow usb drives to be used you will need to execute

usermod -Ga plugdev login_name

where login_name is the name of your user. If you want to add all the default groups, execute

usermod -Ga adm,cdrom,dip,plugdev,lpadmin,sambashare login_name

If your user was able to use the sudo command, also add sudo to the above list.


Try to reorder gcc options, that is, use:

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


Dovecot Unable to locate package dovecot

First of all precise is outdated, install or upgrade to a newer version.

There is no package exactly named "dovecot" except the source package.

 $ rmadison dovecot | grep precise
 dovecot | 1:2.0.19-0ubuntu1   | precise          | source
 dovecot | 1:2.0.19-0ubuntu2.1 | precise-security | source
 dovecot | 1:2.0.19-0ubuntu2.2 | precise-updates  | source

You can download the source:

apt source --download-only dovecot

or compile it:

sudo apt build-dep dovecot
sudo apt source --compile dovecot

or install one of these packages based on your requirements:

dovecot-antispam
dovecot-dev
dovecot-ldap
dovecot-managesieved
dovecot-pgsql
dovecot-solr
dovecot-core
dovecot-gssapi
dovecot-lmtpd
dovecot-metadata-plugin
dovecot-pop3d
dovecot-sqlite
dovecot-dbg
dovecot-imapd
dovecot-lucene
dovecot-mysql
dovecot-sieve


The problem was finally resolved, with the help of Dr. Wenger from the Ohio State University, he suggested making 2 modifications to the CMakeLists of NrrdIO version 1.11.0, by setting the QNANHABIT value to 1 and uncommenting the line ADD_DEFINITIONS(-DTEEM_ZLIB=1) I've attached the modified CMakeLists file for reference:

# NrrdIO: stand-alone code for basic nrrd functionality
# Copyright (C) 2011, 2010, 2009  University of Chicago
# Copyright (C) 2008, 2007, 2006, 2005  Gordon Kindlmann
# Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998  University of Utah
#
# This software is provided 'as-is', without any express or implied
# warranty.  In no event will the authors be held liable for any
# damages arising from the use of this software.
#
# Permission is granted to anyone to use this software for any
# purpose, including commercial applications, and to alter it and
# redistribute it freely, subject to the following restrictions:
#
# 1. The origin of this software must not be misrepresented; you must
#    not claim that you wrote the original software. If you use this
#    software in a product, an acknowledgment in the product
#    documentation would be appreciated but is not required.
#
#   2. Altered source versions must be plainly marked as such, and must
#    not be misrepresented as being the original software.
#
# 3. This notice may not be removed or altered from any source distribution.
#

CMAKE_MINIMUM_REQUIRED(VERSION 2.4)
PROJECT(NrrdIO)
INCLUDE_REGULAR_EXPRESSION("^.*.h$")

#
# This CMake file configures the NrrdIO library build.  NrrdIO
# is used by Insight/Code/IO/itkNrrdIO for reading/writing
# "Nearly Raw Raster Data" within the open-source Teem software
# package. See http://teem.sourceforge.net for more information.
#

SET(nrrdio_SRCS comment.c enumsNrrd.c mop.c string.c 754.c defaultsNrrd.c
parseAir.c dio.c format.c parseNrrd.c formatEPS.c encoding.c
formatNRRD.c encodingAscii.c formatPNG.c encodingBzip2.c
formatPNM.c accessors.c encodingGzip.c formatText.c
array.c encodingHex.c formatVTK.c read.c arraysNrrd.c encodingRaw.c
gzio.c reorder.c write.c axis.c endianAir.c  keyvalue.c
biffbiff.c biffmsg.c endianNrrd.c methodsNrrd.c  sane.c enum.c
miscAir.c simple.c )

# Turn on TEEM_BUILD so that the proper dll export def's are
# used on windows builds.
ADD_DEFINITIONS(-DTEEM_BUILD=1)

#The QNANHIBIT variable is configured by the root level CMakeLists.txt
IF(QNANHIBIT)
  ADD_DEFINITIONS(-DTEEM_QNANHIBIT=1)
ELSE(QNANHIBIT)
  ADD_DEFINITIONS(-DTEEM_QNANHIBIT=1)
ENDIF(QNANHIBIT)

#DirectIO is the fast way to do multi-gigabyte I/O and currently only available
#for SGI platforms.  Use of DirectIO is enabled manually for now.
#OPTION(USE_DIRECTIO "Use DirectIO for Nrrd file IO.  Only valid on SGI systems." 0)
#MARK_AS_ADVANCED(USE_DIRECTIO)
#IF(USE_DIRECTIO)
#  ADD_DEFINITIONS(-DTEEM_DIO=1)
#ELSE(USE_DIRECTIO)
  ADD_DEFINITIONS(-DTEEM_DIO=0)
#ENDIF(USE_DIRECTIO)

# Possibly turn on usage of zlib compression (requires linking with libz)
# (i.e., programs compiled with ITKNrrdIO must also be compiled with zlib)
ADD_DEFINITIONS(-DTEEM_ZLIB=1)

ADD_LIBRARY(NrrdIO ${nrrdio_SRCS} )

## These are ITK-specific
#TARGET_LINK_LIBRARIES(NrrdIO ${ITK_ZLIB_LIBRARIES} )
#INSTALL_TARGETS(/lib/InsightToolkit ITKNrrdIO)
#INSTALL_FILES(/include/InsightToolkit/Utilities/NrrdIO "(\\.h)$")


Lubuntu 20.04 - unable to conect to wifi

This is a little embarrassing, but after another couple of days and restarts, the problem fixed itself. I still don't know what the problem was, since the only thing I changed is that moved closer to the wifi router (but now, even if I go to my original location, everything works fine).
The only advice I can give to people with the same issue is to take a look at this: My wireless/WiFi connection does not work. What information is needed to diagnose the issue? and to - unlike me - use the wireless info diagnostic script: https://github.com/UbuntuForums/wireless-info


How do I install the graphic drivers on an HP Workstation xw4100?

Before installing the nvidia drivers, you should first try installing them from System -> Administration -> Additional Drivers

See https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia for additional details.

If for some reason you feel you need to manually install the driver, you first need to install a few dependencies

sudo apt-get install build-essential linux-headers-`uname -r`

Then run the Nvidia .run as root.

See https://help.ubuntu.com/community/NvidiaManual for additional details.


"Always on top" option missing for Firefox/Chrome in 18.04

I am on 20.04, and have only Firefox installed: I could experiment only with that, and not with Chrome.
I could reproduce your issue: when I right-click anywhere on Firefox's window or on the top window decoration, the "Always on top" option is missing, along with other common window-manager related options.
Yet, they can be accessed; the only condition is that the window needs to be in non-maximized state.
When one moves the mouse cursor along the edges of a (not maximized) window, the cursor changes to indicate that a click-drag along that edge would start resizing the window.
When the cursor is in this resizing mode, a right-click reveals the original window-manager context menu, along with the "Always on top" option, which even works as intended.
Bonus:
The size of the drag-to-resize area is configurable:
gsettings set org.gnome.mutter draggable-border-width 20

This will give you a 20px range along the window edges to expose the desired resizing mode.


No "erase disk" option when installing Lubuntu 19.04 [solved]

As suggested in the Lubuntu manual, the installer will not give you the "erase disk" option if you have anything on the target device mounted:

  If you have had a previous linux install and want to put the entire disk or just replace an entire partition you will need to unmount them.

The most likely cause for this is that swaps have been automounted. This is a "feature" of the Ubuntu ecosystem to provide as much memory for the live system as possible. Here, too, the manual provides the solution:

  In this case running

  sudo swapoff -a

  will unmount them and any partitions with data mounted can be unmounted through pcmanfm-qt.

I have also seen a few cases where partitions on eMMC devices (which is what your target is) seem to be automounted, though not having the hardware myself, I cannot confirm this.

There is an upstream bug to provide some other solution to this issue.


Wrong underscan settings after reboot in 12.10 x64, with (fglrx open source) AMD HD7850

What worked for me is opening AMD CCC non-administrative and adjusting the over scan to 0, then reboot and it works. For some reason the admin side doesn't persist but non-admin does.


I am taking my laptop for repair. How do I secure it as much as possible?

If it's your screen being repaired, consider removing the harddrive before hand.  This suggestion makes three assumptions

The harddrive is removable
You have enough confidence to open the case - in which case you might be able to perform the screen repair your self
There is another bootable drive (such as a DVD) in the unit.  The repair people are going to want to boot something to verify the screen repair.


To see if wxpython is installed we may try to import it in the Python interpreter:

>>> import wx

In a script, we can also check for wxpython with:

#!/usr/bin/env python

try:
    import wx
except ImportError:
    print('wxpython is not installed')

In Ubuntu wxpython is not installed by default but we can easily install the basic Python modules (need 35.1 MB of disk space)  with:

sudo apt-get install python-wxgtk2.8 python-wxtools

Still, additional packages may be needed for other applications. For further details on this also see

wxPyWiki - Installing on Ubuntu or Debian


How do I extend my disk space with wubi?

Instead of sudo bash wubi-resize_1.5b.sh 80 type sudo bash wubi-resize_1.5b.sh --max-override 80.

Make sure the 50GB, next to your Ubuntu partition, are free.


Problem with latest nvidia driver provided by Canonical

I'm having problems with that update too!
I used to use the 319 drivers in Ubuntu, but since the update, I'm now using the 304!

Can I just uninstall it and use the new one (331.20)?


Configuring for automatic boot over Avahi kernel requires an x86-64 but i686 detected

There's currently no USB image for i386 but it is in progress of being created. Another option for you would be to create a USB Disk of the Ubuntu Server ISO and select:

"Multiple Server Install with MAAS"

Then proceed until you find yourself with

"Install or Enlist with Ubuntu MAAS Server"

And select one from the list or input one.


Instead of just redirecting stderr with 2>, replace it with  2>&1 to redirect both stdin and stderr to /dev/null
cvlc -q --play-and-exit /usr/share/sounds/My_Sounds/Alarm-sound-buzzer.mp3 > /dev/null 2>&1


Is there a command to show aggregate/merge results of all systemd conf.d drop-in files?

For service units you list all the properties with systemctl show or use option -p or --property to list just one. You can also use systemctl cat to concatenate all the various files, though without any merging of the information. Eg, for my http.service:
$ systemctl cat httpd
# /usr/lib/systemd/system/httpd.service     <--highlighted
....
[Unit]
Description=The Apache HTTP Server
...
[Service]
...
PrivateTmp=true
...

# /etc/systemd/system/httpd.service.d/override.conf  <--highlighted
[Service]
PrivateTmp=false
UMask=0002

The above shows by a comment (highlighted in a terminal) the name of each of 2 files followed by its contents. You can see how the override.conf file provides a different value for PrivateTmp.  You can see the resulting value with
$ systemctl show  --property=PrivateTmp httpd
PrivateTmp=no

However, this doesn't work with other units, like httpd.socket, which you can show as above, but which fails on a property in the files that I overrode:
$ systemctl show  --property=ListenStream httpd.socket
Property ListenStream does not exist.

I'm using version 231, things may have changed.


In the ~/.config/geany/filedefs/filetypes.python file:

/usr/bin/python3  -i '%f'  | tee run.log

Replace with

/usr/bin/python3  -i '%f'

Fixes the problem.

I may have put that in myself long ago...


How can I troubleshoot a failed local network VNC connection?

It seems that the protocol option VNC - Incoming Connection is not what you expect.

Remmina's wiki page talks about reverse VNC connection support.

This means that it reverses the usual procedure of a client connecting to a server.
It's mainly used when firewall/NAT issues are involved.

So, remmina on machine A is waiting for a VNC server on machine B to connect to it.
Therefore, remmina is still the client-side of the connection, not the server-side.

I've made the following test in order to give you an example of how the whole thing works:

Created a new VNC - Incoming Connection to my linux box and started it.
Now remmina is waiting for an incoming request from a VNC Server - not a VNC client
Started tightVNC server on my windows box and selected attach listening viewer and added the ip address and port of my linux box
Now my windows box is accessed remotely from remmina client.


Swap-able OS booting from external different drives

It's possible to boot with multiple OS ("dual" boot is not actually restricted to two) from an external drive, but if by "switching between them freely" you mean swapping them on the fly, then no: you'd need to reboot the laptop anyway to boot into a different OS (or "hibernate"; as long as the RAM is not engaged). This would still be the case even if both operating systems were on the same disk.


How to debug computer not shutting down issue on 21.04?

Do your shutdown command, then wait 35 minutes. There are some 30 minute timeouts.In a terminal window, the command sudo journalctl -b -1 -e will show you the end of the previous boot's logs. Check for "timeout" messages.


The first thing you should do is to back up any files you want to keep from the My Documents Folder.

You may need to repair your GRUB which can be done by following these guidelines

Next, in gparted, the programme you used in your screen shot in your question, Right click on the Windows 7 partition /dev/sda2 and select unmount next right click on the same partition and select delete to remove the partition. This will completely wipe windows ad ALL files on the windows partition

Now you will have a blank space on your hard disk where Windows used to be. Next you will want to resize the partition with Ubuntu on it to reclaim the unused disk space.

I have never done this, so you may need to format it first. I'm afraid that you will have to either look it up or work it out with trial and error. Please see Jez W's comment below


Is Ubuntu Touch a separate distribution or the same one?

Ubuntu Touch is a mobile version of the developed by Canonical UK Ltd and Ubuntu Community. It is designed primarily for touchscreen mobile devices such as smartphones and tablet computers with only supported x86 and ARM CPU architecture.

If you have a Samsung Galaxy Nexus or Google Nexus 4 smartphone, or a Nexus 7 or Nexus 10 tablet, you can download and install a touch-friendly version of Ubuntu on your device.

You'll need a computer running Ubuntu, a decent internet connection, and the ability to accept all responsibility of something goes horribly wrong. But here's basically how the process works.

It's a good idea to make a backup or your device before you start. If you've already rooted your device and installed a custom recovery, you can use ClockworkMod, TWRP, or a similar program to do that.

You can follow installation tutorial from Ubuntu Wiki and also here is step by step Run the latest Ubuntu Touch on your Nexus device tutorial


How do I get rid of invalid characters in a plain-text file when using Gedit?

This could in principle not happen if you exclusively use Gedit to edit the file. Characters in that case would be automatically converted to the character code of the current text file.
If for one reason incorrectly encoded characters would be introduced, then one way to find out where they are would be to use
grep -axv '.*' file.txt

(credit goes here). That command will only show lines containing invalid characters. To facilitate identification of the line, you can add the -n option to display the line number.
Then open the file in Gedit, continuing past the warning message that is given. You then can edit out the wrong characters. Save and close, then reopen the file. If no warning is issued anymore, all wrong characters have been removed.


Accidentally deleted all contents of /etc/grub.d

Boot with your Live USB / DVD.

Open Nautilus in root mode using:

sudo -H nautilus

Then navigate to your /etc directory and copy the grub.d directory.

While still in nautilus root mode navigate to your real /etc directory on your hard drive SSD and paste the grub.d directory into it.

Note: You may have to mount your real Ubuntu first if nautilus doesn't see it on the hard drive / SSD: How to mount a partition from live usb


Xubuntu boot time slowed after upgrade to 12.10

My PC used to boot Xubuntu 12.10 (installed on a SSD) within just 5 seconds after grub loaded, but somehow, it become very slow recently , which takes about 40-50 seconds to see the desktop , so I removed all my xfce & gnome config files in my home directory, and it start booting fast again.  finally I figured out that my ~/.fonts is the causing the problem.

Now my Xubuntu boots as fast as before after all my fonts is moved to:

/usr/share/fonts/truetype/my-fonts-folder.


cannot get the gedit autotab plugin to work

In a default installation the automatic indentation feature of gedit is found in Edit -> Preferences... -> Editor:


What happens to shift-alt-f[1..12] in Gnome desktop?

Yes, the X server wants the ctrl added to switch VTs.  Hold down ctrl if you are on a VT running X.


Virtualbox 6.0.4 or 5.138 not working with Kernel 4.4.0-143-generic Xubuntu 16.04

I have host with VirtualBox 5.1.38 and guest running Ubuntu 16.04.6 LTS with 4.4.0-143-generic kernel from xenial-proposed.

I can confirm that installing guest additions from virtualbox-guest-x11 APT package does not work. I have the following error message after login:

So I have reported bug 1818148 to LaunchPad.net. And I have discovered that 4.4.0-142-generic is also affected.

But installation from VBoxGuestAdditions_5.1.38.iso works on my guest system.
What is bad - this way is breaking recommendation given in similar Q&A before.

Update: the real bug is 1818049, it was reported on 2019-02-28 10:57:21 UTC.


How to dual boot ubuntu with Windows 7 without losing my files?

If you really don't know what you are doing, leave that part alone and go on to the next step. The default settings are fine unless your laptop has a very small amount of space left. What this step does is has you allocate space to each operating system. As long as you don't give to little space to Ubuntu or (more likely) Windows, you will be fine. Here, it is safest just to go to the next step.

I hope this helps and have fun with Ubuntu (I know you'll love it!)


Use tar to archive automatically file in volumes

A simple way is to just tar the file, print the archive to standard output and pass it through split:

tar czpf - file0 | split -d -b 10M - file0

Note that this isn't quite what you tried. The command you have in your comment (tar czpf - . | split -d -b 10M - file0) was using . as input. That means that the input "file" for tar, the current directory, changed as soon as split started writing its output files into the current directory, so tar complained. To avoid that, either give tar the file name as I did above, or run this from another directory:

cd /some/place
tar czpf - /path/to/dir/containing/file0 | split -d -b 10M - file0

In both cases, to untar the file, you'll have to cat the files to join them:

cat file00* | tar xzvf -


What is a simple command/process I can run to prevent Ubuntu from sleeping?

You could install and use Caffeine.
It does what you want.

But if you want a command to do that without installing anything, check
out gnome-session-inhibit.
If you're using Unity or GNOME (and maybe others), it should do what you want.

Check the man page of that command.

gnome-session-inhibit gedit: should open gedit and inhibit the lock screen
from activating.
gnome-session-inhibit --inhibit suspend:idle gedit: should also inhibit suspend.
gnome-session-inhibit --inhibit suspend:idle --inhibit-only: should do the
same until Ctrl+C is pressed, without opening gedit.


Ubuntu 18.04 doesn't recognize Kindle Paperwhite

It was a problem with the JBL USB cable.
From what I realized this cable only serves to recharge devices and not to transfer files.


Windows 7 and Ubuntu 13.04 dual boot, GRUB menu not showing

Boot up a live usb and try to repair the bootloader with these commands:

sudo add-apt-repository ppa:yannubuntu/boot-repair

sudo apt-get update

sudo apt-get install boot-repair

After installing 'boot-repair' launch this program from dash by searching for the term and click its icon to launch it.

If this doesn't work then boot into Windows 7, download and install a freeware called 'EasyBCD' (latest version is 2.2)

After installing this tool, select 'add new entry' column and install grub under the Linux tab.

Sorry I'm on my phone now so I can't add links and pictures to the post. I'll surely edit this post today when I get to the house

Hope this helps.


The Wacom Tablets sometimes misidentify the Linux computer as an Android device.
To change that you can follow the steps posted by Aquiles Carattino in
Wacom Intuos CTL-4100 not working on Ubuntu 18.04


what is the minumim required packages for installing open java 8

Short answer:

Generally JDK is suitable for any cases, so if you don't know what to install - simply install JDK.

openjdk-8-dbg

Package that consists bring debugging symbols. Debug symbols come with JDK by default, but sometimes you have to install them separately.

openjdk-8-demo

Package that consists of demos and examples. This package bring some sources with README that explain examples.

openjdk-8-doc

Package that consists of Java documentation. This package is also comes with JDK by default.

openjdk-8-jdk

Package that consists of JDK - Java Development Kit. If you want to develop java applications you need this package. Otherwise you probably need JRE.

openjdk-8-jre

Package that consists of JRE - Java Runtime Environment. The Java Runtime Environment (JRE), also known as Java Runtime, is part of the Java Development Kit (JDK), a set of programming tools for developing Java applications. The Java Runtime Environment provides the minimum requirements for executing a Java application; it consists of the Java Virtual Machine (JVM), core classes, and supporting files [source].

openjdk-8-jre-headless

Package that consists of JRE, but package does not provide dependencies used for the graphical components.

openjdk-8-jre-jamvm

Package that consists of JRE with JAMVM virtual machine. JamVM is an open-source Java Virtual Machine that aims to support the latest version of the JVM specification, while at the same time being compact and easy to understand.

openjdk-8-jre-zero

Package that consists of JRE with ported JVM, this port called zero-assembler Hotspot (or zero).

openjdk-8-source

Package that consists of OpenJDK source code. OpenJDK is a development environment for building applications, applets, and components using the Java programming language.  This package contains the Java programming language source files (src.zip) for all classes that make up the Java core API [source].


Is it possible to start an application without a window manager?

It is possible to use startx to start an xwindows server, then run the game.  This may not provide a good experience as some services may not have been started.

Choosing a lite-weight windows monitor such as is provide by the lubuntu or xubuntu installations may provide a better experience without a significant performance impact.  Disabling widgets may gain a little bit of performance.