You could create a folder, for example in your home directory, called MyTheme. This directory should contain another directory called stereo and a file called index.theme. The index.theme file should contain the following:

[Sound Theme]
Name=MyTheme
Directories=stereo

[stereo]
OutputProfile=stereo

Next would be, that you paste your soundfiles to the stereo folder. The sound files should be *.oga, *.ogg, or *.wav, or *.sound (not sure about that) filetype. They have to be named like you can see here: https://packages.ubuntu.com/disco/all/yaru-theme-sound/filelist

Next would be that you create a folder in you home directory called mytheme_1.0-1 with mkdir mytheme_1.0-1 and then you need some more subdirectories. You can create them with

mkdir mytheme_1.0-1/usr
mkdir mytheme_1.0-1/usr/share
mkdir mytheme_1.0-1/usr/share/sounds

Now you need to copy the directory you created first to the last subdirectory of the folder you created later with cp -r MyTheme mytheme_1.0-1/usr/share/sounds/

After that you need to create another subfolder called DEBIAN with

mkdir mytheme_1.0-1/DEBIAN

and then you need to edit a file inside of that folder with

gedit mytheme_1.0-1/DEBIAN/control

That file needs to contain something like:

Package: mytheme
Version: 1.0-1
Section: base
Priority: optional
Architecture: amd64
Depends:
Maintainer: Your Name <you@email.com>
Description: MyTheme

Just save the file and run dpkg-deb --build mytheme_1.0-1 in your home directory. Now you need to install the package you created. You can do this with sudo dpkg -i mytheme_1.0-1.deb from your home directory.
At last you can choose your sound theme using the gnome-tweak-tool.
If you want to uninstall the package just run sudo apt purge mytheme.

Good luck


How to update BIOS of Asrock H67M motherboard?

You can try to reset you BIOS using the jumper on the motherboard, its jumper marked CRLCMOS1 in the PCB.

Flip it 1 position wait 10 seconds and set it back to the previous position.

After that the update method should work, if not you should assume that your motherboard is really defect.


How can I know what programs some apt-get package contains?

Here are a few options, these will list all the files installed by a package:

A. Listing all files included in a package

For installed packages

dpkg -L ncurses-term

For all packages, installed or not

apt-file -F list ncurses-term

The -F turns of pattern matching so that only packages whose exact name matches are returned. You may need to install apt-file with sudo apt-get install apt-file and then update its database with sudo apt-file update.

B. Listing only executable files included in a package

For installed packages

Just install dlocate (sudo apt-get dlocate) and run:

dlocate -lsbin ncurses-term

As explained in man dlocate:

  -lsbin List  full  path/filenames of executable files (if any) in package

If you don't want to install additional packages, you can do this manually. Just collect the list of files and find any among them that have the executable bit set:

apt-file -F list ncurses-term | cut -d ' ' -f 2 |
    while read file; do [[ -x $file && -f $file ]] && echo "$file"; done

The little scriptlet above will print the path only (cut -d ' ' -f 2) and then pass it through a while loop that checks if the file is executable (-x $file) and if it is a regular file, no directories or symlinks (-f $file) and prints its name only if passes both tests.
For all packages, installed or not

There is no way I know of to list only executables included in an uninstalled package. However, since most executables are installed to bin directories, you can get most of them by parsing the output:

 apt-file -F list ncurses-term | grep -Ew "bin|sbin"

The -w option matches entire words, so you don't get things installed in, for example, trashbin or whatever.

NOTE: None of the above commands will produce any output for ncurses-term but that is because this package installs no executable files. The commands work nevertheless, try with a different package.


Can't install Skype because of 'ia32-libs-multiarch' several dependencies

I had a similar problem with broken dependencies when trying to install wine and acroread, and a complaint when trying to install ia32-libs-multiarch, just after upgrading to 12.04 from 11.04 (passing over 11.10). It seems that some ppa's I had in 11.04 installed newer versions of applications in the system. After upgrading, the remains of these apps seemed to do some mess in the dependencies.

The solution that seems to work (until now), was found on a german ubuntu board (http://forum.ubuntuusers.de, posts from user Lasall):

First a downgrade is required and done with the following:
create the 'preferences' file:

sudo vi /etc/apt/preferences

and insert the following lines:

Package: *
Pin: release a=precise*
Pin-Priority: 2012

Pin-Priority must be greater than 1000.

Then you may downgrade the offending applications with:

sudo apt-get dist-upgrade

Then you may install packages that complained about dependencies, like
sudo apt-get install ia32-libs-multiarch, or sudo apt-get install ia32-libs.

Finally, you should remove the file you just created:

sudo rm /etc/apt/preferences

because else no new updates would be found.

Hope this helps you too!


What are the default mount settings for mount / fstab?

The manual is correct. Your issue is that perhaps you didn't account for 3 important details:

users (and user) implies the options noexec, nosuid, and  nodev
Unless overridden  by subsequent options
Options order matters ;)

So when you use rw,nosuid,nodev,exec,users in your fstab, the last option, users, sets noexec,nosuid,nodev, thus disabling your exec (and also making your nosuid,nodev redundant).

The result, as expected, is rw,noexec,nosuid,nodev.

And no, users was not ignored, it just doesn't usually show in mount listing output. But any user can unmount it and mount it back again. Try it!

rodrigo@desktop ~ $ mount /dev/sda6                     # ordinary user
rodrigo@desktop ~ $ mount | grep /dev/sda6
/dev/sda6 on /mnt/mint10 type ext4 (rw,noexec,nosuid,nodev)
rodrigo@desktop ~ $ /mnt/mint10/bin/echo it works       # noexec will deny this
bash: /mnt/mint10/bin/echo: Permission denied

mount will only show something related to user if user (not users) is used, and an ordinary, non-root user mounts it, like this:

rodrigo@desktop ~ $ mount /dev/sda6         # ordinary user
rodrigo@desktop ~ $ mount | grep /dev/sda6  # it will list current "owner"
/dev/sda6 on /mnt/mint10 type ext4 (rw,noexec,nosuid,nodev,user=rodrigo)
rodrigo@desktop ~ $ umount /dev/sda6
rodrigo@desktop ~ $ sudo mount /dev/sda6
rodrigo@desktop ~ $ mount | grep /dev/sda6  # since owner=root, it won't show
/dev/sda6 on /mnt/mint10 type ext4 (rw,noexec,nosuid,nodev)
rodrigo@desktop ~ $ umount /dev/sda6        # only mounter can unmount
umount: only root can unmount LABEL=MINT10 from /mnt/mint10

Also notice that, when using user without noauto, the partition will be automounted (by root) on boot. So until root unmounts it, no one will be able to unmount or (re-)mount.

That said, I guess you already figured out your solution: simply change the order of your options and everything will work fine:

LABEL=NewHome20G  /media/NewHome20G  ext3  users,exec  0  2

Notice how exec is after users. And also rw,nosuid,nodev is not necessary. rw is already a default, and the others are automatically turned on by users

And the result is:

rodrigo@desktop ~ $ mount /dev/sda6                  # user mount
rodrigo@desktop ~ $ mount | grep /dev/sda6
/dev/sda6 on /mnt/mint10 type ext4 (rw,nosuid,nodev)
rodrigo@desktop ~ $ /mnt/mint10/bin/echo it works    # exec works
it works
rodrigo@desktop ~ $ sudo umount /dev/sda6            # root unmount
rodrigo@desktop ~ $ sudo mount /dev/sda6             # root mount
rodrigo@desktop ~ $ mount | grep /dev/sda6
/dev/sda6 on /mnt/mint10 type ext4 (rw,nosuid,nodev)
rodrigo@desktop ~ $ umount /dev/sda6                 # user unmount
rodrigo@desktop ~ $

Meaning any user, root or non-root, can mount and unmount it, regardless of who previously mounted or unmounted it. And executables works too :)


Is there a way to use the search functions of synaptic from the command line?

Yeah use aptitude!

If you want to search for something out of the installed packages try:

aptitude search '~i <other search terms>'

And you can negate the ~i so this would search packages that are not installed:

aptitude search '!~i <other search terms>'

aptitude can do a stupid amount of stuff and it's sad to see it being removed from future versions of Ubuntu (by default - you can still install it).

You can read more about aptitude's search terms here.


Access user group history (see what groups I was in before I ran usermod without the -a flag)

I booted into single-user mode by editing Grub to:

make the filesystem rw instead of ro, and
adding init=/bin/bash at the end of the line.

After that I was able to add myself back into the sudo group using:

usermod -aG sudo my_user_account

I then rebooted back into "normal" mode. Ran sudo grep group /var/log/auth.log and was able to see the command I ran that removed me from my groups, and it listed the groups I was removed from.

I went through each of them again doing sudo usermod -aG _group_ my_user_account.

Once I did that, I logged out and logged back in and everything seems to be back to normal. Hope this helps someone else who made the same mistake I did.

You'd think after 16 years of using Linux, I wouldn't make boneheaded mistakes like this, but apparently not...


Is there a standard WiFi driver for the Edimax EW-7811Un?

This worked on Ubuntu 14.04 LTS and 14.10 (tested and works)

sudo apt-get update && sudo apt-get install git build-essential linux-headers-generic dkms

git clone https://github.com/dz0ny/rt8192cu.git --depth 1

Currently, as of 22/04/15, there is a bug when installing this with GCC 4.9 or newer. To fix this bug remove line 1580 from rt8192cu/os_dep/linux/usb_intf.c This line should read:

DBG_871X("build time: %s %s\n", __DATE__, __TIME__);

Lastly run

cd rt8192cu

sudo make dkms

Reboot and you are done.

Source


SCAP Compliance Checker, Ubuntu STIG compliance

I'm a little late to the party, but there are now officially published STIGs that cover Ubuntu - but only version 16.04 LTS.  The direct link to the STIG is: direct download link (as of 19-Jan-2020).

Canonical's press announcement was provided as a shortened URL link displayed in my Server 18.04.1 LTS banner page: Canonical's Current Security Certifications

I will edit this answer if/when I get an opportunity to apply the STIG.

Since websites are dynamic, below is an image of the pertinent DISA page with a link to that page here (in case the STIG is updated or new versions are added): DISA UNIX / Linux STIG page:


evince crashes when I try to open some pdf

This looks to be a bug that was fixed in poppler 0.72.0-1.  As a workaround to updating, okular works for me.


Secure boot not enabled + don't show disk partition in install type

First, neither the "Secure Boot not enabled" nor the "binary is whitelisted" messages are errors. Those messages are displayed by the shim program, which is one of two programs for working with Secure Boot systems. The "Secure Boot not enabled" message means just that -- the computer is configured to boot without Secure Boot (or it doesn't support Secure Boot at all). The "binary is whitelisted" message means that the follow-on program (typically GRUB) is registered with a valid key. These are not errors and they are not diagnostic of any problems. Unfortunately, the follow-on program will sometimes crash without displaying any output, thus making the normal shim status messages look like errors, but they aren't, and trying to act on these messages as if they were errors can result in wasted time. I do recommend, however, returning to your firmware setup and disabling Secure Boot; it can cause problems in some cases, so it's best to proceed with it disabled until you get things working. If you want to use Secure Boot in the long run, you can re-enable it later.

Beyond that, it's unclear to me precisely what you've done. It sounds as if you've deleted Windows 8 and adjusted your partitions in some way, but it's not clear what happens when you boot the Ubuntu installer. You write that "while installing it won't show my disk partition on install type," which implies that the installer is running but you're having problems with the partitioning. It sounds like you're seeing a completely blank partition table, but I'm not really 100% positive of that. If I'm right, then that indicates either leftover RAID data or a damaged partition table. You may be able to fix a damaged partition table with gdisk -- see its documentation for details. To provide more precise advice, I'll need more details. The output of gdisk -l /dev/sda and sgdisk -v /dev/sda would be most helpful. (You'll need to install the gdisk package to use the gdisk and sgdisk commands; or run them from Parted Magic.)


Wireless on Lenovo Yoga 3 Pro 1370 not detected by Ubuntu 19.04

I figured out a way to get this done. As I mentioned in the orig post, the problem was that I had no way of accessing the Internet to run apt-get commands, as the laptop has no Ethernet port.

Or so I thought. I completely forgot about tethering a phone using a USB cable. I tethered my Android phone and was able to follow the instructions in this Ask Ubuntu answer.

That applied to my Yoga 3 Pro because, as stated in my question, I have a Broadcom adapter.

Hope this helps others who find themselves in my predicament.


lspci | grep NVidia is a wrong command. There is no NVidia in lspci output. That is the reason you get an empty output.

lspci | grep NVIDIA could show your adapter.

Run lspci -k | grep -EA3 'VGA|3D|Display', or lspci -k | grep -EA3 'VGA|3D' to see your adapters.


E: Version '2.48.2-0ubuntu4.1' for 'libglib2.0-0' was not found

Here is how I fix the problem:

Edit the training/object_detection/Dockerfile and replace the line:

  libglib2.0-0=2.48.2-0ubuntu4.1 \

with:

  libglib2.0-0 \

will fix the issue by removing the hardcoded glib version.


How can I decrease size of my Ubuntu partition?

You need to boot from another media for doing something like this, you can't (at least without a HUGE chance to screw up everithing) change the partition without unmount it, and unmount the system partition and continuing using the system isn't a easy task.

For doing what you are asking, is better to boot from a live cd and change the partition from it. The  Ubuntu trial have gparted available, and from it you can resize your partition.

Remember that if you install something (read windows operating systems) that isn't grub aware, your installation will cover grub, and you will not be able to boot from Ubuntu without reinstalling grub. The same can happen if you move the partition instead of only resizing it.

EDIT: I noticed that OP was using lvm, and so gparted only will not do what it needs.

See here for a tutorial on resizing with system-config-lvm.


Strange issue - Unable to uninstall WPS Office in Ubuntu 20.04.1

To uninstall the WPS Office snap via the terminal:
sudo snap remove wps-2019-snap


How to update form 10.10 to any supported version

It is better for you to upgrade your ubuntu version. Either download a new version iso image and install using it, or run the command

sudo do-release-upgrade

It will automatically upgrade your system by downloading packages.


Ubuntu 12.10 hotkeys not working properly

This is a known problem in 12.10. I made a bug report here:

https://bugs.launchpad.net/unity/+bug/1058486

which talks about the problem but this is still a development version of Ubuntu so we need to wait until the final release to see if this issue is solved.


Drag and drop in Nautilus sometimes does not work

While dragging a file/folder to another folder,you should wait till the icon of destination folder changes from this:

to this:

Note that your icons may differ depending on your theme,but the idea is,you should wait until the destination folder responds to your drag.


How do I remove the "Switch Input Method" icon from my desktop?

My computer with Lubuntu 14.04 32 bits has got the IBus icon in the taskbar, but it does not look like that. I can make a right click on it and ask it not to appear.

You can also check the autostart application in "default applications for LXSession" in the preferences sub-menu. You might solve this by disabling that "known application" in the autostart tab.

Anyway, Lubuntu 14.04 has already been released.

PS: I am aware that Ubuntu 14.04.1 has already been released, but I cannot find any single piece of news of Lubuntu 14.04.1 at www.lubuntu.net. However, it is true that lsb_release command shows that my computer is running Ubuntu 14.04.1. Any improvement in my poor message will be welcome.


Actions to take when closing the laptop lid are configured with command gnome-power-preferences (menu: System -> Preferences -> Power management)

You will need to set two options: "When laptop lid is closed" to "Do nothing", and also "Put computer to sleep when inactive for" to "Never" (otherwise the laptop won't sleep automatically when you close the lid, but will soon afterwards because it's inactive).  Note that these options have separate values for "AC power" and "Battery power": of course, you'll have to configure the correct one for your case (or both).

*Note: You may have to run the following command for the option to show up:
gconftool-2 --type string --set /apps/gnome-power-manager/buttons/lid_ac "nothing"


Inspiron 5558, install another OS alongside Ubuntu

When editing partitions you can only expand partitions in front to absorb un-allocated space behind it. You can move partitions forwards or backgrounds. It's best to back up your files before doing the next part.

If you boot Ubuntu from a CD or USB there is an app installed, called GParted (I assume you know that because you know to boot it from a CD or USB, but I'll explain it just in case). Run that. I would suggest leaving the recovery partitions alone (I don't know what these are called, I'm not on a Dell computer--Also, those are the ones you should leave alone). These are used for the computer saving OS's if they stop working properly. You can make partitions larger only if they're in the front, so make sure whichever ones you want to use are moved to the front.

When I did this, it took me doing this two or three times before it actually worked, so try a few times before giving up. Good luck!


Asus x552cl headphone output not working on 14.04

I managed to fix the damn thing, here is the configuration i used

# Ubuntu #62691, enable MPU for snd-cmipci
options snd-cmipci mpu_port=0x330 fm_port=0x388
# Keep snd-pcsp from being loaded as first soundcard
options snd-pcsp index=-2
alias snd-card-0 snd-hda-intel
alias sound-slot-0 snd-hda-intel
# Keep snd-usb-audio from beeing loaded as first soundcard
options snd-hda-intel model=headphone-mic probe-mask=1 position-fix=1
options snd-usb-audio index=-2


How do I install Ubuntu 12.10 from 12.04?

Assuming you can get into your system

BACK UP any data
Let the partial upgrade complete if possible
Once this is done then run update manager again

It is very important not to start an upgrade unless you can complete it in your current session.


How do I get past the boot error: failed to fetch board data for bus=pci,vendor=168c,...?

I doubt that the message you reference has any bearing on the failure to boot except into emergency mode. I rather suspect the ACPI errors and exceptions that precede it.

The message merely means that the requested firmware file for your wireless device isn't found as expected or else, very rarely, it may be corrupted. You can confirm this by blacklisting the wireless driver so that it doesn't look for the firmware and, presumably, hang. Once you are booted into emergency mode and gain the root prompt, do:

echo "blacklist ath10k_pci" >> /etc/modprobe.d/blacklist.conf
systemctl reboot

Now does it boot normally every time? If not, look elsewhere for the problem.

EDIT 1: Please boot and when you are in Emergency Mode, run:

dmesg | grep Command

You shoulld see something like:

[    0.000000] kernel: Command line: BOOT_IMAGE=/boot/vmlinuz-5.3.0-40-generic root=UUID=xxxx ro quiet splash vt.handoff=7

Now boot into the live USB session and do the same. Are there differences in the command line options for each? Please post both as an edit to your question.

Next, please interrupt the boot process at the GRUB menu. Are you able to select and boot into an earlier kernel version successfully?


Error while installing pip install pgadmin4-1.4-py2.py3-none-any.whl

I have also facing this issue today. at first  psycopg2==2.6.2 have some bug/issues, that's why we were faceing this type of issues. so you need to install latest version of psycopg2 by using following command.

pip install  pgadmin4-1.4-py2.py3-none-any.whl  -U psycopg2

This command will install all the dependencies and install upgraded version of psycopg2.

Secondly  config_locale.py file will create after this installation process complete.


My ubuntu box is not opening in graphical mode

If what you want is to just delete the content of the /temp folder of your VM but without the need to boot the VM OS, all you need is a Linux LiveCD (your choice here, I would recommend a small one to get it fast from the Internet if you don't have one at hand).

Use the LiveCD iso as the boot device in your VM, boot the VM with the LiveCD iso, accesss your partition with the /temp folder and delete what you wish. Finally, reboot and you're done (don't forget to change the VM settings to remove the LiveCD iso as boot device so you boot the VM OS when you reboot).

Good luck and let us know what happens!


How to install again Update Manager after uninstalling it

Terminal/Konsole:

sudo apt-get install update-manager synaptic

or

sudo apt-get install --reinstall update-manager synaptic


OneKey recovery with a different OS installed

I always manually partition when I'm installing Ubuntu to make sure I know exactly what's going on. I recommend first shrinking your windows partition, generally labeled "OS C:" in Disk Management. Then start installing from your Live Media and follow this guide. Just skip "4. Free some space for Ubuntu" since you'll have already done that.

While in Disk Management you should be able to see a partition called "Recovery", "Restore", or "Lenovo". This is where Windows would be restored from.

The guide I linked to above is nice because it has screenshots. But here's a brief summary of what manually partitioning requires. Any specific questions please feel free to comment.

Shrink the Window partition using Disk Management inside Windows by however much space you want to give to Ubuntu and swap (absolute bare minimum I'd say is 15GB).
Boot your Live Media.
At step 4 about operating systems, click "Something Else".
Create a new swap partition in the free space. Making it the same size as your RAM is a good rule of thumb. But leave at least 10GB free for the next step.
Create a new ext4 partition in the rest of the free space and mount it at /.
Once the installation completes, if you can't boot into both follow this guide.


Booting into a Windows10 Virtual Machine using physical disc from Ubuntu Virtualbox host

I don't know why that happens, but you should be able to boot Windows by running these commands in order:

        chainloader (hd0,2)/efi/Microsoft/Boot/bootmgfw.efi
        boot

(hd0,2) here is the refferer to the EFI partition
Also make sure to enable EFI boot, but from your Question I can see, that you probably do.


That is very possible. Things like that happen not just with Ubuntu, but with other packages and operating systems. But first:

Be 100% sure that it is downloading properly. Try on other machines, and if possible another network. A lot of these errors actually occur because it isn't downloading properly.
Test. Is it working the way it normally is? If it isn't, then you probably have a corrupt download.

If neither of the above steps fix your problem,

Bug reports. I have checked, but it dosen't seen anyone else has filed a bug report for this. A second set of eyes helps! :-) Create a launchpad account if you don't already have one, and report a bug at https://bugs.launchpad.net/cloud-images/+bugs.


I can't watch movies online with my Firefox

First,I don't understand Windows Firefox in Ubuntu. So, I make an assumption that you are running Firefox which came preinstalled with Ubuntu. I suggest that you download the Adobe Flash plugin from the Ubuntu Software Center:

Note that this is the last official version you will get.
You can also try Gnash, if you wish.


No disc writing tool is present Ubuntu 18.04

brasero is a package in the "universe" repository:

walt@bat:~(0)$ apt policy brasero
brasero:
  Installed: (none)
  Candidate: 3.12.1-1ubuntu3~16.04
  Version table:
     3.12.1-1ubuntu3~16.04 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
     3.12.1-1ubuntu2 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages

so, a simple sudo apt install brasero will install it.


Space-delimited file (foo.out) incorrectly read as image

Use either csv or txt file extentions
I can't explain why it happened to you. I cannot reproduce the fact that if the output is named foo.out it is treated as an image file by Ubuntu. However, the workaround is to use either
write.table(dresults, file = "foo.csv", quote = F, row.names = F)

or
write.table(dresults, file = "foo.txt", quote = F, row.names = F)

In the first case, double clicking the resultant output file opens it with LebreOffice Calc (the spreadsheet application).
In the second case, double clicking the output file opens it in Gedit.
On how to tell Ubuntu that foo.out is not an image
The top answer to Searching for specific magic byte in an ocean of files may help.
Hope this helps


How do I restart conky and nautilus whenever they crash?

Create a file in /etc/init with the following commands:

#!upstart
description "Conky"

# Start job via the daemon control script. Replace "soham" with your username.
exec su -l soham -c 'export DISPLAY=:0; /usr/bin/conky'

# Restart the process if it dies with a signal
# or exit code not given by the 'normal exit' stanza.
respawn

# Give up if restart occurs 10 times in 30 seconds.
respawn limit 15 30

Now after logging in: sudo start conky

#!upstart
description "nautilus"

# Start job via the daemon control script. Replace "soham" with your username.
exec su -l soham -c 'export DISPLAY=:0; /usr/bin/nautilus'

# Restart the process if it dies with a signal
# or exit code not given by the 'normal exit' stanza.
respawn

# Give up if restart occurs 10 times in 30 seconds.
respawn limit 15 30


Ubuntu 14.10 boot takes ESC to give encryption passphrase prompt

Have you tried changing the value

  GRUB_CMDLINE_LINUX_DEFAULT=

Within /etc/default/grub

to

  GRUB_CMDLINE_LINUX_DEFAULT="ro"

(removing the quiet and splash)

And then run:

  update-grub


There are some possibilities.

/usr/bin/mkdir was replaced by another 'mkdir'.
mkdirwas defined as alias.
mkdir was defined as bash function.

Please look it up on bash command line.

type mkdir
alias


How do keep the modified Logitech T650 trackpad configuration persistent

I suggest automatically running Your command on each system startup:

Access startup applications preferences - Where did the startup-applications-preferences program go? (may be already present at Unity-Dash).
Then add an entry containing Your command.
Since that the configuration should be adjusted on future bootups.

You can also add the command to Your Unity launcher at Ubuntu Tweak (should be foundable at Unity-Dash), I have several commands stored in Terminal icon, pretty useful.

Still I'm too curios how to make the xinput config constant and why it is not remembered by default.


Is it possilbe to add notes on folders or files?

I’m not sure if there is such a thing but I used to have a text file at the top of the folder with a description of the folder or its content.
GL


How to tether with a Blackberry 9000 via bluetooth?

If it asks for a Pin (maybe they named it password) while you are setting up the bluetooth connection: Just enter a 4 digit number (like 0000). Bluetooth requires you to authenticate a new connection by entering the same Pin on both devices to ensure that you really have access to both devices.

If it asks after you have made the bluetooth connection: Sorry, no clue ;)


Input source of Text entry Ubuntu 15.04 unavailable

My friend installed Ubuntu 15.04 64 bit. Then he installed Vietnamese (Ibus) (Unikey). There's no problem with his computer.

I think the cause of my problem was updating my Ubuntu from an older version to 15.04. The system reported some error, so I tried to restart my computer and continued the update.

After reinstalling 15.04, this problem disappeared.


Need help with installing driver for ASUS PCE-N53 11n N600 PCI-E Adapter

There's an AUR package rt5592sta_linux_patched-dkms which was last updated in 2016 for kernel 4.7.1-1. If you're on kernel >=5 this will not work for you, and consider manually installing the patched driver from this GitHub repo - you will get B/G support (no N support) but it is better than nothing.


Recovery of vim running in screen session after crash of Xorg

If Vim complains about a swap file when opening a file, there are two cases: either it's from another currently running Vim process, or it's from a crashed Vim process.

If it's from a running process, the message will look like so:

E325: ATTENTION
Found a swap file by the name ".foo.swp"
          owned by: muru   dated: Thu Feb 16 15:59:59 2017
         file name: ~muru/foo
          modified: no
         user name: muru   host name: localhost
        process ID: 870 (still running)
While opening file "foo"

Note how it says (still running) next to the process ID. An error due to a crashed Vim's swap file won't have that (except, if by coincidence, another currently running process got that same PID). If it's from a crashed Vim, you can choose to recover from the swap file, and later delete it.

If it's from a currently running Vim process, you can kill it (the swap file will let you recover) or choose to gracefully exit if you don't want a swap file lying around. For the latter option, if you don't have screen or some such way to interact with the Vim process, you can use Python to send key codes to it, as described in another post by me.


HP G42 won't boot, halts on recovery session menu

I had similar issues. In order to get the recovery console working (I had the same issue - recovery menu would come up, but would not react to keyboard input), I had to unplug all my usb devices and add nohz=off acpi=off to my boot line in grub for the recovery mode. These boot parameters might differ for your system. I certainly would give acpi=off a try. That seems to be an issue for many system.

Once I was successfully in recovery mode, I was able to fix my xserver by renaming the /etc/X11/xorg.conf file.

My issue was that I had the proprietary driver from ati installed, but then I used jockey to install the Ubuntu version of the fglrx driver over that. That left my system in an unstable state. Finally, I was able to purge fglrx from my system and installing the open source radeon driver.


Ubuntu wont install since windows 10 reformat

If you already installed windows 10 in uefi mode, the ubuntu installation you're used to will fail.

You should first disable the FastBoot in windows before you can install ubuntu Here's a link on how  to do it.
Then, boot with your drive in EFI mode ( basically , You must have something like this).

Sometimes,you may have a secure boot or signature error. Only then you must disable the secure boot.


Enable the keyboard backlights on supported Lenovo (e.g. Carbon X1) with command

This is really needed to be fixed!

I think this is a common bug in new thinkpads. If you light keyboard manually fn + space then executed:

echo 0 > /sys/class/leds/tpacpi\:\:thinklight/brightness

keyboard will fade out.
Please see the following link if it helps:

http://www.spinics.net/lists/ibm-acpi-devel/msg03090.html


Executing the snap with the parameter -style=Fusion did a great job for me on KDE Neon. In my case I did that with QOwnNotes: qownnotes -style=Fusion

Edit: You can use qDebug() << QStyleFactory::keys().join(" "); to see which styles are available.


installing Ububtu 16 using bootable flashdrive

I'm not sure why it's taking so long and you can already use it..
Did you start it as a LiveCD ?
Also I would suggest to install through the CLI that would probably be faster (Nothing explains 18 hours unless you are doing a upgrade and installing loads of things from internet and your internet connectivity is very slow).
And if you are still installing and stop it you will lose what you have already, but if that's the case of the 18 hours I would suggest you to start again. Maybe try a different USB port.


Windows Subsystem for Linux (WSL): what can't I do with the Ubuntu application for Microsoft Windows?

The Ubuntu that runs under Windows 10 Subsystem for Linux is not a full distro. In fact, it's not Linux at all -- it has no Linux kernel. So you can't test or try kernel extensions, including drivers, because you're not running Linux.

If you want to do stuff like that, either install Ubuntu in a VM -- Win10 includes Hyper-V, but personally, I prefer VirtualBox, which is free -- or dual-boot your machine with Ubuntu running on the bare metal. You will almost certainly find the latter faster than running Windows -- I do on all my machines. Partly this is because you need antivirus protection when running Windows, which saps performance, especially disk performance. And because you need it, Win10 includes built-in antivirus.

With Linux, you do not need any, so there is less performance impact.


Updated for 14.04 LTS (or later)

From 12.10 onward, thumbnails are stored at ~/.cache/thumbnails

Corrected commands:

rm -r ~/.cache/thumbnails

Then either restart, or:

killall nautilus

Original answer: (for 12.04, and earlier)

Here the commands:

rm -r  ~/.thumbnails
killall nautilus


Where can I download newest OS images for my Bq Ubuntu Phone?

Follow this tutorial https://developer.ubuntu.com/en/start/ubuntu-for-devices/installing-ubuntu-for-devices/ where it says "Upgrading manually"


Terrible graphics performance with Intel graphics on Ubuntu 13.10

For anyone else that runs into this problem, it doesn't appear to have anything to do with the graphics driver, see https://bugs.launchpad.net/ubuntu/+source/policykit-desktop-privileges/+bug/1240336.

To fix, run:
sudo pam-auth-update --force

and reboot. This fixes numerous other problems (unable to mount flash drives, no sound, can't run software updater).


You should probably

make uninstall

the previous version (while inside the source folder). And then

make install

the new version.


It looks like the CD is mostly corrupted. Do you have VirtualBox or any other similar software to test the disc with? If not, install it and test the disc for DEFECTS.

Procedure to check the disc for defects:

1) Place the Ubuntu disc into the CD/DVD drive.
2) Wait for the Ubuntu boot screen and press ANY key (I use space though). It wil prompt you with keyboard layout option. By default, the keyboard layout is en-us (it is an international default unless you specifically purchased another variant).

3) Now, after that, you will see the "Check the media for defects" option with similar message.
4) Select it and sit back for a while. It will check the installation media to determine any defects.

The output from step 4 will give you a proper idea where the problem lies. If the outcomes positive, then make sure you have the minimum system requirements to install Ubuntu.


after install ubuntu 12.10, there's no anything just background and cursor

I had a similar problem with 12.10.  I would suggest downloading and installing 12.04, because it is an LTS, and will be supported until 2017.

I would also suggest using Lubuntu if your machine is really old and slow.

http://cdimage.ubuntu.com/lubuntu/releases/12.04/release/

Though the regular Ubuntu interface is very nice... you can get it here

http://releases.ubuntu.com/precise/


How to run a .desktop file on login in Ubuntu 16.04 Mint CInnamin

That can actually be done as a startup script instead.  Open Settings -> Session and Startup.  Go to Application Autostart tab.  Click Add, give it a name like Minecraft Server or something.  For the command line, add the following:

bash -c 'sleep 5; /home/sam/MineServer/Start_Server.sh'

Then click OK.

I like to put the sleep there so that the script does not try to start immediately after logging in as some applications might cause it not to start.

Hope this helps!


Macbook Air - with Ubuntu 14.04 how can i take print screen, page up/down cause there is no keyboard button

According to the help.ubuntu.com:

Characters that are not printed on the keycaps (~,{},[],...) can still be generated as on a standard PC keyboard. Even if the @ is printed on another keycap as on the standard PC layout, that key will only behave like the standard PC layout key and not generate the @. Use your localized standard PC layout key (combination) to generate the @.

'fn'+'F-Key' -> triggers the regular F-Key
'fn'+'Enter' -> Insert
'fn'+'Backspace' -> Delete
'fn'+'Up' -> PageUp
'fn'+'Down' -> PageDown
'fn'+'Left' -> Home
'fn'+'Right' -> End
'Clear' behaves like 'NumLock' (Numlock may also be
   switched by pressing fn-F6 twice)

That link also provides methods on remapping keys.


I have 1GB RAM. How much swap partition do I need to make before installing Ubuntu?

1-2 GB

The exact amount depends on how much hard drive space you want for your other files so it's up to you, but your swap partition should be between 1 and 2 GB in size.

Working:
According to the Wiki page on this, you need the swap space to be at least as much as the amount of RAM you have (1 GB) if you're using hibernate and otherwise at least as much as the square root of the RAM you have (1 GB) and at most twice as much as the RAM you have (2 GB).


Ubuntu 12.10 Ubuntu-Guest and VirtualBox(Windows) host

Set the internet connection as Bridged. It should work fine. and check that the IPs are correct.


Programs output CPU and RAM usage in plots (if possible)

For this, I would recommend Grafana. I'm inclined to say the possibilities are almost endless.
However, Grafana is "only" a viewer, so you also need a data collecting backend - for this you can use Prometheus.
Finally you need the Prometheus Node Exporter installed on each machine where you want to gather metrics.
I've installed this set of tools using Docker containers - I find that this is the easiest way. However, it requires a little research on your side to set up things like you want it.
Here are the links to the official Docker images I can recommend:
Grafana - Docker Image
Prometheus - Docker Image
And finally, you need to install the Node exporter on the machines where you want to gather data. Make sure the "Universe" repositories are enabled in your /etc/sources.list: (replace dk.archive with your country)
deb http://dk.archive.ubuntu.com/ubuntu focal universe
deb http://dk.archive.ubuntu.com/ubuntu focal-updates universe

Then run the installation on each machine:
sudo apt install prometheus-node-exporter

Prometheus has very good documentation about how to configure, and there is an example configuration file on Github here.
In your prometheus config, you need a job that targets the machines where Node Exporter is running. In the below example, I have two machines (10.10.2.2 and 10.10.2.4) with Node Exporter running on port 9100.
  - job_name: 'node-exporter'
    static_configs:
    - targets: ['10.10.2.2:9100', '10.10.2.4:9100']

In Grafana, you then need a dashboard to show the statistics for Node Exporter. Here I can recommend the Node Exporter Full dashboard to begin with.
Everything can be customized, but at least now you can start to see the historic data on your machines.


How do you change the search location of the Music Lens?

It shows what is inside Banshee's database so you could update this. How to register downloaded podcast mp3 in Banshee?  probably answers how to do that.

You can also symlink your music directory. That way anything thinking it should look in ~/Music/ will look in your folder.

You can do that like this:

cd /home/username/
mv /home/username/Music /home/username/Music.old
ln -s /your/path/to/music/ Music

You can just remove Music or Music.old if you don't need it.

I assume that rescanning the folder would add them to your database.


Fade out MOC if other application starts playing something

The MOC daemon can be controlled only with the mocp client.

If you were using PulseAudio, you could use pacmd to change MOC's volume.

If you replaced MOC with MPD, you could use mpc to change MPD's volume.

If you really want to do this with ALSA, you could put the following into /etc/asound.conf:

pcm.moc_with_volume {
    type softvol
    slave.pcm "default"  # or whatever you're using in MOC
    control {
        name "MOC Playback Volume"
        count 1
    }
}

and configure MOC to use the ALSA device name moc_with_volume instead of default.

If your volume-changing program does not allow to configure its mixer control, you have to monitor the other mixer control and copy its value to the MOC mixer control. This could be done with a program like this:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <alsa/asoundlib.h>

#define CHECK(fn) check((fn), #fn)
static void check(int err, const char *fn)
{
        if (err < 0) {
                fprintf(stderr, "%s failed: %s\n", fn, snd_strerror(err));
                exit(EXIT_FAILURE);
        }
}

int main()
{
        snd_ctl_t *ctl;
        snd_ctl_event_t *event;
        snd_ctl_elem_id_t *id_src, *id_dst;
        snd_ctl_elem_value_t *value;
        unsigned int mask;
        long raw, db;

        CHECK(snd_ctl_open(&ctl, "hw:0", 0));
        CHECK(snd_ctl_subscribe_events(ctl, 1));
        snd_ctl_event_alloca(&event);
        snd_ctl_elem_id_alloca(&id_src);
        snd_ctl_elem_id_alloca(&id_dst);
        snd_ctl_elem_value_alloca(&value);
        snd_ctl_elem_id_set_interface(id_dst, SND_CTL_ELEM_IFACE_MIXER);
        snd_ctl_elem_id_set_name(id_dst, "MOC Playback Volume");
        for (;;) {
                CHECK(snd_ctl_read(ctl, event));
                if (snd_ctl_event_get_type(event) != SND_CTL_EVENT_ELEM)
                        continue;
                mask = snd_ctl_event_elem_get_mask(event);
                if (mask == SND_CTL_EVENT_MASK_REMOVE ||
                    !(mask & SND_CTL_EVENT_MASK_VALUE) ||
                    strcmp(snd_ctl_event_elem_get_name(event),
                           "Some Mic Capture Volume"))
                        continue;
                snd_ctl_event_elem_get_id(event, id_src);
                snd_ctl_elem_value_set_id(value, id_src);
                CHECK(snd_ctl_elem_read(ctl, value));
                raw = snd_ctl_elem_value_get_integer(value, 0);
                CHECK(snd_ctl_convert_to_dB(ctl, id_src, raw, &db));
                CHECK(snd_ctl_convert_from_dB(ctl, id_dst, db, &raw, 0));
                snd_ctl_elem_value_set_id(value, id_dst);
                snd_ctl_elem_value_set_integer(value, 0, raw);
                snd_ctl_elem_value_set_integer(value, 1, raw);
                CHECK(snd_ctl_elem_write(ctl, value));
        }
}

(Use amixer controls to check the actual control names.)


You may not be able to hide them in Nautilus only, but the kernel can hide partitions system-wide. Check this: http://ubuntuforums.org/showthread.php?t=1305383, and this: How to hide a(n) (NTFS) partition from ubuntu


I think the right way is to add this two lines in crontab:

PATH = /home/myname/.rvm/rubies/ruby-2.0.0-head/bin:$PATH
@reboot ruby script/rails server webrick -e production

Or, better, use this post to start webrick automatically on login.


Why does my sound device have 15 different profile options, and which do I want?

These control the channel map pulseaudio uses for your device.

Pulseaudio has some standard names like "left", "right", "center", and so on for audio channels. Applications also output on channels like this. Pulseaudio then remixes the audio as needed, and tries to do the "right thing". For example, if an application is outputting a "center" channel, but your output device doesn't have one, it will mix it equally to the "left" and "right" channels.

The profile setting here determines how Pulseaudio maps its channel names to the underlying (usually ALSA) device channels. Usually which you select will depend on what kind of speakers you have and how they are connected. You can see the profiles also affect the input channel mapping, so many of these are just different combinations of input and output mappings.

You can see the channel maps in effect with commands like pactl show-sinks and pactl show-sources.

You can define more profiles in /usr/share/pulseaudio/alsa-mixer/profile-sets.


SimpleScan detects scanner but scanner does not phisically Ubuntu Gnome 17.04

Simple scan is a very basic app for scanning.  You can install xsane and do a scan either from xsane or using gimp since those two are fully compatible (xsane installs the appropriate gimp extension automatically) and xsane delivers extremely better results and has many more options.

apt-get install xsane


What can I do to prevent Ubuntu from overheating my Notebook?

According to previous posts here, a known bug in the Linux kernel is leading to overheating issues: Heat issues on 11.10 beta?

Recent releases (11.04 also) have had a similar problem. A workaround for the Linux 3.0 kernel has been suggested:

http://www.techytalk.info/linux-kernel-2-6-38-2-6-39-power-regression-workaround/

I've heard that these issues were supposed to be fixed completely in Linux 3.1. However, Ubuntu 11.10 uses the 3.0 kernel, so the above workaround should still be relevant. According to Phoronix, the power consumption of Ubuntu 11.10 is up as much as 50%:

http://www.phoronix.com/scan.php?page=news_item&px=OTg5Mg


How to sort file after text-me-not/ in Unix and ignore case?

I assume that the data is in a file.. (If not edit the question.)
Run in terminal:

cat /path/to/src/file | sed 's:hello-yourself/www/test-me-not/::' | sed '/^$/d' | sort  --ignore-case

for output in terminal and

cat /path/to/src/file | sed 's:hello-yourself/www/test-me-not/::' | sed '/^$/d' | sort  --ignore-case > /path/to/destination/file

for output in a file.


Have you checked this out?
It's for an older version of Ubuntu (10.04), but the problem seems similar to yours, so it might be worth checking out.

      August 19th, 2012 by A Traveller

  Re: Windows staying on top Thanks Frogs Hair. Your suggestion has
  fixed the problem! Here is what I did:-

  Press 'Alt + F2'     Typed 'gconf-editor' and clicked 'Run'
  Expanded 'Apps', then 'Metacity' and the clicked on 'General'
  Double-clicked 'raise_on_click' and changed the 'Value' to 'True' by
  clicking on the button which said 'False'       Clicked 'OK' and then
  closed the Gconf Editor window     Voila!

  I have read warnings advising against changing the Value to False, but
  can't remember ever changing it to False. I have played with the
  location of the maximize, minimize and close buttons but I don't know
  how the raise-on-click got changed. I did install Ubuntu Tweak
  recently but don't know if anything I may have changed in that caused
  the problem.


How to install offline packages on a linux server

You could try with dpkg-offline:

  dpkg-offline obtains a package's dependencies, starting from a known
  set of packages (as for a base installation), fetches those .debs and
  packages them up in a tarball. Ideal for offline installation of the
  "seed" package.

First branch the project on launchpad:

bzr branch lp:dpkg-offline

dpkg_offline tutorial

Let's say you want to create a tarball with all the dependencies
necessary to install git on an Ubuntu 12.04 server system.

Once you have dpkg_offline, ensure you have the needed dependencies
installed:

sudo apt-get install genisoimage mtools squashfs-tools apt-utils curl

Once they're installed, get your seed .iso image::

wget http://releases.ubuntu.com/precise/ubuntu-12.04.4-server-amd64.iso

Now you're all set to do the installation. Run this:

./dpkg_offline ubuntu-12.04.4-server-amd64.iso "git"

The first argument is the seed iso, while the second is a list of
packages to install. Using quotes is necessary so that the second
"thing" is taken as the whole list. Of course, it's not necessary if
you have only one seed package.

If the process completes successfully, a tarball will be left in the current
directory. The name will encode the seed ISO, creation date, and the base
packages that were installed:

apt-repo-ubuntu-12.04.4-server-amd64.iso-20131213-git_13a1.7.9.5-1_amd64.tar.gz

If something fails, dpkg_offline will tell you what failed and point you
to a log file that may contain more details about the failure. This file
will be in a temporary directory; dpkg_offline normally cleans this
directory up, but in the case of a failure it will leave it as-is for
analysis.


How to resolve a kernel panic on Ubuntu on my Lenovo Yoga 530?

The error shows that there is potentially file system corruption on the media, a dentry lookup failed, so this is clearly a corrupted filesystem.  Perhaps start over again by copying the ISO image to the installation media or use a different USB stick.


How to start the -jar process and send a request to him in bash script?

There are a few problems here:

The java command will not return until the process it starts exits and returns control to the shell. This could mean it starts and runs the code in the jarfile, which then eventually calls exit, or it could mean the java process fails for some reason. The "system" has not stopped, but the currently running shell process is waiting for that java process to return. Maybe that Java code never calls exit, in which case your script will wait forever.
If you put the JVM you are launching in a background shell (via & for example) then the next command may try to connect before the Java program has fully started and is ready to serve requests. Your Java program and the curl command are "racing" on a startup condition. Now your script may have to have a retry mechanism that will always be rather brittle.
There isn't an obvious way for you to control the lifecycle of the Java program you are running. Once in the background you have to manage stopping it (for example) with something like kill, for example. Restarting would require a lot of complicated scripting. This means you have to script up a way to collect the PID, and maybe even maintain a "semaphore" file so you can handle the start/stop state.

One solution is to install the Java program launcher as a separate "service" which is controlled by the Ubuntu service startup mechanism. I'm hand-waving here, but I'm positive this is discussed in other Q&A. But the idea is that the lifecycle of the Java program is maintained by the system, not a shell script you run at the terminal. Or, at least, not just as a shell script only you run at the terminal.

Once the service is running then you can script curl commands to your heart's content.

But it is good design to decouple any server activity from any client activity. Though, your client requests should always handle the case that the server cannot be reached for any reason, even if that handling is an error message back to the user.

Finally, if all you want to do is start a Java service and let it startup so you can later issue commands at the command line or in a script to connect to that service, an easy way to test this scenario is to open two terminals. One is where you run your service and the other is where you run your client curl commands.


I think this is about what I would expect. The class 10 does mention the number 30, but keep in mind that this is sales-speak: it means "Up to 30MB/s read speed".

If you look at the specs of what "class 10" means1 you get:

  Class 10 is more than or equal to 10 MB/sec performance

It also mentions this little gem of information

  Note that the unit of performance [MB/sec] indicates 1000x1000 [Byte/sec] while the unit of data size
  [MB] indicates 1024x1024 [Byte]. This is because the maximum SD  Bus speed is specified by the
  maximum SD clock frequency (25 [MB/sec] = 25000000 [Byte/sec] at 50 MHz) and data size is based
  on memory boundary (power of 2).

So we also have the 1000 vs 1024 "gap".

1: page 5 of this pdf


lost genuine version of my PC with out restore

I also have a "Ubuntu Certified" laptop (Dell Lattitude E7440), which came with pre-installed Ubuntu. I found out that the "factory" operative system is just a "dd" of the image into the HD of the laptop, and that image is basically the same you can get from the Ubuntu repositories. It might come with some special driver, but nothing you can't easily install yourself after installing the normal Ubuntu (or *ubuntu).

I would actually recommend you an Ubuntu certified laptop because the hardware should be fully supported, but otherwise, just reinstall a fresh an updated *ubuntu on it and it will be even better than the factory one.


Complete printing N lines from text files

Would this work for you :

#!/usr/bin/env python

import glob, os
dirpath=raw_input("Enter path: ")

for file in glob.glob(dirpath+"/*.txt" ):
    print(file)
    with open(file) as myfile:
        for x in range(0, 5):
            print myfile.readline().rstrip() #rstrip to remove \n

Happy to edit if it doesn't fit.


Now I want to extract one of the tables on my desktop , how can I do this ? Note that the server is connected through network

From Ubuntu command line (not SQL command prompt):

mysqldump -u {user} -p {database} {table} > export.sql

This will create a file "export.sql" with the table definition  and table content in it in SQL format. The '--no-create-info' will not export the table information, only data. You can also use it like this:

mysql -B -u {user} -p {database} -e "SELECT * FROM {table};"  | sed "s/'/\'/;s/\t/\",\"/g;s/^/\"/;s/$/\"/;s/\n//g" > export.csv

to create a CSV file.

And then use ssh to copy export.sql or export.csv to your desktop.

  I want to add user3| ADMIN

insert ignore into user_mine (username, user_id) values ('user3','ADMIN');


I have this same issue when adding a file to my project folder from outside of aptana studio. What solved it for me was a refresh on my project explorer window (right click and click refresh - i think shortcut is f5 maybe). Then I could see the file in my project explorer then I just double click it from there or re-open it.


How can I get chrome to stop opening up in incognito? even after purging and reinstalling fresh

When the problem persists, even after completely un-installing / re-installing, I am pretty sure you'll have one or more left-over local .desktop file(s) in ~/.local/share/applications, referring to Chrome.
Local .desktop files are not removed when you re-install an application.
Chrome is "famous" for creating user-specific .desktop files in ~/.local/share/applications, but they regularly cause unexpected behaviour.
What to do
Remove all local .desktop files, referring to Chrome in ~/.local/share/applications. Then log out and back in. If you are having doubts on a specific .desktop file, make it executable to make it show its icon.
You do not need local .desktop files, unless you want specific behaviour. As mentioned, Chrome is quite "active" in creating local .desktop files.


I don't understand the error displayed when I run the" sudo apt-instal"l command?

You need to run sudo apt-get update first. This command downloads the index of the repository (See What does "sudo apt-get update" do?). It should have been run automatically during installation, but if for some reason you weren't online, it might not have happened yet.


How do you set your Default Bittorrent Application?

I had the same problem and found a solution:

In escence you have to make sure your apps's .desktop file on:

/usr/share/applications

has this line:

MimeType=application/x-bittorrent;application/x-torrent;

and then add/edit this line on /usr/share/applications/defaults.list:

x-scheme-handler/magnet={$MYAPP}.desktop;

setting the correct app name of course.

Hope this can help.


.deb package is downloading as folder in my ubuntu

Your interpretation of error message

(desktime-linux:9886): Gtk-WARNING **: 11:03:10.575: cannot open display:

produced by desktime-linux --version is incorrect. The application is installed, but it needs DISPLAY variable declared.
This application is designed to run on the system with graphical session. It has desktop-file named /usr/share/applications/desktime-linux.desktop binded to /usr/bin/desktime-linux. The application is Electron based, so it is GUI application.
So you have to switch to desktop environment and then run desktime-linux application.


NTFS partition resizing wubi Ubuntu boot problem

When you resized the partition, it was assigned a new UUID. Grub uses this to boot the Wubi install. You can manually override it with the new UUID if you know it or use the following technique to boot the Wubi install and then update grub to see the new UUID:

First you want to make the Grub menu appear so you can take control. After selecting Ubuntu, immediately hold down the Shift key until the menu appears.

Then either hit E to edit that entry, replacing the UUID with the new one, and then CtrlX to boot.

Or if you don't know the new UUID, drop to a Grub prompt and manually boot the Wubi install as follows:

search -s -f -n /ubuntu/disks/root.disk
probe --set=diskuuid -u $root
loopback loop0 /ubuntu/disks/root.disk
set root=(loop0)
linux /vmlinuz root=UUID=$diskuuid loop=/ubuntu/disks/root.disk ro quiet splash
initrd /initrd.img
boot

Then after booting into Ubuntu, drop to a terminal and update grub:

sudo update-grub


Your syntax of mount is wrong. Remove whatever you added to fstab. Then try

sudo mount /dev/cdrom /mnt

If CD-ROM appears under /mnt folder - fine, adjust to your needs. If not - you will get proper error description. Most likely not, because CD-ROM mounting in Ubuntu should be automatic.
P.S. Whatever instructions you use - they are outdated. Use journalctl instead of dmesg


how to pipe output of traced bash debugging?

Use:

bash -x /path/to/a/script |& more

bash xtrace output is written to the STDERR, while piping | you are just giving the STDOUT of bash -x /path/to/a/script to more or any other command on the right side of |.

|& will pipe both the STDOUT and STDERR to more so you can use them both with more.

Alternately if you are just concerned with piping the xtrace (STDERR) only, use this:

bash -x /path/to/script 2>&1 >/dev/null | more

While redirecting to a file, if you want to redirect both the script output and xtrace output use any one of the following:

bash -x /path/to/script &>/where/to/save
bash -x /path/to/script >/where/to/save 2>&1

If you want to redirect only the xtrace:

bash -x /path/to/script 2>/where/to/save


So here's how I got it to install,

In the BIOS raid was on, I turn it to AHCI mode, then I booted up and boom it worked.

It asked me if I wanted to turn on Legacy boot mode I said yes, and it installed.


The easiest option, quite honestly and most likely, will be reinstalling the system.
If you had some important data on the disk, just maybe boot the system from LiveCD, make a copy of your stuff, and then rebuild the system.


Broken packages when installing NVIDIA drivers on Ubuntu MATE 18.04

The following commands were able to successfully install the latest NVIDIA drivers and complete the installation of TensorFlow with GPU support:

$ sudo add-apt-repository ppa:graphics-drivers/ppa
$ sudo apt update
$ sudo ubuntu-drivers autoinstall


How do you disable audio input in Ubuntu 14.04

I found my own answer.

Install pavucontrol (PulseAudio Volume Control) package through Synaptic or apt-get. Open Terminal and type "pavucontrol" to open the GUI. Under Configuration allows you to change profiles, which was in older version of Ubuntu default sound preference GUI but disappeared. Change profile to Analog Stereo Output instead of Analog Stereo Duplex. Ubuntu will no longer use any sound input devices.

https://help.ubuntu.com/community/SoundTroubleshootingProcedure (Step 6)


HDD partition is read-only despite 'rw' flag in fstab

It seems, that Windows uses hibernation by default. To turn it off, I used the following procedure. Also, I turned off Windows' updates just in case (they can turn hibernation back on).

Thanks to oldfred for provided links.


What works for me is:

Remove the old installed cmake
sudo apt remove cmake

Download and build the recent version using qt support. e.g.
./configure --qt-gui
make -j5

Make soft link to /usr/bin


I am not sure if this is the same problem I had, but this solved it for me:

in grub select the ubuntu entry and press e. now look for the words 'quiet splash'. delete them and type 'nomodeset' in stead. now press f10 to boot into ubuntu. I can not tell you what happens or why it works, but for me it did. I got my answer from here.


Cannot get nvidia drivers working on 16.04

I found that when I backed off to Linux kernel 4.8.0-78 (I had all the trouble, above with -79) I was able to install the Cuda Library and everything worked.

I theorize that there may be some incompatibility between the drivers and the newest kernel version, but I don't have the tools or the knowledge to find out for certain.

To recap my solution procedure, I selected Advanced Ubuntu Options from the GRUB menu and booted the previous version (prior to the upgrade to -79).  I then made sure the GPU was in play by running the Phoronix Test Suite.  It was, so with fingers crossed I ran the install that had hosed things sudo apt-get install git cmake libcryptopp-dev libleveldb-dev libjsoncpp-dev libjsonrpccpp-dev libboost-all-dev libgmp-dev libreadline-dev libcurl4-gnutls-dev ocl-icd-libopencl1 opencl-headers mesa-common-dev libmicrohttpd-dev build-essential cuda -y and then tested again to make sure the GPU was still available, and it WAS.


To solve this you first have to make sure that the files in your owncloud folder on the server belong to group www-data and this group has read permissions:

sudo chown -R :www-data /media/data/ownclouddata
sudo chmod -R g+r /media/data/ownclouddata

Then add your user to the group www-data:

sudo usermod -aG www-data edwin

Mind the parameters -aG of the usermod command: This adds the user to the group without discarding other group memberships, so this is important.


Controlling multiple instances of same application with dbus?

Found your question while looking for an answer to my own problem.  The guys over at dbus IRC channel helped me out with the answer.

dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListQueuedOwners string:org.mpris.MediaPlayer2.vlc

That will give you the destinations that you can loop through.  It lists them like :1.25 :1.26, so your dbus-send will look like this (note the colon is needed!)...

dbus-send --print-reply --dest=:1.25 /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause
dbus-send --print-reply --dest=:1.26 /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Pause


There should be an option to do something else, at the bottom of the window. If you pick that one, it will let you pick the partition you want to use for Ubuntu, which ones do you want to format and which you don't, pretty much anything you might possibly want.


Can I revert to OS X after installing Ubuntu?

It is possible to have ubuntu installed alongside. Read this link: https://help.ubuntu.com/community/DualBoot/MacOSX


Command mount /dev/fd0 was broken since lucid (i.e. Ubuntu 10.04).

Try using udisks --mount /dev/fd0 instead (or udisks --mount /media/floppy0 if you prefer).


Kubuntu 20.04 missing network-manager-sstp

SSTP was never present in default package repository.

You must add following repository and than will be SSTP VPN available

https://launchpad.net/~eivnaes/+archive/ubuntu/network-manager-sstp

Long story short:

sudo add-apt-repository ppa:eivnaes/network-manager-sstp
sudo apt-get update
sudo apt install network-manager-sstp sstp-client


do-release-upgrade from 20.10 to 21.04 on Raspi not working?

I think you will be able to download it once it appears on the following list: http://changelogs.ubuntu.com/meta-release
Otherwise, one needs a manual installation.


Actually I had this

user@machine:/etc/network$ more interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dns

If I remove this:

auto eth0
iface eth0 inet dns

it works.


wireguard vpn is failing with error: Cannot find device "wg0"

Try reinstalling package wireguard-dkms (remove and install again). Probably afterwards a reboot will be needed.


Qualcomm Atheros AR8172/8176/8178 network UNCLAIMED

First enter lspci -nn | grep 0200 and make sure that your drivers is Qualcomm Atheros QCA8172 Fast Ethernet[1969:10a0]

The following fix is is only going to work for-

1969:1091 - AR8161 Gigabit Ethernet
1969:1090 - AR8162 Fast Ethernet
1969:10A1 - QCA8171 Gigabit Ethernet
1969:10A0 - QCA8172 Fast Ethernet

adapters. and please make sure that your kernel is 2.6.24 or above. It is technically possible for kernels < 2.6.24 but might take some work. (still worth giving a try!) to check the kernel version type

uname -a

after that, If they are all neat and right. download compat-drivers-2013-03-04-u.tar.bz2 file and extract it. go to the extracted directory [ex- cd Downloads/compat-drivers-2013-03-04-u/] and type-

./scripts/driver-select alx
make
sudo make install

reboot the system you are all done :) apparently this type of ethernet adapters are available in lenovo g500s, lenovo g500 series, lenovo g400 series, asus 3rd gen laptops, (you better check before installing)

for more information go to http://www.linuxfoundation.org

Thanks to Lusus Naturae. His forum showed me this way. so the rewards goes to him.


How do I change the weekday language in the Gnome Shell clock?

Open Region & Language, change Format from German to Spanish, and relogin.


How can I direct a pipe input to ls command?

You can use -exec with find command.

find . -name '*foo*' -exec ls -lah {} \;


In my case, the problem was not related to grub. The grub entry named 'Windows recovery environment' loads the bootloader correctly. But my system had a corrupt installation. A fresh installation of Windows 10  and a correctly reinstallation of grub (using boot repair) fixed the problem.


I finally gave up on Unity and instead installed gnome-shell; it's awesome!


Documentation for ~/.config/autostart/ *.desktop entries 12.04

The documentation you are looking for is here and especially here


How to unbind the Super or Logo key so it may be used by applications?

Fun w. xmodmap

When you press keys on the keyboard, there are a few places that define what happens.  The keyboard itself, the kernel, X or other display manager.  For your goal, we can teach X to treat the Super key differently.

The Super key is typically mapped to Mod4.  So, when you press Mod4+Tab, you may expect to be able to tab through different windows.  Not always, but many times applications ignore this modifier, or do not receive it.

An option you have is to adjust how the Super key is treated.  If you do this, you'll most likely want to swap out the functionality with a different key.  This is to ensure you can continue to do things such as the previous example of Mod4+Tab, or other common combinations.

If you want to see how X is working with your current modifiers, you can print those using xmodmap:

$ xmodmap
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Alt_R (0x6c),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)

Here, we can see that all of the Super keys, and Hyper keys are mapped to Mod4.  If your keyboard has a Left and a Right Super key, you could even make the adjustment only to on or the other.  For example, you could take Super Left out of Mod4, while keeping Super Right as a normal Super button.

You should take some time to look into how others have used modifier keys over the years to get familiar with the idea and the way people have learned to take the most advantage.  The idea is that you clear out the modifier, and then add back to it.  You could set up something such as ~/.xmodmaprc and then running xmodmap ~/.xmodmaprc.

# .xmodmaprc
clear mod4
clear control

add mod4 = Super_R
add control = Super_L
add control = Control_L
add control = Control_R

Why not just use the Control key to begin with?  It is very likely you have a Control key next to your Super key, so it will be up to you to find use for another modifier, such as Mod3, and use that.  Others use Mod2 or Mod5 in pretty clever ways to increase the number of modifiers available.

Once you get everything the way you'd like, you can have these setting activated with X and your user every time you log in by adding the xmodmap line to your ~/.xinitrc file:

xmodmap ~/.xmodmaprc

After you remap your Super_L key to not be part of Mod4, but part of another modifier group, the Global Keyboard Shortcuts should pick up on your key combinations.

Issues likely to be related

While actually a Gnome bug (?), could this issue or similar be happening to you?  It is more likely you want this Plasma configuration workaround, titled "How can I prevent Meta from opening up KDE Plasma's launcher?":

  As implied here, edit ~/.config/kwinrc, adding the following lines to the bottom.

[ModifierOnlyShortcuts]
Meta=

  Then restart kwin with kwin_x11 --replace & disown.


Why do I get a redundant % (percent sign) when I run Java code in VSCode?

Running the code in the question in Visual Studio Code with the Code Runner extension gives the correct console output:

a-b c-d

To run Java code with Code Runner, save Shuffle1.java by selecting File -> Save, and click the ▶ icon in the upper right corner of the code pane. When you hover the mouse over the ▶ icon a tooltip pops up which says Run Code (Ctrl+Alt+N). The output will be shown in the console pane which is located immediately below the code pane.

code pane and console in Visual Studio Code

Running Java code with Code Runner in Visual Studio Code is more convenient than running the same code in the terminal because I can debug the Java code from Visual Studio code using the Debugger for Java extension which I also have installed. I can also run the Java code by itself by clicking the ▶ icon without having to create a project for it first. For example when I'm trying a code block from Stack Overflow I usually don't want to create a whole project for it, because I want to try multiple code blocks and throw most of them away after trying them once. I don't even want to create a project for the best code block. Instead I want to save that code in a text file. This Java programming workflow does not create a separate project unless I need one.


ERROR: mdadm: No arrays found in config file or automatically

I think this message comes when you don't have hard disk arrays. While booting, mdadm checks for arrays and don't find any. So this message is annoying, but harmless.


Ubuntu dont start ( Windows 10 already installed)

To be able to boot into Ubuntu,you will need to turn off the fast boot option.

Here's how you can do it:

click on the Control Panel in you Windows 10 setting option that appears.
When the Control Panel appears click on the System and Security.
Now click on Power Options.
On the following screen click on Choose what the power button does.
A screen will appear with the heading Define power buttons and turn on
password protection.
Scroll down until you see Shutdown Settings.
An option should be available called Turn on fast startup (recommended).
Uncheck this option.
Click Save Changes.
after saving the changes you made,restart the system. The system will ask on boot weather you want to boot into Ubuntu or Windows or whichever OS you are using.


Why won't Ubuntu installed using Wubi accept my password?

There have been some reports of this. It's not clear what the cause is, but you can try resetting the password as follows:

After selecting Ubuntu hold down the Shift key until the Grub menu appears. If you're using Windows 8, the computer will restart - in this case as soon as the BIOS screen disappears hold down then Shift key.
Select the second entry, Advanced Options.
Again, select the second entry for Recovery mode. It will boot to a recovery menu.
Select Remount drives as read/write
Select Root shell
Check your username by entering:

ls /home
Reset your password (replacing  with your Ubuntu username which you saw under /home):

passwd <username>
Enter exit to leave the shell and then select Resume normal boot

e.g.

root@ubuntu:~# ls /home
bcbc
root@ubuntu:~# passwd bcbc
Enter new UNIX password:
Retype new UNIX password:


Cannot see my university WiFi network and unable to connect to it

WiFi network does not show up in the WiFi networks' Select Network menu

Can you see any wifi networks?  If so, are the networks that are seen on the same band (2.4 vs 5 ghz) as your school's network?  A network having "unique" authentication should not hinder you from seeing its presence, only make it a challenge to have a successful connection.

Check to make sure you have good drivers by connecting to something else (something wpa2 psk protected), then work your way up to an enterprise wifi network.

Also check the country setting on your WIFI.  If set to North America, and your university is using channel 12 or 13, you are not going to see it.


Can't install libapache2-mod-fastcgi and php-fpm

I came across this problem by doing a Digital Ocean tutorial whilst trying to set-up an NGINX Apache2 reverse proxy. Turns out the tutorial was wrong and that libapache2-mod-fastcgi package isn't available in the Ubuntu repositories, so the command they gave was incorrect. It has to be obtained externally (at least now, maybe it was accurate before).

Funnily enough I found the correct way to do it in a different Digital Ocean tutorial, which can be viewed below along with the source.

These commands worked for me:

wget https://mirrors.edge.kernel.org/ubuntu/pool/multiverse/liba/libapache-mod-fastcgi/libapache2-mod-fastcgi_2.4.7~0910052141-1.2_amd64.deb
sudo dpkg -i libapache2-mod-fastcgi_2.4.7~0910052141-1.2_amd64.deb


White noise in microphone with Ubuntu 20.04

I was kinda able to do a workaround with my laptop, I'm not sure if it would work in your case.
I installed the "QasMixer" package via Ubuntu Software.
sudo apt-get update
sudo apt-get install qasmixer

Then in the mixer Device pane select "hw:card" and there I saw the "mic" and a "internal mic".
The one making the noise was the "mic", so I turned it down and increased the level in the "internal mic", that one works fine.
You can tune it by recording and then listen at the same time in audacity or some other app so you can adjust the appropriate levels.
I'm not sure why that is, maybe this laptop has stereo microphone or something.

That solved the issue for me.


There are no more popular and notable in-the-wild viewer/editor applications that support PAM directly, but this is for a simple reason:

PAM is little more that a standardized pixel map with support for a few tuple types and transparency. Its intended purpose is fast, lossless manipulation and conversion of a raster image without accounting for gamma, color-profiles, pixels-per-inch, or any other image information.  In ordinary use, many images use the additional information to make images display correctly on differing hardware and software, or provide additional significant information to the viewer.

Because of the specific and limited usefulness of the PAM format, it is generally supported via the command-line or with a compiled library, allowing the developer who uses PAM to use as much or as little extra information as they need in their own way, and then export the PAM to an appropriate public format, incorporating that information.

Since you have mentioned no need for anything more than viewing and editing support of PAM, you may be interested in the libnetpbm C library and the existing Netpbm plugins for Gimp.  You may use those to create a plugin for PAM.

You mentioned that you are interested in a simple format and that PAM seemed ideal.  PAM is a binary format, so if binary formats are allowable, you may be more interested in PNG.  It is standardized for transport over a network as PAM is, and it is supported by virtually all viewers out of the box.  Depending on whether you need to load stored images, create images, convert images, and whether you need the speed of accessing a file directly or through a pipe, you may consider using PAM and PNG together with the Netpbm utilities pamtopng and pngtopam, using PAM for low-level manipulation or creation and PNG for everything else.


Swap has nothing to with CPU utilization. Swap is memory that is written to disk.

The CPU can access normal RAM directly, and RAM is extremely fast compared to swap. That's why we have RAM - as a fast buffer for data the CPU needs to access.

Swap allows the kernel to write unused memory to disk, for retrieval when needed. This is a costly process, as disk is extremely slow compared to memory, but it also allows more memory use than the physical amount of memory.

In addition, some things may never be used, but yet have allocated memory space. Typically the kernel will swap out things that is not used.

190MB used SWAP is not a problem. The problem is if the computer has to write things out to swap, and retrieve it again.

My laptop has 445MB written to swap at the moment, and yet over 3GiB unused memory - obviously the kernel at some stage found something that was not used, and decided to swap it out.

In short: don't care about swap usage unless:

You see frequent thrashing.
free -m shows very low amount of available memory

A quick example of free -m from my laptop:

$ free -m
             total       used       free     shared    buffers     cached
Mem:          7702       7454        247        582        230       3477
-/+ buffers/cache:       3746       3955
Swap:         8191        445       7746

As we can see, there's 247MiB free. But this is not the whole story. In addition, there's over 3GiB of caches, that can be freed very quickly if the kernel needs more memory for something. Thus, the real amount of free memory is 3955MiB, shown in the second line under free. You also see the swap used.

In short: don't care about swap space usage unless you experience problems, like software responding very slowly - which is a good sign of thrashing.

To check for thrashing, you can run vmstat -s to display statistics. You'll see two lines, like this:

   174085 pages swapped in
   569123 pages swapped out

This is the numbers of pages written to swap and read from swap. As long as these numbers are not increasing fast, everything is just fine - and swap gives you more memory for real applications and caching that speeds up your system.


Before the change you made to .bashrc file can take effect, you need to restart your shell by running the following command in the terminal:

source ~/.bashrc

Closing all open terminals and opening a new terminal does the same thing as the above command.


Gnome 3 loses focus after closing all open windows

I have the same problem.

I kinda solve that changing focus mode:

tweak tool
Windows
Windows focus mode

I've set it to "Sloppy" (also mouse works).

When I close all the windows the focus goes to the one under the mouse, and everything goes well :-)


Possible to automatically display the correct days of the week?

You can use the $execi Conky command to make what you want.

This command executes a shell command with specific interval and displays the output in conky.

For your need, you can execute the standard date command :

date -d tomorrow

This will return the tomorrow date using the standard output, but you can specify your output format using date parameters (see man date)

So what you need to enter in your .conkyrc script is :

${execi 3600 date -d tomorrow}

The interval is in seconds, I set it to 3600 but change it with your ideal interval


Move files to directories depending on their extension

Here's another way:

mkdir -p unknown;
for f in *; do
[[ $f =~ \. ]] && mkdir -p "${f##*.}" &&
               mv "$f" "${f##*.}"/ ||
mv "$f" unknown/; done

Explanation

&& means "run the command on the right only if the command on the left was successful".
|| means "run the command on the right only if the command on the left failed". The two symbols combined can work like an if/else block.
mkdir -p unknown; : create the unknown directory. The -p is there so that mkdir won't complain if the directory exists.
for f in * : for all files and directories in the current directory.
[[ $f =~ \. ]] && : if the current file/dir name contains a ., if it has an extension, then...
mkdir -p "${f##*.}"/ : the construct ${var##pat} will remove the longest match of pat from the beginning of variable $var. Here, the pat is anything up to a dot, so this will leave only the extension. This command, therefore, creates the extension's directory if it doesn't exist.
mv "$f" "${f##*.}"/ : The mv then moves the file into the relevant directory.
|| mv "$f" unknown/; : if the previous command failed (if this file/directory) does not have an extension, move it to unknown.

Note that this will print this error message, but you can safely ignore it:

mv: cannot move ‘unknown’ to a subdirectory of itself, ‘unknown/unknown’

If you need to move only files and no directories (the commands above will also move a directory called dir.foo into foo/), use this instead:

mkdir -p unknown;
for f in *; do
[[ -f $f ]] &&
    if [[ $f =~ \. ]]; then
        mkdir -p "${f##*.}" &&
        mv "$f" "${f##*.}"/;
    else mv "$f" unknown/; fi;
done


How do I startup the Computer with an alarm and run a scheduled program?

I got what I needed by this Command

sudo /etc/init.d/sleep_until.sh 23:00 && transmission-gtk

Where sleep_until is :

#!/bin/bash

# Auto suspend and wake-up script
#
# Puts the computer on standby and automatically wakes it up at specified time
#
# Written by Romke van der Meulen <redge.online@gmail.com>
# Minor mods fossfreedom for AskUbuntu
#
# Takes a 24hour time HH:MM as its argument
# Example:
# suspend_until 9:30
# suspend_until 18:45

# ------------------------------------------------------
# Argument check
if [ $# -lt 1 ]; then
    echo "Usage: suspend_until HH:MM"
    exit
fi

# Check whether specified time today or tomorrow
DESIRED=$((`date +%s -d "$1"`))
NOW=$((`date +%s`))
if [ $DESIRED -lt $NOW ]; then
    DESIRED=$((`date +%s -d "$1"` + 24*60*60))
fi

# Kill rtcwake if already running
sudo killall rtcwake

# Set RTC wakeup time
# N.B. change "mem" for the suspend option
# find this by "man rtcwake"
sudo rtcwake -l -m mem -t $DESIRED &

# feedback
echo "Suspending..."

# give rtcwake some time to make its stuff
sleep 2

# then suspend
# N.B. dont usually require this bit
#sudo pm-suspend

# Any commands you want to launch after wakeup can be placed here
# Remember: sudo may have expired by now

# Wake up with monitor enabled N.B. change "on" for "off" if
# you want the monitor to be disabled on wake
xset dpms force on

# and a fresh console
clear
echo "Good morning!"


The date/time indicator applet has either been accidentally removed or is not configured.

Start by trying to re-install it. (If you already have it, then you can ignore the message saying the latest version is already installed).

sudo apt-get install indicator-datetime

Now configure it.

sudo dpkg-reconfigure --frontend noninteractive tzdata

And finally get Unity to reload it.

sudo killall unity-panel-service


problem with using git using private key

Check the permissions for the keys inside the .ssh folder
Your private key should be protected:

Make sure your private key has permissions like {r-x------}

If not just do this by running chmod 600 id_rsa


Would suggest you install Xubuntu 20.04 to get the best possible xfce experience. One that may not be conflicting with the Mate desktop settings. But if you don't wish to do that, you should likely install the xubuntu-desktop package to make sure its bringing in everything that it should if it were a Xubuntu installation.


How to manage kernel upgrades with ubuntu-zfs installed

Muru's tip about DKMS put me on the right track.  Seeing the zfs-dkms package I looked at /var/lib/dpkg/info/zfs-dkms.list which names /usr/src/zfs-0.6.2/dkms.conf.  I didn't have that file, nor any of /usr/src/zfs-0.6.2.

Aha!  I installed zfs to import an existing zpool and mount filesystems from a FreeBSD system, including a /usr/src.  So when I built this system I "lost" (covered up) everything that went into /usr/src as part of the initial configuration.  After that, any kernel upgrades will leave you with an updated grub that points at a kernel with no matching zfs.ko.  Shouldn't that be an error?  Previously when I fixed this it was on the system console after zfs failed to start -- so of course my original /usr/src was available to me.


I have a desktop file that won't launch even though the command it executes works when entered into the terminal. What's the deal here? (Ubuntu 20.04)

Okay, I fixed it. It's a hideous solution, but its good enough for me.
I renamed my alt_start.sh to grim_fandango.sh and changed by .desktop to this:
[Desktop Entry]
Encoding=UTF-8
Value=1.0
Type=Application
Name=Grim Fandango Remastered
GenericName=Grim Fandango Remastered
Comment=Grim Fandango Remastered
Icon=/home/adrian/GOG Games/Grim Fandango Remastered/support/icon.png
Exec=/home/adrian/grim_fandango_start.sh
Categories=Game;
Path=/home/adrian/

Terminal=false


There is conf files in ~/.config/geany/ like keybindings.conf

You may backup and restore these files
You may backup and restore geany folder
If you dont care your previous configurations simply delete these
conf files or geany folder


After upgrade my webcam mic records fast, high pitched, and squeaky only in Skype (maybe Sound Recorder problem too)

There is a bug open in Launchpad (have a look here)

Comment #80 helped me:

  The problem is that the microphone is in the wrong sound rate by the
  pulse audio. As a user do the following:

gedit $HOME/.pulse/daemon.conf

  and put the following line on the file:

 default-sample-rate = 16000

  save it, and then restart pulseaudio as a user with the following
  command

pulseaudio --kill && pulseaudio --start

  This should solve the problem.


You can install a package called PlayOnLinux. It is an additional front end for Wine. It comes preloaded with a large assortment of installation scripts that Wine can use. Sim City 4 Deluxe Edition is one of the titles they cover. I can also verify that it works as I have used it for Sim City 4 myself.


Play one track while recording in another track in Audacity

The feature is called overdub and is on by default. It can be configured:

in preferences: Edit > Preferences > Recording > Play other tracks while recording (overdub) or
using the menu Transport > Transport Options > Overdub.

More information can be found in Tutorial – Recording Multi-track Overdubs.


how to register a shortcut key to type a diacritic in icewm?

Using setxkbmap or xmodmap seems like the right thing to do, but FWIW and FTR I found that the following worked for me after I came across this question. I'm hoping this helps others who want to use xdotool.
I have xdotool emulate these keys since I don't have them on my keyboard. Note the use of & to run the command in the background so that IceWM can return from handling the hot key and avoid interfering with xdotool.
200 ms is the shortest delay I could use and still have it work reliably. I'm not sure if --clearmodifiers makes sense for your use case or not.
key "Ctrl+Up"          xdotool sleep 0.2 key --clearmodifiers Page_Up &
key "Ctrl+Down"        xdotool sleep 0.2 key --clearmodifiers Page_Down &
key "Ctrl+Shift+Up"    xdotool sleep 0.2 key --clearmodifiers Home &
key "Ctrl+Shift+Down"  xdotool sleep 0.2 key --clearmodifiers End &

Also note that holding down these keys doesn't result in the expected repeating behavior (because IceWM hot keys are not the best choice for this) but that's fine for my purposes.


Rename a file to part of the name of parent directory in linux

Try the following code.  You might want to add an echo in front of the mv line, to check that the commands look good.  The quotes are only necessary if the names include spaces or other characters in them.

for x in */contig.fasta; do
    d=$(dirname "$x")
    p=$(echo $d | cut -d_ -f1)
    mv "$d/contig.fasta" "$d/$p.fasta"
done


Mouse doesn't work on an HP Mini netbook

I attached to a wired connection and reboot and tried installing the drivers which were available, Rebooted and it magically solved the problem.

How do I install additional drivers?


Show asterix while entering password in Terminal

To have a password prompt give feedback by showing asterisks while you are typing, provide the option pwfeedback to the sudoers plugin.

Copy this command, open a terminal and paste the following command:

echo -e "Defaults\tpwfeedback" | sudo tee -a /etc/sudoers.d/0pwfeedback

To undo the change, delete the file /etc/sudoers.d/0pwfeedback

sudo rm /etc/sudoers.d/0pwfeedback


Assuming that you already have a computer running Ubuntu (connected to internet via 3G) and a working wifi card, the procedure to share the 3G internet with other computers is very easy.

After you connect to the internet, right click on the network manager icon on system tray and click on "Create Wireless Network." Follow the on screen instructions and connect the other computers via wifi from the network manager.


How to grep VPS IP adress and put it to text file

cat myinfo.txt | egrep -oE '[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}'

cat myinfo.txt print the file
| pipe the results in the next command
egrep -oE find the pattern*
'[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' is the pattern, where :

[0-9]{1,3} means "1 to 3 characters that is composed of digits
\. escape the dot. Else, the dot is understand by the pattern as "whatever character you want (including dots, but also any of them : abcdef...)

Edit : '[0-9]{1,3}(\.[0-9]{1,3}){3}' is shorter, since you have repeated pattern in your pattern. You can use ( and ) for that

If you often use that command, you might want to alias that command in your .bashrc file with
echo -e "alias egrep_ipv4=\"egrep -oE '[0-9]{1,3}(\.[0-9]{1,3}){3}'\"" >> $HOME/.bashrc`
source $HOME/.bashrc

And then you will just need to pipe your text to egrep_ipv4
cat myinfo.txt | egrep_ipv4


Cannot open Windows! in Ubuntu/Windows dual boot

It seems there is no entry in the grub menu pointing to windows partition, sda3. There are a ton of linux versions though! Look at your pastebin starting at line 285.

Try rebuilding your grub. use boot repair


How do I configure a new Ubuntu installation to accept ssh connections?

sudo apt update
sudo apt install ssh
sudo ufw allow 22      # if you have ufw running, but it doesn't hurt to run.

That's the very minimum. It allows unlimited failed password attempts on a known port. Direct root-login is disabled (you can still su and sudo once logged in). If your username and password are guessable and the Internet can see the server, somebody will eventually break in.

I can't stress this enough: You need to harden the default setup. You essentially trade convenience for the likelihood of being hacked but I've gone through several suggestions on my blog. At the very least, I'd suggest:

Key-based logins. Disable password logins.
Move it off port 22. Use something crazy-high, in the 20000-60000 range.
Use fail2ban to ban people who do find it and try to brute it.

It'll take you less than 10 minutes and they take youfrom a 1/10000 chance of being broken in-to a probability so small, there isn't enough paper in the world to write its fraction. All assuming you're careful with your key, it has a passphrase of its own and you don't trumpet your credentials all over the net.

In terms of accessing this SSH server from the Internet, you may be facing local networking obstacles. If the computer is behind a NAT router (eg most home networks) without direct incoming access from the internet, you may need to look at port forwarding. Obviously if you don't need access outside the network, skipping this step will aide network security.


Try this instead:

xrandr | grep 'HDMI1 connected' &&
    xrandr --output eDP1 --auto --output HDMI1 --auto --left-of eDP1

That will run the xrandr command only if the HMDI1 screen is connected. I don't know the details of the format of .3/config (although I do know it will ignore anything after the exec line, are you sure you want this with exec?), so if that doesn't work just put it in a script and call the script from config.


Why is it possible to convert a file just by renaming its extension?

This is what probably happens. The application designated to open files with the file types you mention, is the same across all of those. .gif, .jpg, .png: these are all handled by EOG (GNOME's Eye Of Gnome). I suspect this application does not determine the file type based on the extension, rather it seeks for the magic number.

Note that the behavior of EOG may very well be exceptional, and also beware that no actual conversion is done. It's just that Linux applications tend to rely on different detection methods than file extensions, though many modern desktops actually look for the file extension to determine what application to open, since this method is probably quicker.

This all may apply to Ubuntu, Windows is a completely different story. Explorer practices a behavior by default that cuts off the file extension from the filename. This way, a file named "document.pdf" will show as "document", and renaming it to "document.dvi" will actually be processed as "document.dvi.pdf". Viruses sometimes exploit this "feature" by making the user believe they are opening a .jpg, while in reality they are being tricked into running a malicious exe!

To be really sure about filetypes, there is a command called file that shows you detailed file information.

From my personal experience, I can tell that, at least on my system, EOG cannot be tricked into recognizing a renamed image file. You must be doing something different than I do.


Increase the highlighted button bezel thickness (GNOME)

From the image provided by the poster, it appears that the theme is Ambiance.

The following bit of code will provide some relief:

* {
    outline-style: solid;
    outline-offset: -2px;
    outline-width: 2px;
}

Route #1:

This code can be added to ~/.config/gtk-3.0/gtk.css using a plain text editor. (If the file and folder don't exist, just create them.)

* {
    outline-style: solid;
    outline-offset: -2px;
    outline-width: 2px;
    outline-radius: 2px;
}

You can look at CSS outline properties for more options.

It should be noted that

code placed in ~/.config/gtk-3.0/gtk.css will affect all gtk3 applications and all gtk3 themes.
the values can be tweaked to one's needs.
omitting a color maybe preferable so that contrast is available irrespective of the background color involved (as seen in the animation below).

Route #2:

If you like to try other themes, modifying ~/.config/gtk-3.0/gtk.css may not be the best way to go because the code in this file applies to all gtk3 themes: obviously, if a particular theme already has its own way of dealing with the outline issue there could be unwanted effects.

For this reason, I prefer to edit the theme itself so that the change is restricted to a particular theme.

In this case, I edited usr/share/themes/Ambiance/gtk-3.20/gtk-widgets.css so that the top few lines looked like this:

* {
    -GtkHTML-link-color: #f07746; /* @link_color */
    -GtkIMHtml-hyperlink-color: #f07746; /* @link_color */
    -GtkTextView-error-underline-color: #df382c; /* @error_color doesn't work due to a gtk bug */
    -WnckTasklist-fade-overlay-rect: 0;

    background-origin: border-box;
    background-clip: padding-box;

    outline-style: solid;
    outline-offset: -2px;
    outline-width: 2px;
}

.background {
    color: @fg_color;
    background-color: @bg_color;
}

The three lines starting with "outline-" are the lines I added.

In the animation below, notice that the outline color differs depending on the background:

A couple of images showing the difference that can be made by editing the Ambiance theme or gtk.css as described above:

Before:

After:


Boot repair asking for 64 bit iso - what do I do with it?

After downloading 64 bit boot-repair disk iso file, you have to burn it to cd or make a bootable Boot repair USB through unetbootin.
Then boot from the boot-repair live disk. Because you installed Ubuntu in UEFI mode, you have to give the partition where EFI files are located by clicking advanced option in boot-repair (not recommended repair).
Then run it. After the successful completion of boot-repair, shut down your PC and remove the boot-repair live disk.
Now change the boot order in BIOS to set HDD as the first option. Save the changes and exit out of the BIOS.
GRUB will appears on startup with all the OSs' entries.


Can't connect to local mysql server through Workbench

The reason I'm asking this on an Ubuntu forum is because of the issue with sudo... is that normal?

Yes. We take security serious ;)

  Could it be related to my Workbench problem?

Well it gets to the underlying problem:

You need to grant privileges for workbench to connect to the database. Generic rule is:

GRANT ALL PRIVILEGES ON database.table TO 'user'@'localhost';
FLUSH PRIVILEGES;

where

database
table
user
localhost (this can be the IP address of the system using workbenech if not on the same system)

need to be adjusted to your needs and you can use * as a wildcard.

You can use

CREATE USER 'user'@'localhost' IDENTIFIED BY 'password';

to create a user where user, localhost and password need to be changed to your situation. From a security point of view leave "root" as is and use a username that is specific to your situation.