How do I get information from the logs on my computer when I only have access to the command line?

First here is a list of some of the common log files and what they contain:

/var/log/messages : General message and system related stuff
/var/log/auth.log : Authenication logs.
/var/log/kern.log : Kernel logs.
/var/log/cron.log : Cron daemon logs.
/var/log/Xorg.0.log : Log for the X server.
~/.xsession-errors : Logs related to the last X session (and the one before that, in xsession-errors.old)

After you've logged into the tty it's a good idea to move to the folder where the logs are located (usually /var/log). For this we use the cd command:

cd /var/log

Now that we're in the folder where the logs are stored we use the ls command to see what logs exist:

ls -a

There will probably be quite a few, these instructions should apply to all of them.

Once you find a log you want to view, you can use the less command:

less kern.log

Use the up/down arrow keys to browse through the file. When you're done, press Q to quit less. If you want to search the logs for a certain keyword you can use grep:

sudo grep "apparmor" kern.log

Grep also accepts regular expressions. See man grep for more information.

If you just need the output of a certain command see this question about saving terminal output to a file which you can then give to someone assisting you following one of the methods below.

This is all shiny and great you might say, but I don't have a single clue what I'm looking for, and I just need to give the log file to someone else to help me. We can do that too!

If you are getting help from someone on the internet (like this site!) the best way to share this information with them is to upload the file(s) to http://paste.ubuntu.com and provide them with the link. If your machine has an active internet connection you can do this in one step as described in method 2, otherwise follow the steps in method 1 and upload the files from another computer that can access the internet.

Method 1: Put them on external media..

such as a  flash drive or SD card.  Plug one in. Ubuntu should automatically mount it in /media so run

ls /media

If you see the name of your flash drive/SD card there then you can continue. Otherwise you'll have to mount it manually. (don't worry! It isn't scary at all).

Once you have your drive mounted you can use the cp command to copy over any logs or files you need:

cp /var/log/kern.log /media/myFlashDrive/

When you're done unmount the drive:

sudo umount /media/myFlashDrive

Method 2: Upload the files directly to a pastebin..

like paste.ubuntu.com. For this use the pastebinit command. First we need to install pastebinit:

sudo apt-get install pastebinit

then upload the files like so:

pastebinit file1 file2 file3

Where file1 file2 file3 is a space delimited list of the files you would like to upload. For example, if I was uploading kern.log and Xorg.0.log I would use the command:

pastebinit /var/log/kern.log /var/log/Xorg.0.log

Pastebinit will return a link for each file uploaded. Share these links with the people helping you.


Why can't I use my TV as a dual monitor setup?

If you have not already done so then install the NVidia graphics driver.  Go to System Settings > Additional Drivers to see what is available.


Here is my maas http configuration file.

http://paste.ubuntu.com/24380295/

MAAS version: 2.1.5


How can I use rhythm box and conky together?

Open a terminal and run man rhythmbox-client. You can get all that information, except for the album art, which is a bit more difficult to deal with, being binary data rather than simple text.


Nvidia Geforce 680 GTX - Glitches on screen

Check on Nvidia's Unix Driver Archive or Driver Downloads which version of their drivers support your card (GeForce GTX 680). In this case it's 304.1170 and 331.20.
Check on packages.ubuntu.com if this package is provided for 12.04. If not, then check for it in the proposed repo (see how to search for proposed updates on ubuntu.com and BinaryDriverHowto/Nvidia). Both versions are packaged for Precise in updates or proposed repositories: “nvidia-graphics-drivers-304-updates” and “nvidia-graphics-drivers-331-updates”.
You can enable updates repo in Synaptic > Settings > Repos > Updates > Updates and then install the latest nvidia-304 (actually 304.116 is available). You can use Additional Drivers to enable this driver. Prior to doing so, you may want to sudo apt-get remove --purge nvidia-304.
If that doesn't work, you can enable proposed repo in Synaptic > Settings > Repos > Updates > Proposed and then install the latest nvidia-331. You can use Additional Drivers to enable this driver.
After installing the necessary driver, sometimes it's necessary to run sudo nvidia-xconfig. See NVIDIA X Server Settings lost on every reboot.
Reboot.


How do i change the Permissions of my home folder?

Reading your question, it seems like perhaps you might have accidentally deleted your user entry from either /etc/group or /etc/password and thus part of the permissions have been lost, leaving nautilus unable to determine them. Or you simply changed the permissions of your home directory itself to not be readable.

If you run ls -lhd /home/constantin in a terminal, what is the output?

You may need to run sudo chmod ug+rwx /home/constantin in the terminal as well, so that nautilus will be able to see the permissions again.


(pulseaudio) bluez5-util.c: GetManagedObjects() failed: org.freedesktop.DBus.Error.NoReply: Did not receive a reply

The short answer is to execute the following command:

cp /usr/share/gdm/default.pa ~/.config/pulse/

The explanation:

By googling around a bit I found that pulseaudio is the audio subsystem in Ubuntu nowadays, and the pactl command can be used to fiddle with its settings.

This command has quite a few subcommands, the most interesting of which is list.

By executing pactl list short you can see that there is a module that contains the word bluez in its name, and it is bluetooth related.

I am using a desktop computer which is not equipped with bluetooth, so there should be no bluetooth-related modules running.

Executing pactl unload-module for each bluetooth-related module did not work, because on reboot the modules were loaded again, and so the error appeared in the log again.  One should take hint from the fact that pactl is billed as a program to "Control a running PulseAudio sound server": it does not actually modify the persisted configuration of the sound server.

By googling around a bit more I found that PulseAudio settings are stored in some default.pa file, and I found two instances of this file on my system, a fat one under /etc/pulse/ and a skinny one under /usr/share/gdm/.

Obviously, the fat one is global PulseAudio settings, and the skinny one is user-specific settings somehow related to the gnome desktop manager.

The contents of the user-specific default.pa were very interesting, as it contained commands to do precisely what I wanted to do: disable the bluetooth-related modules.  It does not disable the bluez module per se, but by fiddling with pactl earlier I discovered that disabling the other two bluetooth-related modules has the effect of automagically also disabling the bluez module.

Only problem is, gdm's configuration file is kind of useless to me, because it does not get executed when I log in.

By googling around even a bit more I found that the location for a user-local instance of this settings file is supposed to be ~/.config/pulse/default.pa.

Hence, I reasoned that if I just copied gdm's file to this location on my profile, the problem would be fixed.

And indeed it has.


Why does my calculator automatically open (multiple times) when my computer is idle?

Worth a shot:

Many keyboards have a key to open the calculator, perhaps yours is stuck.

To check if this is happening, go to System → Preferences → Keyboard Shortcuts and look for "Launch Calculator". The assigned key should be XF86Calculator.

Set a new shortcut, one that you're not going to trigger by accident, and see if it's still happening.


Is there any voice recognition software (with GUI) for Ubuntu desktop?

You can look into Blather.

Here's a YouTube playlist about how to use it.


The iwlwifi firmware pertains to your wireless card. Go here:

http://www.intel.com/content/www/us/en/support/network-and-i-o/wireless-networking/000005511.html

And download the correct 7260 driver. Unzip the .ucode files and put them on a usb. You can also skip the error and later put the .ucode files into /lib/firmware.

The second error pertains to your Ethernet port. You can also skip that error, download the drivers here:

https://packages.debian.org/jessie/firmware-realtek

and place the correct .fw files within the /lib/firmware folder.

Also, which version are you installing? 16.04 should have full support for the 2 previous devices.

--upvote if this helped :)--


I usually find any files using file command and filter the results using grep. It helps on many situation. For your case it is possible that your tomcat6 log file would be located in some other place.

So you can use following command to locate it, you would get few results then it would be easier to look the actual path:

sudo find / -type f | grep tomcat| grep log

For example if I want to find all the log files of apache2 then I have to execute this (I don't have tomcat installed, so giving apache2 example):

sudo find / -type f | grep apache2 | grep log

I got this:

/var/log/apache2/access.log.7.gz
/var/log/apache2/error.log.1
/var/log/apache2/error.log.9.gz
/var/log/apache2/error.log.3.gz
/var/log/apache2/access.log.1
/var/log/apache2/error.log.6.gz
/var/log/apache2/error.log.7.gz
/var/log/apache2/error.log
/var/log/apache2/error.log.2.gz
/var/log/apache2/error.log.5.gz
/var/log/apache2/access.log.2.gz
/var/log/apache2/access.log.4.gz
/var/log/apache2/access.log.9.gz
/var/log/apache2/error.log.8.gz
/var/log/apache2/error.log.4.gz
/var/log/apache2/access.log.6.gz
/var/log/apache2/other_vhosts_access.log
/var/log/apache2/access.log.8.gz
/var/log/apache2/access.log.5.gz
/var/log/apache2/access.log
/var/log/apache2/access.log.3.gz
/usr/lib/apache2/modules/mod_log_forensic.so
/usr/share/doc/apache2.2-bin/changelog.Debian.gz
/usr/share/doc/apache2-utils/changelog.Debian.gz
/etc/apache2/mods-available/log_forensic.load
/etc/apache2/conf.d/other-vhosts-access-log
/etc/logrotate.d/apache2

Now it is easier to locate all log of apache2 like error , access etc.. You can use more filter to cascade some more results..

Hope you would be able to locate your tomcat6 log file..


How to boot from a usb in UEFI mode on a Dell Inspiron

I've had the same issue for 1 year now on my Inspiron 5567 Kaby Lake 7500U.

The secret to install Ubuntu/Debian/any linux distrib on new Inspiron 5567 Kaby Lake is here: you need to create a special boot setup.

For a dual boot with a Windows 10 preinstalled :

Burn your iso with Rufus (mostly GPT mode for laptop after 2013, config autoselected by default in Rufus. Change to MBR if the pc is older),
Go in your USB key and enter the EFI  and please notice the name of the files here...as grubx64.efi (unsecure boot) or shimx64.efi (secure boot). You will need this info later.
Restart the PC with the USB plugged in. When the Dell logo appears, hit F12 till you see the boot menu. If you can see your USB key here, don't select it. First, enter the BIOS by selecting bios setup.
Go on Boot Sequence, you need to ensure the BIOS is set to UEFI, disable Legacy option ROMS and check that secure boot is enabled on the Secure Boot Enable line.
Now the most important operation... come back to Boot Sequence (General menu on the left)

click on Add Boot Option. The Add Boot Option window will pop up. Type a name in the Boot Option Name text area ("Ubuntu", for example).
Click the button to the left of the File Name text area. The EFI Boot Selection window will pop up.
In the File System drop down menu choose FS0: and EFI. Then using the directories section, navigate until you can choose SHIMx64.EFI (for Ubuntu only - for other distros use grubx64.efi or grubx.efi if your PC is not amd64, anyway it will be named grubxxxxx.efi) in the Files section.

A new boot option will now appear on the top and in the boot menu. Save and exit
The pc will now restart, when the Dell logo is coming, press F12 again, till the boot menu appears. Select the name you entered in the previous step (NOT the USB key)
The GUI installer will come up and you can run it

If it does not work for you exactly like this, try disabling secure boot in the BIOS.


How to run a java executable without java -jar

That's a case for alias: Open ~/.bash_aliases in your preferred text editor and add this line:

alias pdftk='java -jar build/jar/pdftk.jar'

Save the file and open up a new terminal window (or run . ~/.bash_aliases in an existing), pdftk should work with the syntax as you know it now.


This awk will do that using this variable:

uname -a | awk '{ print $7,$8,$9,$10,$11 }'

Result:

Nov 16 09:41:07 IST 2017

awk: start awk program
'{ print $7,$8,$9 }': print the 7th, 8th and 9th fields with , spaces between these values.
uname -a |: pipe the result of uname -a to the awk command for processing


That is odd! You appear to be using the correct syntax.

You could try adding the ppa with the full path of the PPA, rather than the "ppa" abbreviation. Try running the following in a console:

sudo apt-add-repository "deb http://ppa.launchpad.net/ubuntu-toolchain-r/test/ubuntu xenial main"

Let me know what happens!

edit: this is assuming you're running Xenial (16.04); otherwise, replace the xenial in the "deb" line with trusty or utopic or whatever version you're running.

Please let me know if this helps or if you have other questions.

--Nick


Is it possible to work on the same region as a locoteam but not IN the locoteam

Absolutely! We encourage and recommend people to advocate Ubuntu either as part of a LoCo Team or outside of LoCo Teams if they wish.

The primary aim of the ADK is to simply provide all the documentation and materials you need to perform great advocacy. Good luck!


yes why not it will work smoothly but i recommend to have atleast 2-4 gb of ram on your pc


In case someone finds this with the same problem: I made a fresh installation of Lubuntu 20.04 and after copying over my old ~/.config folder, I saw a similar boot problem (although not the grub menu). I then ended up doing a complete re-install of regular Ubuntu and moved to version 20.10 at the same time where I made sure the ~/.config folder was not copied from my backup and the problems have not occurred since.
I am not sure, what exactly was the cause of the problems, but I assume it was either 20.04 specific or some configuration mistake on my part. So clearing out ~/.config or upgrading Ubuntu to the next version should solve it.


Dual boot windows 8 (UEFI / GPT) with Ubuntu and boot-repair

The easiest solution is to try using the USB flash drive or CD-R version of my rEFInd boot manager. (Note, however, that if you created a separate /boot partition, you'll need to press F2 or Insert twice and add ro root=/dev/{whatever} to the boot options, where /dev/{whatever} is your root device. This should not be necessary if you did not split off /boot into its own partition.) If that works, you can install the Debian version in Ubuntu, which should cause rEFInd to take over as the default boot manager. (If you've got a separate /boot partition, installing the Debian package will obviate the need to add boot options.)

The more complex solution is to dig in and do GRUB debugging. There are numerous sites that describe how to do this. One that I wrote is this developerWorks article, but doing a Web search will turn up lots more. This process is complex and requires a lot of knowledge to do right, which is why Boot Repair exists -- it's supposed to do the tricky stuff for you. Unfortunately, as you say Boot Repair did not work, digging in manually may be your only option. (There are options you can select within Boot Repair, but they're mostly for experts anyhow.)


How to Install Ubuntu without USB or a disc

I believe there is a network installation available for Ubuntu, not 100% sure about LUbuntu.


How to install specific Ubuntu packages, with exact version?

You can use apt-get to install a specific version of the package a long as it is in an archive that apt knows about.  From the apt-get manpage:

  A specific version of a package can be selected for installation by following  the package name with an equals and the version of the package to select.  This will cause that version to be located and selected for install.  Alternatively a specific distribution can be selected by following the package name with a slash and the version of the  distribution or the Archive name (stable, frozen, unstable).

For example, you could do:

sudo apt-get install apache2=2.2.20-1ubuntu1

Note that you may need to do some dependency resolution on your own in this case, but if there are any problems apt-get will tell you what is causing them.  On my 11.10 system I would need to do the following to get this to work:

sudo apt-get install apache2=2.2.20-1ubuntu1 \
                     apache2.2-common=2.2.20-1ubuntu1 \
                     apache2.2-bin=2.2.20-1ubuntu1 \
                     apache2-mpm-worker=2.2.20-1ubuntu1

You can display available package versions as follows:

sudo apt list -a apache2


Is there a way to add a window list on the panel in Unity?

Here's a simple script using wmctrl and a tool I made to create appindicators:

https://sites.google.com/site/redaea/cappind-py/examples/windowlist

it requires wmctrl (apt-get it) and this tool => https://sites.google.com/site/redaea/cappind-py/


Why apt-get doesn't install the newest software

You should take notice that with apt-get you are installing the newest software in the Ubuntu Repositories, not the newest version of the software, if you want the latest you'll need to go to the developers page and download it


Keeping the time stamp when syncing with Ubuntu One?

According to FAQ of Ubuntu One, you can't, because Ubuntu One does not sync metadata about files.


NVIDIA Drivers are not working anymore - only 1 screen is detected, max resolution 800x600

First remove all currently installed NVIDIA software.
Select the Ubuntu menu entry and  press the E key.
Add nouveau.modeset=0 at the end of the linux line.
Press the F10 key to boot into the Ubuntu system.

When the login screen appears press Ctrl+Alt+F1.
Enter your user name and password and then execute :

sudo apt-get purge nvidia*
sudo reboot

Install the latest stable drivers for GTX 7 series cards.
Select the Ubuntu menu entry and  press the E key.
Add nouveau.modeset=0 at the end of the linux line.
Press the F10 key to boot into the Ubuntu system.

When the login screen appears press Ctrl+Alt+F1.
Enter your user name and password and then execute :

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-367
sudo reboot

Note : Set a Space between the last character in the linux line and nouveau.modeset=0.
After the NVIDIA drivers are installed adding the boot parameter is not necessary anymore.
When you want to install the latest official drivers, replace nvidia-367 with nvidia-370.


i can not watch youtube full screen videos on the monitor

You can use the HTML5 mode, which will fix the Problem for all videos that support HTML.
Go to www.youtube.com/html5 to enable it.
Or you can use one of these workarounds:
http://www.webupd8.org/2012/10/ubuntu-multi-monitor-tweaks-full-screen.html


If you have followed instructions carefully, you should have no problem installing from a flash disk. Did you perhaps get information from any place other than an official source?

If so, try this please: Installation from USB Stick.

You haven't really supplied us with enough information about what went wrong, so it is difficult to help you. Only two things spring to mind right now:

You must have sufficient memory on the flash disk when burning an image.
Did you change your boot settings in the BIOS?


Unable to connect to websites which donot start with www

That is determined by the DNS entries set up with the web site.

For instance, you can get to mine at http://calttc.net or just calttc.net

Also, you can get to COX's speed test at http://fast.com or just fast.com

Google doesn't require the www.  But a lot of web sites do.  It all depends on how they were set up.

So there is nothing wrong with your computer.


Get rid of the 3rd party package. The folks who compiled the package version 1.69 that is provided for download at google code site did a poor job. That package breaks .deb packaging standards in several ways.

pidgin-data version 1:2.10.7-0ubuntu4.1 which is installed on Raring by default and that triggers the error, explicitly states in its control that it Breaks: pidgin-facebookchat (<< 1.69-2) which you were trying to install (1.69). That fact is reflected in the error message you get. Pidgin-data's package control also states that it Replaces: pidgin-facebookchat (<< 1.69-2) which means that it replaces some files from the pidgin-facebookchat package you try to install, i.e. there is a clear conflict.

Since the 3rd party packages is broken there is no trivial way to straighten this up, except luckily there is an Ubuntu packaged version 1.69-2.1ubuntu1.

ACTION:

Get rid of the 3rd party package.
Install the Ubuntu package provided by the default channel.
Repair the dpkg system on the go if needed.

That should be done by simply ...

$ sudo apt-get update
$ sudo apt-get install pidgin-facebookchat

Maybe you need to remove the faulty package with dpkg -r pidgin-facebookchat first. Also some dpkg --configure -a, apt-get -f install could be needed. But just the two lines above should do it. If your dpkg system got too much confused, additional investigation may be needed.

CONCLUSION:

When you find a fancy software package, first look after versions provided by the channels provided by Ubuntu or a PPA. Chances are that packages out of the wild break your system. ;)


Why isn't Gnome 3  working on 12.04 in VMWare Player?

From the screenshot, I see you are running Ubuntu in VMWare Player (on Windows).
What's probably happening is that Gnome isn't detecting 3D acceleration/support and is falling back to Gnome 2D (which looks exactly like your screenshot).
VMWare Player does have rudimentary 3D support, but it needs to be enabled from the settings first; see the below screenshot:

If you can't find that option in the settings, add this line to the .vmx file:

mks.enable3D = "TRUE"

Then restart VMWare player, boot Ubuntu, select Gnome and hopefully you'll get Gnome-Shell (3D).


After boot-repair "Please install an operating system on your hard disk"

I would suggest trying the instructions to repair grub on terminal, located here. (scroll down past the boot-repair instructions). It looks like all of your data/partitions are intact, grub is just not installed. The above link should help.

Let me know if it works!
DevNewb


This answer assumes you use an iptables firewall on your 'router', and not something 'easier' like ufw, and that you have properly set up the router to handle VLANs on the given interface.

What you're looking for is called "NAT".  This is done by default on many routers, however by default isn't done on Linux systems.

You'll need to enable IPv4 forwarding also in the system to make it work.  Add this to the end of /etc/sysctl.conf:

net.ipv4.ip_forward = 1

You can get that to apply by doing sudo sysctl -p afterwards.  This enables the ability to forward traffic through.

Since your default Internet route is out to the Public Internet, but you want to set up NAT so that the other VLAN machines can go out to the Internet via your system, you would need to set up something like this in iptables:

iptables -t nat -A POSTROUTING -s ip.add.re.ss/24 ! -d ip.add.re.ss/24 -m comment --comment "Allow vlanXX to go to the Internet, masquerade as the public IP." -j MASQUERADE

This is a rule in the NAT table for how to route traffic after it's arrived at the system.  You'll need three of these rules, one for each subnet of each VLAN.  Adjust ip.add.re.ss and vlanXX accordingly to match the information for your network specifically.

You also need to have an ACCEPT rule in the filter table of iptables for FORWARD, and you would typically do this by interface, like this, updating the XX items to be the vlan number:

iptables -t filter -A FORWARD -o ens1f1.XX -m comment --comment "NAT for vlanXX" -j ACCEPT
iptables -t filter -A FORWARD -i ens1f1.XX -m comment --comment "NAT for vlanXX" -j ACCEPT

Once you've done this, you need to make sure you save the iptables rules.  Ideally you would do this if you didn't have it installed first, and tell it "Yes" when it asks to save your rules:

sudo apt-get install iptables-persistent

... and that would set up the iptables rules at boot properly as well as save the rules.  If you already have iptables-persistent, then you need to update the rules it loads:

sudo su -c 'iptables-save > /etc/iptables/rules.v4'

... and now the NAT MASQUERADE rule will be in place every time you boot.


How to stop Ubuntu from moving my windows to new monitor?

You have to define your primary monitor when Ubuntu detects a second monitor. You can do that by going into your launch menu, typing display, and then choosing your primary monitor.


http://dogber1.blogspot.com/2009/05/table-of-reverse-engineered-bios.html  suggests you password-protect your BIOS. Then, enter an incorrect password once and record the checksum error.

Periodically thereafter, enter an incorrect BIOS password and compare the checksum. If it differs from the original, your BIOS has been altered, and redownloading it from the manufacturer's website and reflashing it will recover from whatever tampered with it.


Update: Failed to lock /var/cache/apt/archives/lock

I had this happen.  Its because you have a package manager open.  See if you have synaptic, or other apt open, and close it.  Also if you have GUI update manager running at the same time it will give you that same error.


/usr/share/X11/xkb/keycodes: which is used?

I can't take credit for this answer: it's someone's answer to your same question on another forum, but I'm posting the answer here because it helped me, and askubuntu was the first place I looked.

$ setxkbmap -print -verbose 10 tells you things about your xkb setup.

The output includes which keycodes are in use by your hardware. In fact there may be more than one in use: partial sets of codes from different files are concatenated, and expressed in the output using a + sign.


Ubuntu 19.10 Search Box in GNOME is not working

I've found a solution for this problem. In my case, the cause was a script from gnome-look for edit GDM theme, some incompatibility happens in ubuntu 19.10 and this script. For solve this problem just reinstall the yaru theme

sudo apt-get --reinstall install yaru-theme-gnome-shell

Then reboot or press alt+f2 with r for reload GNOME.


Edit

  /etc/php5/mods-available/opcache.ini

find opcache.enable_cli=1 change it to opcache.enable_cli=0
if opcache.enable_cli=1 is not found add the following line opcache.enable_cli=0


link to download the appropriate driver nvidia-Ion 2

Installing an Nvidia driver manually in Linux is rather complex. Go for it only if feeling very bored, brave and adventurous. Otherwise, use the howto for everyone else.

https://help.ubuntu.com/community/BinaryDriverHowto/Nvidia


Is your application up to date?
If not download and install the current version from the Viber official website.
That worked for the issues I had. Hope it'll work for you too.


The command dpkg -S /usr/share/icons/ should show you what package you need to reinstall in order to restore your icons:

➜  ~  dpkg -S /usr/share/icons/
gnome-icon-theme-extras, gimp-data, gnome-colors-common, gnome-brave-icon-theme, alacarte, gnome-online-accounts, smplayer, eog, libreoffice-common, gcr, baobab, gnome-system-log, evince-common, emacs24-common, hicolor-icon-theme, libpeas-common, byobu, desktop-base, icedtea-netx-common, gnome-icon-theme, empathy-common, gnome-session-common, gnome-control-center-data, gnome-settings-daemon, gnome-power-manager, gnome-media, shotwell-common, cabextract, gnome-panel-data, libgweather-common, gnome-disk-utility, imagemagick, gdm3, openjdk-7-jre:i386, gnome-themes-standard-data, gnome-user-share, gparted, rygel, vinagre, cheese-common, gnome-bluetooth, iceweasel, file-roller, xchat, rhythmbox-data, seahorse, deluge-gtk, gnome-packagekit-data, gnome-icon-theme-symbolic, brasero-common, gnome-tweak-tool, aisleriot, gnome-accessibility-themes, ettercap-graphical, pidgin-data, zim, chromium, gconf-editor, dconf-editor, ibus, steam, gbrainy, network-manager-gnome, flashplugin-nonfree, synaptic, geary, tracker-gui, xterm, freeciv-data, gnome-applets-data, gsmartcontrol, wireshark-common, wireshark, upnp-router-control, ppstream, ibus-anthy: /usr/share/icons

Is not an easy task, but it should leave you in the good path. You can reinstall using:

sudo apt-get install --reinstall package


16.04 How to fix mplayer which suddenly went silent after automatic software update

guiverc's comment above gave me the information I needed to get it fixed.

First right-clicked on the speaker in the upper right and made sure it was set for the Digital Output (S/PDIF) device.  (I use a USB sound dongle)

Then to pavucontrol in the terminal.

--> Output Device tab --> Audio Controller Digital Stereo --> Advanced

Checked the MPEG box.

Now it works again.

MANY THANKS, guiverc


Recovering data from "luks + ext4" formatted usb stick

A backdoor for people who have lost the passphrase/password would defeat the purpose of encryption. So I am sorry.

It is a good idea to keep an unencrypted backup of the data that you cannot afford to lose, and to keep that backup in a safe place.

Maybe after a good night's sleep, you will remember the password/passphrase :-)


How to get pygtk with python2.6 ? the update to 12.04 removes it. (cannot go python2.7 because of specific extensions)

I solved a same problem related python-httplib2.

below is that I try.

sudo apt-get source python-httplib2
cd python-httplib2-0.7.2/
sudo python2.6 setup.py install

maybe you can try with pygtk package.
I wish this will help you.


Windows 7 dual boot Ubuntu. Install. Reinstall.

Simply pop in a Ubuntu live CD/USB and boot from it!

Firstly head over to the Ubuntu download page here, and download the 32bit .iso

Once you have done that open up "Start up disk creator" in Ubuntu and grab a blank CD/DVD/USB and choose that along with the .iso you have just downloaded. note: some computer's won't boot from USB if they are quite old so if you can use a CD/DVD.

Once the process has completed reboot your computer with the CD/DVD/USB in the computer and boot into it. This can be done my either pressing F12 on most computers or entering the bios to change the boot order, here put you CD/DVD drive at the top if you have burned to a CD/DVD or "removable storage" if you have burned to a USB.
Once booted you will get an option to "install Ubuntu", from here choose the configuration you want, e.g. Erase Windows and reinstall, Install alongside Windows etc.

Once this process has completed you will have a brand new working Ubuntu 12.04 installation.

If you need anymore help let me know.


What you want is called Pinning: and can done in several ways. From the link...

Introduction to Holding Packages
Holding a package basically means you're telling the package manager to keep the current version no matter what. This is useful if more recent version of a currently working program breaks after an update.
The following will describe the process of actually holding the package, there are several options to accomplish this<...>

The manual method is the easiest if it is just a few packages...
sudo -i
echo {package_name} hold | dpkg --set-selections


Easiest language to develop tcp server on ubuntu?

A quick way to get a TCP server up & running is to use the tcpserver program:

  NAME

   tcpserver - accept incoming TCP connections

  SYNOPSIS

tcpserver  [ -146jpPhHrRoOdDqQv ] [ -climit ] [ -xrules.cdb ]
           [ -Bbanner ] [ -ggid ] [ -uuid ] [ -bbacklog ] [ -llocalname ]
           [ -ttimeout ] [ -Iinterface ] host port program [ arg ...  ]

  DESCRIPTION

  tcpserver waits for connections from TCP clients.  For each connection, it runs program with the given arguments, with descriptor 0  reading  from the network and descriptor 1 writing to the network.

  The  server's  address is given by host and port.  host can be 0, allowing connections from any host; or a particular IP address, allowing connections only to that address; or a host name, allowing connections to the first IP address for that host.  port may be a numeric port  number  or  a port name.  If port is 0, tcpserver will choose a free port.

  . . .

You could also use socat.


How to avoid upgrade the package(s) in upgrading?

You can lock a package with

sudo apt-mark hold packagename

command.


How to install Ubuntu on Lenovo Ideapad system with preinstalled Windows?

I have done this a few times, there are usually a couple of options given for booting to the USB: you can either run the USB on UEFI boot mode, or just boot to the USB directly. If you have created an executable using Rufus, just start from the USB stick directly.


created new machine with juju add-machine, but it's in "pending state" for a long time and it's not getting started

Juju doesn't know what to do with the machine, as you have no services.  Add a service and juju should assign the unit to the service.  Then it will provision and put your service on it.


How do I make my monitors show up as two separate monitors? - NVidia GeForce GTX 550 ti

You need to use xsetwacom to map the stylus to a specific region of your large desktop. If you use xorg.conf you can have it automatically map the tablet at login using topx, topy, bottomx, and bottomy; or you can make a startup script to run at login. The linuxwacom man page has information on how to calculate the numbers you'll need for topx, topy, bottomx, and bottomy.


How to change the Unity Launcher's icon theme?

That's a 100$ question dude. Apparently Unity is just stuck on Humanity icons set. I just don't know why. Maybe you should follow this launchpad entry:

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


The volume of comments about issues in upgrading to 12.04 seems pretty scary.

Personally I would make sure all your data stays in the cloud (Dropbox, UbuntuOne, etc) and is backed up on external drives (cheap now) and CD/DVD if possible. and when you are ready to go to 12.xx, do a clean install, install your key programs again and resync the data back in.

If you have a fair sized disk one good option (that I actually did) was to partition off another 100GB and just put it on that and have that be the new default first item to boot (which it will normally be with this install process) (actually a pretty good way to get several consequitive Ubuntu versions out of 1 machine !!!


sudo apt-get install show unmet dependencies

sudo dpkg --configure -a
sudo apt-get autoremove
sudo apt-get clean
sudo apt-get update

If it doesnt work

sudo apt-get autoremove <package name>

Or
    sudo apt purge

Try this


Not showing Dolphin's Image Thumbnails on Xubuntu 17.04

Only install:

sudo apt-get install kffmpegthumbnailer

Video tutorial in Youtube

Activar vista previa de videos en Administrador de Archivos dolphin4 en Ubuntu 17.04


Avoid suggests, recommends and upgrades during `apt-get install`?

Suggested packages are not installed by default, to install suggested packages you need to explicitly use --install-suggests option (or set APT::Install-Suggests yes apt configuration parameter).

Now, to avoid installing Recommended packages, either use --no-install-recommends option with apt-get or set APT::Install-Recommends "0" in anyplace referred by Dir::Etc::Main (typically /etc/apt/apt.conf) or Dir::Etc::Parts (typically /etc/apt/apt.conf.d/.

Similarly, to avoid upgrading packages, either use --no-upgrade option with apt-get or set APT::Get::Upgrade "0" in anyplace referred by Dir::Etc::Main or Dir::Etc::Parts.

In a nutshell, with apt-get:

sudo apt-get install --no-install-recommends --no-upgrade <package_name>


Byobu status bar keeps loading after install

So this is actually a duplicate of this question:

https://stackoverflow.com/questions/10731099/byobu-hard-status-line-scrolls-the-screen-when-updating

As it turns out, I just committed a new fix to Byobu today that should help solve this problem.  You'll need a Byobu version of 5.59 or newer.  When you see this problem, try pressing Alt-F5.  That should disable UTF-8 support in Byobu.

Full disclosure: I am the author and maintainer of Byobu.


Please open a terminal Ctrl+Alt+t and do:

cd ~/Downloads
wget https://cdn.kernel.org/pub/linux/kernel/v3.x/linux-3.12.57.tar.xz

You should be all set.


Rounting for multiple NIC, wrong order route sometimes

The solution i found is remove de network from dynamic route in interfaces file just after definition of enp0s31f6
"post-up route del -net 192.168.1.0/24 gw 0.0.0.0 dev enp0s31f6"

isn't elegance solution but ...

thanks anyway!!


You can always check the /var/log/auth.log. Each request for authentication will go into the log. Here's for example, an entry from when i manually opened the update manager and canceled when the popup asked for updates:

Sep 30 00:07:13 eagle pkexec[17815]: xieerqi: Executing command [USER=root] [TTY=unknown] [CWD=/home/xieerqi] [COMMAND=/usr/lib/update-notifier/package-system-locked]

And this is manually running apt-get:

Sep 30 00:10:24 eagle sudo:  xieerqi : 1 incorrect password attempt ; TTY=pts/6 ; PWD=/home/xieerqi ; USER=root ; COMMAND=/usr/bin/apt-get update

As you can see, the COMMAND field tells you what app requested root privilege. From there, you can inspect the integrity of that executable file by scanning it clamav or similar tools. If you're really worried about that executable being compromised, check it's SHA sum, for instance,

sha1sum /usr/bin/apt-get

If it's changed somehow, you will see different output of sha1sum.

Finally, remember to practice good security over all - strong passwords and no remote access to your system(unless you really need it).


From the Wikipedia:

https://secure.wikimedia.org/wikipedia/en/wiki/Gobuntu

Because Ubuntu now incorporates a "Free Software Only" optional installer, the Gobuntu project was rendered redundant in early 2008. As a result Canonical made the decision to officially end the Gobuntu project with version 8.04.


How to downgrade feature branch installed LXD to LTS branch?

if you are using LXD in Xenial (16.04LTS) then you can check:

~$ apt-cache show lxd | grep Version
Version: 2.16-0ubuntu2~ubuntu16.04.1
Version: 2.0.10-0ubuntu1~16.04.1
Version: 2.0.2-0ubuntu1~16.04.1
Version: 2.0.0-0ubuntu4
~$

If your actual version is 2.0.x, then you need the update and you will not have any compatibility problem, Because 2.16 come from backports and by default this updates don't apply.

But, if you are updated now to 2.16 release (this one comes from xenial-backports), then you can't downgrade to 2.0 version cleanly, because lxd 2.1x get new functionality with network and storage functions/modules, and this update the sqlite databases used by lxd.

The updates from backports try to work without any problem in upgrade. If you added the PPAs from LXD, these don't guarantee any compatibility in upgrades.

check this for similar cases:

https://discuss.linuxcontainers.org/t/install-specific-lxd-version-in-ubuntu-16-04-2/247
https://github.com/lxc/lxd/issues/2952


Steam not working in Ubuntu 14.04 LTS i386

Uninstall all graphics drivers using,

sudo apt-get remove --purge nvidia*

Uninstall steam using,

sudo apt-get remove --purge steam

And install latest version of xfonts using sudo apt-get install xfonts-100dpi.

After Reboot the system. Install steam and drivers.

Probably, it will solve this.

EDIT 1:

May be there is a problem in your os arch. Try the following,

Install libgl1-nvidia-glx:i386, using # aptitude install libgl1-nvidia-glx:i386 in terminal.

This may fix it.


How to install only the dependencies of a package?

This will install all packages in the package's Depends and PreDepends field:

sudo apt-get install $(apt-cache depends <PACKAGE> | grep Depends | sed "s/.*ends:\ //" | tr '\n' ' ')

Basically you ask for all dependencies, filter out the (Pre)Depends, and format that output for apt-get.

One problem are dependencies like

Depends: pulseaudio
  pulseaudio:i386

or virtual packages like

Depends: <java6-runtime-headless>
  default-jre-headless
  openjdk-6-jre-headless

So: use with care - it doesn't work in all cases!


Restore default apt repositories in sources.list from command line

I'm not sure what you want, but:

The parent repository is always http://archive.ubuntu.com/ubuntu - everything else is a mirror of this. The other primary mirrors all have a domain of the form <cctld>.archive.ubuntu.com, where the two character short code is the Country Code Top Level Domain. You can find additional mirrors with their status at Launchpad.
The distribution codename is part of the channel (the third term). You can use lsb_release -sc to find that out, and it's the first word of the release pretty name in lowercase (trusty for Trusty Tahr, for example).
There are five channels: <codename>, <codename>-security, <codename>-updates, <codename>-backports and <codename>-proposed. The first is necessary as it is the base, the second is highly recommended as it contains security fixes, the fourth only if you need some package backported from a newer release and the fifth only if a developer asks you to enable it for testing a possible fix.
There are four repository sections: main, multiverse, universe and restricted (What's the difference between multiverse, universe, restricted and main?)

So you can always create a safe sources.list which contains just:

deb http://archive.ubuntu.com/ubuntu <codename> main multiverse universe restricted
deb http://archive.ubuntu.com/ubuntu <codename>-security main multiverse universe restricted

If you want a command to do this:

printf 'deb http://archive.ubuntu.com/ubuntu %s main multiverse universe restricted\n' "$(lsb_release -sc)"{,-security} > /etc/apt/sources.list

Or, lsb_release isn't available, use /etc/os-release from the base-files package:

printf 'deb http://archive.ubuntu.com/ubuntu %s main multiverse universe restricted\n' "$(. /etc/os-release; printf "%s" "$UBUNTU_CODENAME")"{,-security} > /etc/apt/sources.list

In addition to the Launchpad list, the list provided by the Software Sources program is
from /usr/share/python-apt/templates/Ubuntu.mirrors, which is from the python-apt-common package. This package is only an indirect Suggests dependency of apt, so it may not be installed by default on a server.


Manual network IP leads to spotty connection

I did a test and found that if I manually change the IP to the same IP the DHCP gives then my connection is fine. I added 1 to the IP and it was still fine. I went close to my desired IP and it was still fine. Once I use 192.168.1.200 I get the same issues.

Current Solution

The IP in question has been manually "leased" by the router router before. I say "leased" because it was manually done but is still one record. Anyway, I suspect this causes a hiccup on the router's IP tables so I've decided to use a different IP in the mean time instead of figure out how to clear the IP tables on my router.

Cheers!


Why does japanese filenames not show on ubuntu server and samba?

I found the solution to my problem, although I don't understand why it didn't resolve the japanese characters with the standard mount command, I found that pmount works well. Hope this helps others!

Unmount Auto Mounted USB drives

pumount /media/usb0

Mount Manually USB Drives

pmount /dev/sdc1 HERMES


Prior to version 11.10 (which included Empathy 3.0), this was not possible from the Empathy interface.

See also:

Launchpad bug report
Upstream bug report
OMG! Ubuntu article regarding the new feature


Reproduce playlist from terminal in Banshee

try :

banshee file://(the path to and name of your playlist)


Best way to dedupe my Thunderbird addressbook?

I had the same problem several years ago, and wrote a very small python script to unify the LDIF export of a Thunderbird addressbook:

export addressbook as LDIF to e.g. abook.ldif
run cat abook.ldif | unify_ldif.py > abook_new.ldif
import abook_new.ldif again (maybe rename old addressbook before)

The script currently matches duplicate entries on email address and identical name, but this can of course be adapted (in function find_existing_entry). Does this work for you?

The program is here (EDIT: you need the python-ldap package):

#!/usr/bin/env python

import sys
from ldif import LDIFParser, LDIFWriter

def find_existing_entry(ldif_entries, ldif_entry):
    for dn, entry in ldif_entries.items():
        if 'mail' in ldif_entry and 'mail' in entry:
            for mail in ldif_entry['mail']:
                if 'mail' in entry and mail in entry['mail']:
                    return dn
        if 'cn' in ldif_entry and 'cn' in entry and ldif_entry['cn'][0] in entry['cn']:
            return dn
        if 'sn' in ldif_entry and 'sn' in entry and 'givenName' in ldif_entry and 'givenName' in entry and ldif_entry['sn'][0] in entry['sn'] and ldif_entry['givenName'][0] in entry['givenName']:
            return dn
    return ''

class MyLDIF(LDIFParser):
    def __init__(self, input, output):
        LDIFParser.__init__(self, input)
        self.writer = LDIFWriter(output)
        self.entries = {}
    def merge(self, dn, entry):
        if 'mail' in entry.keys():
            if 'mail' in self.entries[dn].keys():
                for mail in entry['mail']:
                    if mail not in self.entries[dn]['mail']:
                        self.entries[dn]['mail'].append(mail)
            else:
                self.entries[dn]['mail'] = entry['mail']
        for key in entry.keys():
            if key not in self.entries[dn].keys():
                self.entries[dn][key] = entry[key]

    def handle(self, dn, entry):
        if dn in self.entries.keys():
            self.merge(dn, entry)
        else:
            found_dn = find_existing_entry(self.entries, entry)
            if found_dn != '':
                self.merge(found_dn, entry)
            else:
                self.entries[dn] = entry
    def output(self):
        for dn, entry in self.entries.items():
            self.writer.unparse(dn, entry)

parser = MyLDIF(sys.stdin, sys.stdout)
parser.parse()
parser.output()


Internet connectivity drops upon installation

Are you using Ubuntu 15.04 or 15.10?

I have also faced same problem and install Ubuntu

Try to use LTS version.The Rolling Release version has a few bugs


I was able to copy my files through USB files in the installation of Ubuntu and after take off I chose to try Ubuntu and entered the file and I was able to drag my files and put them in another USB ..


There is currently no port of Ubuntu Touch for the Samsung Galaxy S6.

Refer on the Ubuntu Touch Wiki page for more information and to see an updated list of supported devices.


There's usually some important stuff in /var, if you have a backup now would be a good time to restore. Or even reinstall Ubuntu and then restore your data from a backup.

It might be possible that your system will still boot & run after deleting /var, but since you're having problems now...


Messed up Desktop and animations by installing script from GitHub (Kubuntu)

cd  to the build directory and try sudo make uninstall. Many well-behaved makefiles have an uninstall target.
OR
Install the checkinstall package, and redo your make install under control of installwatch.
OR
Restore from backup. You should have backups.


Ubuntu GUI crash when LightDM enters, unable to login

This error is usually located in the graphics's driver.
As you said : " however ubuntu 10.04 and 12.04 run fine in a live CD " I assume that something went wrong with your currently installed (additional) driver.

I will not include every possible solution here (from different graphic cards and drivers).

A suggestion would be to reinstall the driver from recovery mode. Also would be good to try to repair any broken package through the same procedure (recovery mode).

Following is an example for Nvidia additional driver. (nvidia-current)

1) Boot as usually but in grub menu select the recovery mode . (If you have no grub menu, hold down [Shift] key during boot until grub menu loaded)

2) At the opened window select "Network" so the network connection established.
Also this option will make the system Read-Write (and not only read)

3) Next choose "Dpkg - Repair Broken Packages"

4) Next you select ROOT

and you can reinstall nvidia drivers (bellow command depends on what drivers you had install previously)

For nvidia-current

apt-get install --reinstall nvidia-current

note here that you don't need sudo cuz you are already connected as root.

At the end you can select "resume" and see if your problem fixed.

Good Luck


How to modify initrd initial ramdisk of Ubuntu 18.10 Cosmic Cuttlefish

I figure out the initrd of Ubuntu 18.10 is archived in a different way from the previous releases. In the previous releases the initrd is usually a lzma (or gzip for much earlier releases) compressed cpio archive. The initrd of 18.10 is an archive composed of several binary files in different formats.

To dive into the archive, you may need binwalk (or other similar tools. You could get binwalk by sudo apt install binwalk). Once you get binwalk, issue the command binwalk initrd:

$ binwalk initrd

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             ASCII cpio archive (SVR4 with no CRC), file name: ".", file name length: "0x00000002", file size: "0x00000000"
112           0x70            ASCII cpio archive (SVR4 with no CRC), file name: "kernel", file name length: "0x00000007", file size: "0x00000000"
232           0xE8            ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86", file name length: "0x0000000B", file size: "0x00000000"
356           0x164           ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86/microcode", file name length: "0x00000015", file size: "0x00000000"
488           0x1E8           ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86/microcode/AuthenticAMD.bin", file name length: "0x00000026", file size: "0x00006B2A"
28072         0x6DA8          ASCII cpio archive (SVR4 with no CRC), file name: "TRAILER!!!", file name length: "0x0000000B", file size: "0x00000000"
28672         0x7000          ASCII cpio archive (SVR4 with no CRC), file name: "kernel", file name length: "0x00000007", file size: "0x00000000"
28792         0x7078          ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86", file name length: "0x0000000B", file size: "0x00000000"
28916         0x70F4          ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86/microcode", file name length: "0x00000015", file size: "0x00000000"
29048         0x7178          ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86/microcode/.enuineIntel.align.0123456789abc", file name length: "0x00000036", file size: "0x00000000"
29212         0x721C          ASCII cpio archive (SVR4 with no CRC), file name: "kernel/x86/microcode/GenuineIntel.bin", file name length: "0x00000026", file size: "0x00180C00"
1605296       0x187EB0        ASCII cpio archive (SVR4 with no CRC), file name: "TRAILER!!!", file name length: "0x0000000B", file size: "0x00000000"
1605632       0x188000        LZMA compressed data, properties: 0x5D, dictionary size: 8388608 bytes, uncompressed size: -1 bytes

You could see there are two microcode binary files and a LZMA compressed data file. The latter is what we want: the lzma compressed initrd.

Let's get the lzma compressed initrd by

  dd if=initrd bs=1605632 skip=1 | unlzma -c | cpio -id

You will get the expected files mentioned in the questions. Edit the files you want to change. Use the following commands to repack the binary files:

  find | cpio -H newc -o | lzma -c > initrd.partial.lz

And finally concatenate the microcode files and your new initrd (initrd.partial.lz) by

dd if=initrd of=initrd.microcode bs=512 count=3136
cat initrd.microcode initrd.partial.lz > initrd.new

Now rename initrd.new to be initrd and put it back to casper/initrd. You could boot your live system with your new initrd.

My answer is inspired by this post https://unix.stackexchange.com/questions/163346/why-is-it-that-my-initrd-only-has-one-directory-namely-kernel


Mouse - System settings (GUI) changes not taking effect on Ubuntu 18.04 with KDE Plasma Enviroment

ANSWER:

Make sure you do it in the following order or you will be left with no input software - basically you need to apt-get install xserver-xorg-input-evdev package then apt-get remove the xserver-xorg-input-libinput package. Restart and you will have sensitivity and acceleration functionality again.

If touchpad is not working afterwords:

sudo apt install xserver-xorg-input-synaptics

and reboot.

https://forum.kde.org/viewtopic.php?f=66&t=153890


Cannot Load Ubuntu 20.04 alongside Windows 10

You could check if your efi boot partition is correctly installed. I had a similar problem some time ago.
Check out this answer it might help:
https://askubuntu.com/a/831241/634093


My VLC and Parole media players cannot play a video due to missing video/x-gst-fourcc-av01 decoder?

I had the same problem and I couldn't find what is needed to play in any music player. A simple solution would be to play the video through Google Chrome or Firefox. To play through browsers just drag the file into them. If you want, you can also access the files on your computer by placing file:///home/user/directory directly in the browser URL.
Olá amigo, tive o mesmo problema e não consegui encontrar o que é necessário pra reproduzir em qualquer reprodutor de música. Uma solução simples seria reproduzir o vídeo pelo Google Chrome ou Firefox. Pra reproduzir pelo navegadores basta arrastar o arquivo para dentro deles. Se você for quiser também dá pra acessar os arquivos do seu computador colocando file:///home/user/diretório diretamente na URL do navegador.


How can I get the geometry option working with the gnome-terminal command in a terminal?

On Wayland there's no way a client (e.g. gnome-terminal) could request or in any way influence the position where it appears on the screen. This is by design.

You can work it around by forcing gnome-terminal to run via the XWayland compatibility layer, that is, effectively making it an X11 application instead of a native Wayland one. You can do so by starting up GDK_BACKEND=x11 /usr/lib/gnome-terminal/gnome-terminal-server first, and then a gnome-terminal --geometry ... within ten seconds. Or you might want to entirely switch back to X11.


How to remove ugly frames when copiyng to Libreoffice from browser?

That's it. It turned out that ugly frames are just OLE Objects. Yet more often nonselectable in editor text area, they can be found in Navigator and manipulated with.

Select it with the Navigator (F5, or View > Navigator > OLE Objects). It will open a list of all the OLE objects, then you may click on the one you want to select.

Then double click to select some ObjectXXXX there,

it will get selected as green angles appear at it's borders.

press Right mouse Button > OLE Object > Delete.

And it's gone!

Notice little green borders:

I'm almost there with macro to remove them! And gonna publish it. Stay tuned)


When I use Super+Prt Scr I get a transparent file

According this Debian bug report, this bug shows up when NVidia driver v304 is installed. Upgrading to a higher version ought to solve it. The bug report states that v319 is known to fix it, at least. On Arch Linux, I have v340 installed and the bug hasn't shown up.


From the Wine FAQ:

  Can I install more than one Wine version on my system?

  Yes, but you will have to build Wine yourself (see How to compile Wine from source), as it is not possible to have multiple distro packages installed. The easiest way to do this is to run Wine from the build directory (don't do make install). If you want to actually install multiple versions, use --prefix when building Wine to designate a different install directory for each version, e.g.

./configure prefix=/path/to/install/directory && make

  then install it with

sudo make install

  On Linux, even this step is not enough: you must also set environment variables so that the wine executable on your $PATH finds the right shared libraries. Assuming that /path/to/install/directory is $W, then for Wine version 1.4, the following settings appear to be sufficient:

export WINEVERPATH=$W
export PATH=$W/bin:$PATH
export WINESERVER=$W/bin/wineserver
export WINELOADER=$W/bin/wine
export WINEDLLPATH=$W/lib/wine/fakedlls
export LD_LIBRARY_PATH="$W/lib:$LD_LIBRARY_PATH"

  The LD_LIBRARY_PATH is definitely required.

  Note that regardless of whether you install multiple versions or run them from the build directory, you will still have to designate which version of Wine you wish to use when running applications. It is also recommended that applications being run with different Wine versions be installed into separate wineprefixes.


ubuntu doest not boot after installation of window 8

The Boot-Repair utility should be your best best to fix this issue.

To use it, you can either:

download and boot on a Boot-Repair-Disk-64bit
or boot on a Ubuntu-64bit disk, then install Boot-Repair in it


NLTK, installed in python 2.7 but not working in python 3.4

Python 2 and Python 3 have different sets of installed packages.

I just installed nltk on both and am able to import in both.

pip2 install nltk
pip3 install nltk


Remove all system function with sed command

This could get complicated but all your examples show one command per line with the system command starting at the beginning of the line.  In that case, it is relatively simple.  Here are three methods:

Using grep:

$ grep -v '^system(' file.cpp
int a;
cin>>a;

The regex ^system( matches lines that begin with system(.  The -v option tells grep to remove the lines that match.

Using sed:

$ sed '/^system(/d' file.cpp
int a;
cin>>a;

The d command tells sed to delete any line that matches the regex ^system(.

Using awk:

$ awk '!/^system\(/' file.cpp
int a;
cin>>a;

In awk, ! is negation and !/^system\(/ prints any line that does not match the regex ^system\(.  (Unlike for the default forms of grep and sed, ( is a regex-active in awk and we must escape it with a backslash in order to match an actual (.)


Why are there multiple loop devices for the same snap?

In speaking with Ubuntu developers, the current default is to keep three prior versions of a snap so that you can roll-back to a prior version if needed. This default setting is not configurable.

You can use the command snap remove --revision=<an old one> snapname to remove an older revision of a snap.

They are considering whether to have only the current snap mounted as a loop filesystem, but I don't know the status of that.


Login Screen

From the Kubuntu 12.10 the default login manager has been the LightDM: http://www.kubuntu.org/news/12.10-release.  KDE System settings > Login Screen(LightDM)

KDM

The KDE login manager can be installed to the Kubuntu. The package is kdm.

  :~$ apt-cache show kdm

  Package: kdm

  Priority: optional

  Section: universe/kde

  ...

  Description: KDE Display Manager for X11

  KDM manages
  a collection of X servers running on local or remote machines.  It
  allows users to easily log into their preferred desktop environment,
  connect  to a remote XDMCP server, or shut down the system.  .  KDM
  supports custom themes and can display a list of users with icons.
  Additional user icons can be found in the 'kdepasswd' package.  .
  This package is part of the KDE base workspace module.

  Homepage: http://www.kde.org/

After the installation the KDM themes can be installed from the KDE System settings > Login Screen - Theme tab - 'Get New Themes' or 'Install new theme'.

The KDM control module can be started with the command:

kdesudo kcmshell4 kdm

:~$ kcmshell4 --help
Usage: kcmshell4 [Qt-options] [KDE-options] [options] module

A tool to start single KDE control modules

Generic options:
  --help                    Show help about options
  --help-qt                 Show Qt specific options
  --help-kde                Show KDE specific options
  --help-all                Show all options
  --author                  Show author information
  -v, --version             Show version information
  --license                 Show license information
  --                        End of options

Options:
  --list                    List all possible modules

Arguments:
  module                    Configuration module to open
  --lang <language>         Specify a particular language
  --silent                  Do not display main window
  --args <arguments>        Arguments for the module

This is a workaround for the KDE bug: https://bugs.kde.org/show_bug.cgi?id=255453


Sound not working with Ubuntu 12.10 clean install

I fixed it by running alsamixer, and changing AUTO-MUTE MODE from ENABLE to DISABLE.


Apache requires permissions to all the directories all the way up to the root of the file system where the site is hosted.

/home is not owned by your user but by root.
changing /home permissions from root:root to USER:USER will break your system.

So no: It is NOT a good idea to set /home/USER/www/ for apache. Please use the default /var/www/. All you need is a SYMLINK from /var/www/ to /home/USER/wwww/.

Your .conf is missing parts. I am missing the <Directory "/directory/documentroot"> tag and the Require all granted.


How do I install Ubuntu on multiple computers (something like Ghost) in a easy way?

You can use Clonezilla. The Free and Open Source Software for
  Disk Imaging and Cloning.  Clonezilla is a free software disaster
  recovery, disk cloning and deployment solution. Allows a user to clone
  an individual machine or many computers simultaneously.  Click
  Download.  to get it.1

Another option is g4u - Harddisk Image Cloning for PCs

  g4u ("ghosting for unix") is a NetBSD-based bootfloppy/CD-ROM that
  allows easy cloning of PC harddisks to deploy a common setup on a
  number of PCs using FTP. The floppy/CD offers two functions. The first
  is to upload the compressed image of a local harddisk to a FTP server,
  the other is to restore that image via FTP, uncompress it and write it
  back to disk. Network configuration is fetched via DHCP. As the
  harddisk is processed as an image, any filesystem and operating system
  can be deployed using g4u. Easy cloning of local disks as well as
  partitions is also supported.2

1Source:Clonezilla

2Source:g4u


how to install android studio in ubuntu 16.04?

To install android-studio open the terminal and run the following commands:

sudo add-apt-repository -y ppa:webupd8team/java
sudo add-apt-repository -y ppa:paolorotolo/android-studio
sudo apt-get update
sudo apt-get install oracle-java7-installer oracle-java7-set-default
sudo apt-get install android-studio

Also you can install android-studio following this tuto:

git clone https://github.com/ubuntu/ubuntu-make
cd ubuntu-make
bin/umake android


Run the following command to find the keycode value of the desired key:

xev

With the small box in foreground, press the key and note the keycode value.
Then run this:

xmodmap -e 'keycode number = NoSymbol'

That should disable the key. To make it permanent, put this command in the System, Preferences, Sessions, Startup Programs folder, Add.


xset dpms force off

You can look at man xset for more details. You can also set dpms to standby and suspend, but I think how this works depends on your hardware.


MySQL installation on Ubuntu 16.4: no root password prompt and no `mysql` folders created

The following commands worked for me to uninstall and reinstall MySQL (in this order, although I don't know if some of these commands are surplus):

sudo apt-get install mysql-client
sudo apt-get install mysql-server
sudo apt-get purge dbconfig-mysql
sudo apt-get purge mysql-common
sudo apt-get install mysql-server
sudo apt-get install mysql-client


How to make a new window open in the same workspace where I opened it?

Note: I don't know if the behaviour in workspace assignment described by you is possible. However, I see a chance that a common workaround might be almost as convenient for you.

Is it reasonable to assume that not all of the applications you use regularly take so long to start up that you feel like switching the workspace in the meantime, and that it is actually just the usual resource-hungry giants like Firefox, Eclipse, LibreOffice and similar? If so, it might be as satisfying to just add general assignments to specific workspaces for those applications.

Since Unity is a Compiz plugin, this can be done within the Compiz window management configurations (provided by package compizconfig-settings-manager)as described here, here or, more verbosely, here:

use your Dash to run ccsm (Compiz settings GUI)
Open Window Management > Place Windows > Fixed Window Placement
Create a New entry at Windows with fixed viewport
In the editing dialog, select the window class by clicking on the +-button first, and on the  desired application window afterwards
Specify the workspace to place said application on using Viewport coordinates

If that doesn't work for some reason, you might want to try another window matching tool like Devilspie.


How do I share a secondary internal drive?

You can try Samba. Please look at:
what is samba

and how to use it


USB Mouse stops working after NVIDIA proprietary driver installation

Install the input driver package :

sudo apt-get install xserver-xorg-input-mouse


In 12.10 I used thunderbird initially, but then moved to evolution as I found the GUI much more productively designed, esp as I use OUtlook at work.

There is the evolution-ews package which allows you using the Exchange web services (EWS) directly to help you better integrate the client with the server. BUt I was unable to set it up correctly with Exchange 365 server I use. It may be possible to do so as I didn't have much time to research back then. But then the IMAP+ services worked well for the emails.


After upgrade from 11.04 to 12.04 my laptop does not turn on without the power supply

This could be one of several things:

Dead charger
Dead battery
Dead charging circuits within the laptop

Do you have another charger to test with? Does the battery itself have a charging indicator (a number of the Dell batteries have this)?


You can have a look at http://www.xrdp.org/. You can remotely log into your ubuntu machine if you have xrdp installed on it.

You can install it with

sudo apt-get install xrdp


gtk-warning ** locale not supported by c library

You got a warning, not an error. But does the program work?
I notice that you show the same command twice:  $ sudo locale -a but
with different output. Umm, I suppose that is a wrong copy/paste action.
More important, at least I think it could be important, is the empty variable

  LANGUAGE=

In your system I would have expected it to be: LANGUAGE=it_IT. If that does not help, you could try to change your locales to en_US and if the warnings.
On the UT website I see they have a community/forum. I suggest you post your question there also. Good luck.


123.SOGOU.COM - trojan horse in ukui-screensaver

I just installed Ubuntu 17.10. Screensaver was not going on, then I went to Software Center and installed the first screensaver I got in search result. It led to set Firefox's default page as 123.sogou.com. I didn't imagine it was due to the screensaver util I read the post http://www.gabrielemerli.com/?p=3381. I tried to remove Firefox and all config files and cache, still dammed sogou was there. After reading the post from Gabriele, I remove the screensaver ukui-screensaver and also ubuntukylin-default-settings. Here is what I did to restore Firefox defaults.

$ sudo apt-get remove ukui-screensaver
$ sudo apt-get remove ubuntukylin-default-settings
$ sudo apt-get remove firefox
$ rm -rf ~/.config/mozilla
$ rm -rf ~/.cache/mozilla
$ sudo rm /etc/apt/sources.list.d/ubuntukylin.list
$ sudo rm /etc/apt/sources.list.d/ubuntukylin.list.save
$ sudo apt autoremove
$ sudo apt-get autoclean
$ sudo apt update
$ sudo apt-get install firefox


Shane,

Look into a program called "rEFIt"
it changes the boot loader. It's not the best IMO, but it should help you get the job done

Regards


How can I backup packages from an install I can't currently boot

you might try to chroot into the old partition to do this, but i'm not sure this will work

maybe an easier solution is to just copy the downloaded packages from the old installation to a temporary location (eg. using a live image) by doing something like this:

  cp -r /mnt/var/cache/apt/archives /temporary_backup_location

and after your new installation is done, you can copy the packages in your new /mnt/var/cache/apt/archives folder

hope this helps


Gparted merge unallocated space with /dev/sda7

Thank you for the screen shot.

There is no way you can directly merge the free space with sda7. You first need to merge it with sda6, shrink that and then merge it with sda7. The unallocated space needs to be adjacent to sda7 in order to merge them together.


How to make natural scrolling work in all applications

I looks like GTK was using a different input for mouse. See this blog post for a detailed description.

I had to use xinput set-prop:

xinput set-prop 11 278 -1, -1, -1


Unblocking bluetooth using rfkill command solved this issue for me

First block bluetooth completely :
rfkill block bluetooth

Then unblock it : rfkill unblock bluetooth

Note: If you don't have rfkill package installed in your system, then install it using sudo apt install rfkill.


Error when mounting a NAS drive on Ubuntu Server 11.10

A post at the readynas.com forums led me to the answer to my own question (eventually!). Basically, ReadyNAS creates a user, starting at UID=1000 and with nogroup, for each share that you create. It never really tells you its doing this, but it does.

You can see/edit these using their FrontView web application, under Security > Account.  For me, I simply used the following entry in FSTAB

//ReadyNAS/media /mnt/ReadyNAS/media -o user=media,password=,uid=1000,nogroup,ro,noserverino,iocharset=utf8 0 0

Note that the ReadyNAS CIFS implementation does not support server-side inode numbers, so to avoid a bunch of warning messages, be sure to include the noserverino option.

Also, this is a read-only mount to access a media library, so I didn't use password protection. If I was using a password, I would substitute a credentials file and use the credentials= option instead of user/password.

Hope this helps!


How can I fix samba mounting after upgrading from 14.04 to 16.04?

Hopefully someone could come up with a better solution, but in the end I had to just go with reinstalling the OS. I ended up going with Mint instead though, which for some reason handled my Mac Mini's graphics card better too. I'll leave this question here in case someone comes up with some alternative answers for others in a similar boat in the future.


Is there any "personalized magazine"-style application?

I am looking for Zite on Ubuntu myself. And have failed so far to find something.

However, there are some news aggregators outthere that have nice little web-functionality which can easlily be used with your browser. It's not quite the zite experience but similarily helpful

E.g.
Tweeted Times: http://tweetedtimes.com/#!/cvhhh
or
http://paper.li


I can install Ubuntu for Samsung Galaxy Mega 6.3?

The official list of supported devices is available at:

https://wiki.ubuntu.com/Touch/Devices

Galaxy Mega 6.3 is unfortunately not in the list.


why does update-rc.d not accept my init script

How do I get this fixed?

Throw it away entirely.  You don't need it in any form.

Then stop trying to use an rc system that has been twice superseded on Ubuntu, too.  You don't need update-rc.d here, either.

It is now 2016, and the first rule for migrating to systemd applies.  Someone has already done it.  In this particular case, Michael Nikitochkin did it a year ago, amongst others (such as Jeroen Doggen, Efstathios Iosifidis, and some nameless people):

[Unit]
Description=NOIP Dynamic IP
Documentation=https://askubuntu.com/a/835318/43344

[Service]
ExecStart=/usr/local/bin/noip2

[Install]
WantedBy=multi-user.target

Further reading

https://askubuntu.com/a/626858/43344
https://askubuntu.com/a/834323/43344
https://askubuntu.com/a/617822/43344


Cannot shut down from KDE workspace after upgrade to Saucy

My system was presenting exactly the same symptoms after the upgrade to saucy baulked halfway through at tex-common and some other packages, leaving me with a crippled laptop. Via chroot I reconfigured the policy packages as explained in your other thread
dpkg-reconfigure policykit-1 policykit-desktop-privileges consolekit polkit-kde-1. I also finished off the upgrade with apt-get update && apt-get upgrade.

That probably helped, but still didn't give me a working network connection. What finally worked for me was pam-auth-update --force as explained here. So it looks like it was something "fundamentally broken with permissions".


The following attempts to address the syntax errors specifically. There may be other issues that make it fail to work the way you expect: for example, the line

if [ -f $processo ]

tests whether a regular file exisits whose name is given by the contents of the processo variable - however processo appears likely to contain a numeric process ID (PID). Perhaps what the author intended was

if [ -n "$processo" ]

to test whether the variable is non-empty or (more likely, given the context)

if [ -z "$processo" ]

to test whether it is empty.

When you corrected the HTML formating of the downloaded script it looks like you replaced at least some of the smart quotes with the "wrong" ASCII characters - in particular

processo="'netstat -nlp | grep 0.0.0.0:"$porta" | sed -n 1p | awk '{print $7}' | cut -f1 -d "/"'";

and

  pid="'netstat -nlp | grep '0.0.0.0:'"$porta"'.*saprouter' | sed -n 1p | awk '{print $7}' | cut -f1 -d "/" '";

should have "backticks" (for command substitution) instead of regular straight single quotes

processo="`netstat -nlp | grep 0.0.0.0:"$porta" | sed -n 1p | awk '{print $7}' | cut -f1 -d "/"`";

  pid="`netstat -nlp | grep '0.0.0.0:'"$porta"'.*saprouter' | sed -n 1p | awk '{print $7}' | cut -f1 -d "/" `";

Better yet, change them to the more modern $(...) construct:

processo="$(netstat -nlp | grep 0.0.0.0:"$porta" | sed -n 1p | awk '{print $7}' | cut -f1 -d "/")";

  pid="$(netstat -nlp | grep '0.0.0.0:'"$porta"'.*saprouter' | sed -n 1p | awk '{print $7}' | cut -f1 -d "/" )";


With sed, you could do:

$ sed -nr '/^[^@]+@[^.]+\.com\s*$/p' file
tsar@gmail.com
cm_@hotmail.com

The regex looks for one or more non-@ characters at the beginning of the line, then a @, then one or more non-. characters followed by .com and then 0 or more whitespace.

Other choices:

Perl

perl -ne 'print if /^[^@]+@[^.]+\.com\s*$/' file

GNU grep

grep -P '^[^@]+@[^.]+\.com\s*$' file

POSIX grep

grep -E '^[^@]+@[^.]+\.com\s*$' file

awk

awk '$0~/^[^@]+@[^.]+\.com\s*$/' file


How can I correct punctuation when I am typing?

This sounds like you have the wrong keyboard-layout.

You can change that by running

sudo dpkg-reconfigure keyboard-configuration

in a terminal. Then you can just follow the instructions on the screen.


How to install MySQL in Ubuntu Minimal 12.04

have you tried this

 sudo apt-get update --fix-missing
 sudo apt-get build-dep mysql-client5.5 mysql-server5.5
 sudo apt-get -f install

Try that and let me know how it foes for you..


Sound cracking/distortion in Ubuntu 20.04 installed on VB in windows 7

I was experiencing the same issue and (apparently) managed to solve it thanks to this other question in this same forum.

Basically:

I closed the web browser (and any other application that emits sound)
I opened the Terminal and typed killall pulseaudio.

Been listening to a 3 hour ambient music video on Youtube and so far I heard no cracking.


Which OS version you are using, here answer in reference for 12.04 which I am using,

click on setting icon on right-upper corner of screen
Select System setting,
Select Appearance Icon
Select Behavior tab, under behavior tab SWITCH-OFF the Autohide Launcher option

For More reference see How can I configure Unity's launcher auto-hide behavior?


How to resolve freeze on keyring after upgrading Ubuntu 17.10 to 18.04?

I noticed that I could still use my terminal before the keyring notification came up and also use sudo with password.

As a workaround I hence changed my password to a very short one, e.g. f:

 sudo passwd MY_USER

Then I could enter my password on time for the keyring unlocking, restoring my system to a useable state.

I also switched from gdm3 to lightdm as I would get login freezes.


You need to just use aac instead.

ffmpeg -i demo.mpg -acodec aac -strict experimental demo.mp4


Chrome menus too slow after enabling fractional scaling in Ubuntu 20.04

I meet the same problem. One possible solution for me is to disable the hardware acceleration of Chrome:

Toggle off: Settings -> System -> "Use hardware acceleration when available"
Relaunch Chrome.

Tested and works on Ubuntu 20.04 and Chrome Version 86.0.4240.111.


Custom build 64 bit kernel do not run 32 bit apps

It's likely that you've left out a kernel configuration option to enable support for 32-bit binaries. Do you have CONFIG_IA32_EMULATION defined in your custom kernel?

If not, enable it through the make menuconfig interface, and rebuild.


How do I get the Lenovo "Fn Lock" light to work under Ubuntu?

I just found the "problem" Pressing Fn+Esc doesn't turn on/off the Fnlock light anymore. I had to go to Lenovo Vantage software: "Input & Accessories" , "Keyboard". then there a could change de light status to on/off...


How to add a keyboard modifier state applet to Unity panel?

This is an outstanding issue in Unity:

lp#773078 Should display the StickyKeys status in some way (a11y)
lp#1306584 No keyboard state applet in Unity (Thanks to @dotancohen)

The code below has been updated, now it can use icons to show state. But it may get slow sometime as I has to update icon file on hard drive then reload it again. (See notes about this issue/limitation in libappindicator)

A well packaged release was made available on webupd8 ppa (Thanks goes to Alin Andrei /Andrew/)

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

Reference: Keyboard Modifiers State indicator For Ubuntu: Xkbmod Indicator

Original Answer:

This is not attended to be a canonical answer to the question. It could be counted as a work around. Hopping someone writes sophisticated solution for it.

This a simple prototype keyboard modifiers indicator for Unity.

Image starting from left: Icon, Shift, Locked Caps, Ctrl, Alt, Super, Locked AltGr
(Small circle to indicate locked state)

Source file unity-xkbmod.c:

/*
 * unity-xkbmod.c
 *
 * Copyright 2014 Sneetsher <sneetsher@localhost>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
 * MA 02110-1301, USA.
 *
 *
 */

#include <string.h>

#include <X11/XKBlib.h>

#include <glib/gprintf.h>
#include <gtk/gtk.h>
#include <libappindicator/app-indicator.h>

//callback data structure
typedef struct _AppData {
  Display *_display;
  int *_deviceId;
  AppIndicator *indicator;
} AppData;

//menu ui
static GtkActionEntry entries[] = {
  { "Quit",     "application-exit", "_Quit", "<control>Q",
    "Exit the application", G_CALLBACK (gtk_main_quit) },
};

static guint n_entries = G_N_ELEMENTS (entries);

static const gchar *ui_info =
"<ui>"
"  <popup name='IndicatorPopup'>"
"    <menuitem action='Quit' />"
"  </popup>"
"</ui>";

//callback function, get xkb state, update indicator label (icon have limitation)
static gboolean update_xkb_state (gpointer data)
{
  //get xkb state
  XkbStateRec xkbState;
  XkbGetState(((AppData*) data)->_display, *(((AppData*) data)->_deviceId), &xkbState);

  //construct label
  GString *label = g_string_new("");

  register int i;
  unsigned bit;

  //loop taken from xkbwatch source
  for (i = XkbNumModifiers - 1, bit = 0x80; i >= 0; i--, bit >>= 1)
  {
    //printf("base%d %s  ", i, (xkbState.base_mods & bit) ? "on " : "off");
    //printf("latched%d %s  ", i, (xkbState.latched_mods & bit) ? "on " : "off");
    //printf("locked%d %s  ", i, (xkbState.locked_mods & bit) ? "on " : "off");
    //printf("effective%d %s  ", i, (xkbState.mods & bit) ? "on " : "off");
    //printf("compat%d %s\n", i, (xkbState.compat_state & bit) ? "on " : "off");

    //todo: change constant with xkb modifier constant (defined in the headers)
    // show effective modifier stat
    switch (i)
    {
      case 7:
        g_string_prepend (label,  ((xkbState.mods & bit) ? "⎇" : ""));
        break;
      case 6:
        g_string_prepend (label,  ((xkbState.mods & bit) ? "⌘" : ""));
        break;
      case 5:
        g_string_prepend (label,  ((xkbState.mods & bit) ? "5" : ""));
        break;
      case 4:
        g_string_prepend (label,  ((xkbState.mods & bit) ? "①" : ""));
        break;
      case 3:
        g_string_prepend (label,  ((xkbState.mods & bit) ? "⌥" : ""));
        break;
      case 2:
        g_string_prepend (label,  ((xkbState.mods & bit) ? "⋀" : ""));
        break;
      case 1:
        g_string_prepend (label,  ((xkbState.mods & bit) ? "⇬" : ""));
        break;
      case 0:
        g_string_prepend (label,  ((xkbState.mods & bit) ? "⇧" : ""));
        break;
      default:
        break;
    };

    // show if modifier is locked
    g_string_prepend (label,  ((xkbState.locked_mods & bit) ? " ˳" : " "));
  }

  //g_string_prepend (label,  "");
  app_indicator_set_label (((AppData*) data)->indicator, label->str, NULL);

  //g_free(label);
  return TRUE;
}

int main (int argc, char **argv)
{
  AppData appdata;
  Display *_display;
  int _deviceId;

  char* displayName = strdup("");
  int eventCode;
  int errorReturn;
  int major = XkbMajorVersion;
  int minor = XkbMinorVersion;;
  int reasonReturn;

  AppIndicator *indicator;
  GtkWidget *indicator_menu;
  GtkUIManager *uim;
  GtkActionGroup *action_group;
  GError *error = NULL;

  gtk_init (&argc, &argv);

  XkbIgnoreExtension(False);

  g_printf("Xkb client lib ver: %d.%d\n" , major , minor );
  _display = XkbOpenDisplay(displayName, &eventCode, &errorReturn,
                            &major, &minor, &reasonReturn);
  g_printf("Xkb server lib ver: %d.%d\n" , major , minor );

  if (reasonReturn != XkbOD_Success)
  {
    g_printf("Unable to open display!\n");
    return 1;
  }

  XkbDescRec* kbdDescPtr = XkbAllocKeyboard();
  if (kbdDescPtr == NULL)
  {
    g_printf ("Failed to get keyboard description.\n");
    return 2;
  }
  kbdDescPtr->dpy = _display;
  _deviceId = kbdDescPtr->device_spec;

  /*
  //no need for event listener, used gtk_timeout timer
  XkbSelectEventDetails(_display, XkbUseCoreKbd, XkbStateNotify,
                     XkbAllStateComponentsMask, XkbGroupStateMask);
  */

  action_group = gtk_action_group_new ("AppActions");
  gtk_action_group_add_actions (action_group, entries, n_entries, NULL);

  indicator = app_indicator_new_with_path (
                                        "Simple XKB Modifier Indicator",
                                        "icon",
                                        APP_INDICATOR_CATEGORY_HARDWARE,
                                        g_get_current_dir());

  uim = gtk_ui_manager_new ();
  gtk_ui_manager_insert_action_group (uim, action_group, 0);
  if (!gtk_ui_manager_add_ui_from_string (uim, ui_info, -1, &error))
  {
    g_printf ("Failed to build menus: %s\n", error->message);
    g_error_free (error);
    error = NULL;
    return 3;
  }

  indicator_menu = gtk_ui_manager_get_widget (uim, "/ui/IndicatorPopup");
  app_indicator_set_menu (indicator, GTK_MENU (indicator_menu));
  app_indicator_set_status (indicator, APP_INDICATOR_STATUS_ACTIVE);

  //app_indicator_set_label (indicator, " ⇧ ⋀ ⌥ ⎇  ⌘ ", NULL);
  //symbols: shift U21E7 ctrl U22C0 alt/altgr U2325 U2387  cmd U2318
  //from font: DejaVu Sans

  appdata._display = _display;
  appdata._deviceId = &_deviceId;
  appdata.indicator = indicator;
  gtk_timeout_add (120, (GtkFunction) update_xkb_state, &appdata);
  //nice for realtime tasks, to replace gtk_timeout
  //gtk_idle_add ((GtkFunction) idle_func, &appdata);

  gtk_main ();

  XCloseDisplay (_display);
  return 0;
}

Installing needed headers/libs: (Not sure if I miss any)

sudo apt-get install libx11-dev libappindicator-dev libgtk2.0-dev

Compiling:

gcc -Wall unity-xkbmod.c -o unity-xkbmod `pkg-config --cflags --libs appindicator-0.1` -lX11

Run:

./unity-xkbmod

Note:

libappindicator used for Unity indicators lack an important feature which make easy to ports other desktops indicators. See Bug #812067
API needed: pixbuf icon setting support

Without this feature, let's say we need (Shift, Ctrl, Alt, AltGr, Super) with sticky keys active; we have 3 main status for each (Off, On/Latched, Locked). So 3^5 combined icons should be generated. (Where normal case just 3x5 single icons)

That's why I used indicator label with symbols from DejaVu Sans font.
To put an icon, place it in same folder and name it icon.*. Accepted formats: png, svg, ico, xpm ...

If you don't like any icon, just create a 1x1 px image instead.

References:

The X Keyboard Extension
Application Panel Indicators
Source of xkbwatch & plasma-widget-kbstate


How to install latest Spotify testing version?

Do not forget that this is a testing version, you may encounter bugs that do not occur in the stable version !

Use the testing PPA of Spotify (source and release notes):

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys D2C19886
echo deb http://repository.spotify.com testing non-free | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt-get update
sudo apt-get install spotify-client

Note : This version includes the libgcrypt11 libraries which are missing in Ubuntu 15.04 & 15.10 and prevent Spotify to launch.


Ubuntu-Mate fails to boot on Raspberry-Pi 3 via USB

Here is the long thread of how I got this to work here:

www.raspberrypi.org/forums/

Summary answer of the thread(it should be noted that the only way I got this to work on a Windows PC was by having a virtual machine running Ubuntu 14.04 so I could copy and edit files):

A 2018-03-13-raspbian-stretch.img file to a USB stick(I did this via Win32DskImager.)
A ubuntu-mate-16.04.2-desktop-armhf-raspberry-pi.img to a USB stick(I did this via Win32DskImager.)

Using a Ubuntu 14.04 virtual machine mount both USB drives. You should see four disks: PI_BOOT, PI_ROOT, boot and rootfs.

Run the following commands for copying files(you will need to change the "john" portion of the path to match the location on your virtual machine):

sudo cp -r /media/john/rootfs/lib/modules/4.9.80+ /media/john/PI_ROOT/lib/modules/
sudo cp -r /media/john/rootfs/lib/modules/4.9.80-v7+ /media/john/PI_ROOT/lib/modules/
sudo cp /media/john/rootfs/lib/firmware/brcm/brcmfmac43455-sdio.txt /media/john/PI_ROOT/lib/firmware/brcm
sudo cp /media/john/rootfs/lib/firmware/brcm/brcmfmac43455-sdio.clm_blob /media/john/PI_ROOT/lib/firmware/brcm
sudo cp /media/john/rootfs/lib/firmware/brcm/brcmfmac43455-sdio.bin /media/john/PI_ROOT/lib/firmware/brcm

sudo cp /media/john/boot/bootcode.bin /media/john/PI_BOOT
sudo cp /media/john/boot/fixup.dat /media/john/PI_BOOT
sudo cp /media/john/boot/start.elf /media/john/PI_BOOT
sudo cp /media/john/boot/bcm2710-rpi-3-b-plus.dtb /media/john/PI_BOOT
sudo cp /media/john/boot/kernel.img /media/john/PI_BOOT
sudo cp /media/john/boot/kernel7.img /media/john/PI_BOOT

I'm not positive that these files are necessary...

sudo cp /media/john/boot/bcm2708-rpi-0-w.dtb /media/john/PI_BOOT
sudo cp /media/john/boot/bcm2708-rpi-b.dtb /media/john/PI_BOOT
sudo cp /media/john/boot/bcm2708-rpi-b-plus.dtb /media/john/PI_BOOT
sudo cp /media/john/boot/bcm2708-rpi-cm.dtb /media/john/PI_BOOT
sudo cp /media/john/boot/bcm2709-rpi-2-b.dtb /media/john/PI_BOOT
sudo cp /media/john/boot/bcm2710-rpi-3-b.dtb /media/john/PI_BOOT
sudo cp /media/john/boot/bcm2710-rpi-3-b-plus.dtb /media/john/PI_BOOT
sudo cp /media/john/boot/bcm2710-rpi-cm3.dtb /media/john/PI_BOOT

To edit the next files you need to be super user so launch gedit from the command line with

sudo gedit

From gedit change the /media/john/PI_BOOT/cmdline.txt file so that root=/dev/sda2

From gedit change the /media/john/PI_ROOT/etc/fstab file to:

proc /proc proc defaults 0 0
/dev/sda2 / ext4 defaults,noatime 0 1
/dev/sda1 /boot vfat defaults 0 2

Unmount the drives from the virtual machine and place the Ubuntu Mate USB in the Pi 3 and boot.


missing local hard driver after installing ubuntu over windows 10

unfortunately , I chose to install Ubuntu on thee whole disk instead of choosing what partition to be installed on , which caused the format of the whole disk before installation .


While in this answer, the question was on how to (re-) arrange application specific windows into a grid, the edited version below rearranges all "normal" windows into a grid:

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

#--- set your preferences below: padding between windows, margin(s)
cols = int(sys.argv[1]); rows = int(sys.argv[2]); padding = 10; left_margin = 70; top_margin = 30
#---

get = lambda cmd: subprocess.check_output(["/bin/bash", "-c", cmd]).decode("utf-8")
def get_res():
    xr = get("xrandr").split(); pos = xr.index("current")
    return [int(xr[pos+1]), int(xr[pos+3].replace(",", "") )]

def check_window(w_id):
    w_type = get("xprop -id "+w_id)
    if " _NET_WM_WINDOW_TYPE_NORMAL" in w_type:
        return True
    else:
        return False

# get resolution
res = get_res()
# define (calculate) the area to divide
area_h = res[0] - left_margin; area_v = res[1] - top_margin
# create a list of calculated coordinates
x_coords = [int(left_margin+area_h/cols*n) for n in range(cols)]
y_coords = [int(top_margin+area_v/rows*n) for n in range(rows)]
coords = sum([[(cx, cy) for cx in x_coords] for cy in y_coords], [])
# calculate the corresponding window size, given the padding, margins, columns and rows
w_size = [str(int(area_h/cols - padding)), str(int(area_v/rows - padding))]
# find windows of the application, identified by their pid
wlist = [w.split()[0] for w in get("wmctrl -lp").splitlines()]
w_list = [w for w in wlist if check_window(w) == True][:cols*rows]
print(w_list)

# remove possibly maximization, move the windows
for n, w in enumerate(w_list):
    data = (",").join([str(item) for item in coords[n]])+","+(",").join(w_size)
    cmd1 = "wmctrl -ir "+w+" -b remove,maximized_horz"
    cmd2 = "wmctrl -ir "+w+" -b remove,maximized_vert"
    cmd3 = "wmctrl -ir "+w+" -e 0,"+data
    for cmd in [cmd1, cmd2, cmd3]:
        subprocess.Popen(["/bin/bash", "-c", cmd])

How to use

Make sure wmctrl is installed:

sudo apt-get install wmctrl

Copy the script into an empty file, save it as rearrange_windows.py
In the head section of the script, set your prefered padding if you like:

#--- set your preferences below: padding between windows, margin(s)
cols = 3; rows = 2; padding = 10; left_margin = 70; top_margin = 30
#---

Due to some bugs in the use of (the combination of) Unity / wmctrl, I would leave left_margin = 70; top_margin = 30 as it is.
Run it by the command:

python3 /path/to/rearrange_windows.py <cols> <rows>

e.g. :

python3 /path/to/rearrange_windows.py 3 2

to set a grid of 3 collums / 2 rows of windows.

If all works as expected, add it to a shortcut key: Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

 python3 /path/to/rearrange_windows.py <cols> <rows>

If you'd like to use different grids (cols/rows), just create several shortcuts with different grids.

Note

If the number of windows exceeds the number of (possible) windows in the grid, the script grids the four "oldest" windows.

Examples

python3 /path/to/rearrange_windows.py 3 2

python3 /path/to/rearrange_windows.py 2 3


Ubuntu 12.10 won't display properly after kernel upgrade

Had the same problem after updating this morning.
Found a workaround what will useful at least for a short period.

Right-click and open screen-settings, then you will be able to select All-Settings and there select Software-Sources.

In this box select the tab Additional-Drivers.
Here you will be able to select different display drivers, for me the second one works fine.
Problem is... those are not the Nvidia drivers and will perform less, but at least it works.

Update: got new problems with VirtualBox combined with the OpenSource drivers.
Went back to Nvidia drivers and kernel 3.5.0-17 , thanks Brad your solution did work great.


No, it's not possible using standard mechanisms.
derobert in his answer on Unix.SE suggested the following workarounds:

'There are a couple approaches you could use instead:

Set up a (possibly local-only) DNS server. Some of these give a lot of flexibility, and you can definitely spread your host files over multiple files, or even machines. If you're trying to include the same list of hosts on a bunch of machines, then DNS is probably the right answer.

Set up some other name service (NIS, LDAP, etc.). Check the glibc NSS docs for what is supported. Personally, I think you should use DNS in most all cases.

Make yourself an /etc/hosts.d directory or similar, and write some scripts to concatenate them all together (most trivial: cat /etc/hosts.d/*.conf > /etc/hosts, though you'll probably want a little better to e.g., sort), and run that script at boot, or from cron, or manually whenever you update the files.


Ubuntu 12.10 Python 2 HOW TO SWITCH FROM 'C>' to '>>>' in Terminal

Python's interpreter prompt is the value of the system variable sys.ps1. So, to set it to >>>, do:

import sys
sys.ps1 = '>>> '

Just out of curiosity, how did you set it to C>?


Is the home directory modifed at all during an upgrade of Xubuntu?

As a result of upgrading, data inside users' home directories will not be modified.

However, as a result of modifications to individual pieces of software, some software may manipulate files in the user's home directory when that user runs that software for the first time after upgrading.  For example, something which stores its config in ~/.config/ or its cache in ~/.cache/ may modify the format of its configuration or cache after noticing that the previously generated files were from an older version.


How to get rid of purple background color in newt apps?

Took a while to figure out, turns out symlink for newt apps color palette has been changed:

http://cosmicb.no/2011/10/05/getting-rid-of-ubuntu-violet-colors/

$ ls -l /etc/alternatives/newt-palette
lrwxrwxrwx 1 root root 26 Dec 28  2014 /etc/alternatives/newt-palette -> /etc/newt/palette.ubuntu

To put it back :

$ sudo ln -sf /etc/newt/palette.original  /etc/alternatives/newt-palette


I have  felt exactly the same problem. If windows 8.1 (or any operating system along which you wish to run ubuntu) recovery is available, than try installing ubuntu as the only operating system for your  laptop.


14.04 is out maybe you should try upgrading to that. If that doesn't fix the problem i would do a fresh install of 14.04, there should be an option to keep all the files, programs and settings.


Can you use aptitude? Open up a terminal and type:

 sudo apt-get install eclipse

The .tar.gz files are source code. If you extract them, they will contain installation instructions.


What credentials should I use to access a Windows share?

The mount.cifs man page is pretty handy here. Under the Options section:

user=arg specifies the username to connect as. If this is not given, then the environment variable USER is used. This option can also take the form "user%password" or "workgroup/user" or "workgroup/user%password" to allow the password and workgroup to be specified as part of the username.

password=arg specifies the CIFS password. If this option is not given then the environment variable PASSWD is used. If the password is not specified directly or indirectly via an argument to mount, mount.cifs will prompt for a password, unless the guest option is specified.
Note that a password which contains the delimiter character (i.e. a comma ',') will fail to be parsed correctly on the command line. However, the same password defined in the PASSWD environment variable or via a credentials file (see below) or entered at the password prompt will be read correctly.

In short, the credentials Windows (or the Samba server if we're not talking about Windows) is expecting, not your local Ubuntu credentials.

On a sidebar, your paths in your fstab string look completely whack. I would suggest:
//192.168.1.2/share_name   /srv/z/
If you don't know what the share name is, use smbclient:
smbclient -I 192.168.1.2 -Uusername

And that should list the resources. It also lets you test which username you should be using.
And /srv/z/ needs to exist before you can mount something on it. If it doesn't exist, create it.


you must re install grub, the easiest way is to log into one of your linux systems, then mount your ubuntu partition lets say it is mounted at /media/ubuntu, then go to terminal and do:

sudo grub-install --boot-directory=/media/ubuntu sda

hope my syntax is correct ;)