Ubuntu 14.04.2 LTS stopped working on New Years Day!

To show terminal, press Ctrl+Alt+F1 and type

sudo -i
export DISPLAY=:0
dconf reset -f /org/compiz/
unity --reset-icons &disown
setsid unity
reboot

If this won't work, you may have Unity plugin disabled

apt-get install compizconfig-settings-manager
DISPLAY=:0 ccsm &

Now try to switch back to graphical interface pressing Ctrl+Alt+F7 (or F8) where the CompizConfig Settings Manager window will show. Find the Unity plugin and enable it. You will be asked 'Ubuntu Unity Plugin requires OpenGL plugin'. Enable Ubuntu Unity Plugin / Enable OpenGL. Now everything should work, or reboot.


How can I identify which device/keycode is being used?

After playing with this for a while and reading about it, I discovered that the G700 actually stores the button profile on the mouse, so clicking button 12 actually, literally sent the Ctrl+W shortcut. I used a Windows machine and Logitechs Gaming software to restore the buttons to their default status and then they started reporting "button 12" or whatever in xev.


Ubuntu 20.04, computer keeps shutting down when I close the lid, I've already checked logind.conf, settings are set to suspend

The # symbol at the beginning of the line means "ignore this line". Remove those # symbols to have the settings take effect.
Edit: It's recommended to leave the # symbol on lines that you don't care about, so if the defaults ever change, you'll get the new default for that setting.


There's a binary resourcemgr, nowhere to be documented, it is a part of a dependent package(libtss2-utils) of tpm2-tools. Found it here

we need to start the resourcemgr service before running the tpm2 commands

systemctl start tpm2-resourcemgr or /usr/sbin/resourcemgr &


Bash script to add/remove desktop launchers to Unity launcher?

Use gsettings:

gsettings get com.canonical.Unity.Launcher favorites

Gives you a list of what's on the launcher:

['nautilus-home.desktop', '/opt/google/chrome/google-chrome.desktop', 'apps.desktop', 'geany.desktop', 'libreoffice-startcenter.desktop', 'gnome-terminal.desktop', 'gcalctool.desktop', 'Science.desktop', 'gimp.desktop', 'inkscape.desktop', 'ubuntu-software-center.desktop', 'alarm-clock-applet.desktop']

so you can do something like this in bash:

#!/bin/bash
myfile='firefox.desktop'
list=`gsettings get com.canonical.Unity.Launcher favorites`
newlist=`echo $list | sed s/]/", '${myfile}']"/`
gsettings set com.canonical.Unity.Launcher favorites "$newlist"

I tested and it works to add firefox to the launcher, however the icon doesn't display immediately. You'll have to log out/in or do a unity --replace command.


Epson finally made an Utility for Linux to show ink levels and for printer maintenance.

You can download it from Epson Drivers Site.

Search for your printer model, select Linux as OS and download Epson Printer Utility.

You will need epson-printer-utility_1.0.0-1lsb3.2_i386.deb if your sistem is 32-bit, or epson-printer-utility_1.0.0-1lsb3.2_amd64.deb for a 64-bit system.

Download the file to your Home folder and run in terminal

sudo dpkg -i epson-printer-utility*.deb

The utility can be started from terminal by

epson-printer-utility


How control ubuntu as a speaker bluetooth

I found the solution myself.
Install blueZ and by below commands, you can control your phone (or any bluetooth device).
For example for the next music:
dbus-send --system --print-reply --dest=org.bluez /org/bluez/hci0/dev_11_22_33_44_55_66 org.bluez.MediaControl1.Next

find your device MAC Address and replace with 11_22_33_44_55_66
Note: D-feet can help you to see bluez data.
Finally you can Add custom shortcut keyboard in setting for run your commands.
enjoy.


Install Arduino IDE the latest version. On Ubuntu 16.04 the Arduino IDE version from repos is too old, doesn't have Board Manager.
Go to File > Preferences and paste this link on Additional Boards Manager URLs.
Go to Tools > Board > Boards Manager and from Type dropdown select Contributed.
Select and install ESP8266:


Deskbar-applet appears to be very specific to gnome and gnome-panel.

As an alternative try synapse

As you can see, it is invoked similarly via the XFCE panel or via a hotkey (defaults to CTRL+SPACE).  There are a number of default plugins which are similar in functionality as deskbar as well.

It uses the Zeitgeist backend - so it is similar to Unity - when you use a file or application it is automatically indexed for you to find again.


The issue here turned out to be

CHROMIUM_FLAGS="--incognito"

I had Chromium set to open up in incognito mode in /etc/chromium-browser/default as per these instructions. That stops the application from attaching to the current session. It produces this in STDERR..

/usr/bin/chromium-browser --profile-directory=Default --app-id=bikioccmkafdpakkkcpdbppfkghcmihk
Using PPAPI flash.
--incognito --ppapi-flash-path=/usr/lib/adobe-flashplugin/libpepflashplayer.so --ppapi-flash-version=

Created new window in existing browser session.

But no further errors. No window is created in my existing browser session.

Bug filed in Github issue tracker here


How to route all traffic through OpenVPN using Network Manager?

I don't known how to set this option in NM but you can add script in /etc/ppp/if-up.d/ to make default route to ppp0 interface every time when go up. Make script called script with execute permissions 755

sudo nano /etc/ppp/if-up.d/script

# Check for specific interface if desired
[ "$IFACE" != "ppp0" ] || exit 0
# Do something
sudo route add default dev ppp0

chmod 755 /etc/ppp/if-up.d/script

Try

Edit 1

If you have tun0 interface then place script in /etc/network/if-up.d/
and change interface name

sudo nano /etc/network/if-up.d/script

# Check for specific interface if desired
[ "$IFACE" != "tun0" ] || exit 0
# Do something
sudo route add default dev tun0

chmod 755 /etc/network/if-up.d/script


Re download the ISO and install all updates,

also do 64 bit instead if you have [AMD] or [intel equip that is newer than 2007].


Using shift + print screen only does a full pag screenshot not sure how to fix it

First try restarting your computer.
If it doesn't fix itself, then you can see the keyboard shortcuts in  Settings -> Keyboard -> Shortcuts and edit those.
Shortcut for taking screenshot of an area is listed under Screenshots

You can change it to your choice by clicking on it and then pressing your new "key action" and then clicking set.
Hope his fixes your issue.


I want to install 12.04 instead of 13.10, what should I do?

First backup all your datas to a partition other than ubuntu 13.10 partition.
Create a bootable ubuntu 12.04 live usb through unetbootin software.
Boot from the live usb and then run the ubuntu installer.During the installation process,select something else option which make you to choose on which partition you have to install ubuntu 12.04.
Select the partition where ubuntu 13.10 is installed,rightclick on it and then format it to ext4 filesystem.
Choose the same formatted partition to install ubuntu 12.04.Then install ubuntu on it.


Are there plans for a scope for Personal Information Management?

Today scope is mean to be "personal information manager". You can select  (in options)  displaying upcoming events (calendar), favorite contacts, upcoming tasks (notes) recent msg, calls and many more (etc).  It would not be fair to compare this to Thunderbird or Outlook yet, but it's so far ubuntu's best way of managing daily personal information.


Password manager does not trigger with Chromium when it should

You mix up two separate issues.

Gnome-keyring stores passwords for websites and other passwords, like ssh, gpg, etc.

The keyring is unlocked when you login into the system and does not require to enter master password again. That is normal behavior.

When you try to install some software, you need to have an administrator privileges. In Ubuntu you do not have to login as root, but sudo lets you execute a privileged task from a user account, but asks to enter a password again.

These two scenarios are not related. And this is not a problem at all.


Resizing Logical Group and Physical Volumes to use free space

I found the solution.

It's VERY dangerous and you might risk losing your data and/or making your system unbootable.

Still it worked for me without problems. Here is what I did:

I boot with live CD, opened gparted and allocated all remaining free disk to /dev/sda2. Then I also resized /dev/sda5 (this is the dangerous bit).
Since I had to move the partition to the left, I risked messing up my /boot. In my case it did not but if you face problems run Boot-Repair.
Allocate the remaining disk to the volume of your choice. In my case I did something like: pvresize /dev/mapper/sda5_crypt; lvextend -l +100%FREE /dev/ubuntu-vg/root; resize2fs /dev/ubuntu-vg/root


It seems that NTFS formatted drives do not support executable files. As stated here:

  Setting executable permission of any files at ntfs partition on Linux is almost impossible.

The solutions I've seen so far are very hacky and I wouldn't recommend them unless you know what you are doing.

An easy workaround would be to move the whole game files to an ext4 file system, for example, create a Games directory in your home directory, move the Doom3 BFG files there and make the executable files executable again:

$ chmod +x ~/Games/Doom3BFG/myExecutable

After that you should be able to run the file by double clicking it or run from command line with

$ ~/Games/Doom3BFG/myExecutable

If you prefer the more hacky way and want to run it only from your NTFS file system, you should read on the following threads:

Can't set permissions for files on an NTFS partition
Enable Setting Executable Permission of Files at NTFS Partition
How can I run an executable from a CD when it doesn't have the executable bit set?


xfce - Stop active window moving when switching workspace

This shouldn't happen if you move to the other workspace from the workspace switcher (top right usually). Make sure your window is not defined to appear always on the visible workspace (main window menu in upper left corner of the window title bar). (the right setting for what you want is "Appears only in this workspace").

See also if the window isn't fixed (appears on all workspaces). This is applied when you click on the small left icon (pin or cirle usually) on the window title bar next to the "main window menu" (with maximize ... close) in the corner. This button is not always there as it depends on themes and config.


How to add "open jdk7" to deffault open program list?

Here's the answer: How do I reenable opening jar files by double clicking on them?

Check that answer.
In short, you have to edit the file /usr/share/applications/defaults.list as root (sudo gedit /usr/share/applications/defaults.list, for example),
search for the two lines that start with application/x-jar and application/x-java-archive and change the .desktop values of those lines to openjdk-7-java.desktop, if you have openjdk-7 installed.


First, you should stop using the drive or partition.

Next, login from another partition, or from a live disk and have an extra flash drive handy to transfer the lost data to.

Finally, you can use photorec to recover different types of files. To install,run the following commands:

sudo apt-get update
sudo apt-get install testdisk

Then, run the following command to start photorec:

photorec

For more info on how to use, run:

man photorec

Note: use the USB to store recovered files to. Do not use the drive you are recovering from to store recovered files.

Other tools to look into (that I have not used):

ext4magic - recover deleted files from ext3 or ext4 partitions

autopsy - graphical interface to SleuthKit

scalpel - A Frugal, High Performance File Carver

sleuthkit - tools for forensics analysis on volume and filesystem data

For a complete list, run the following command:

apt-cache search forensics


Where I can store user files except /home

I assume your / partition is on SSD and /home partition is on HDD?
Then just create some new directory under /, for example /workdata and change ownership of that directory to your user account. Then you can keep anything you want in /workdata. For convenience, you may create a symbolic link to this directory within your /home directory.


Problem logging into default desktop environment

Reading the unity-gtk-module.log I noticed that there was a problem with initctl.

Due to following a "recover" manual I had renamed it, and it couldn't be found.

I restored the original name and now it is working again :)


As an alternative, What about VIM editor? It's the best editor I've used ever. It works with lot of code, JAVA, Perl, html, css, C, C++, Python, LaTex... etc lot of them. work fine.

sudo apt-get install vim


cannot upgrade Catfish file searching tool

Unless you're running 14.04 you won't be able to install python3-pexpect on previous releases as this package is only available as of 14.04.

But as it only depends on python3 you can manually install it on your system:

Download the corresponding deb file.
In the same folder where you downloaded the deb file, open a terminal an type:

sudo dpkg -i python3-pexpect_3.1-1_all.deb

Finally upgrade Catfish now that all its dependencies are satisfied.


After upgrade to Lubuntu 14.04 not able to run any command on command line or open a program!

Showing us the exact commands and the "few error messages" would help, but my guess is that by doing the sudo dpkg -r --force-depends libc6:i386 command:

  -r, --remove, -P, --purge package...|-a|--pending
              Remove  an  installed  package. -r or --remove remove everything
              except conffiles. This  may  avoid  having  to  reconfigure  the
              package if it is reinstalled later. (Conffiles are configuration
              files that are listed in the DEBIAN/conffiles control file).

   --force-things, --no-force-things, --refuse-things

          Force  or refuse (no-force and refuse mean the same thing) to do
          some  things.  things  is  a  comma  separated  list  of  things
          specified  below

     depends: Turn all dependency problems into warnings.

and, by ignoring "a few error messages" like:

dpkg: libc6:i386: dependency problems, but removing anyway as you requested:
 libxau6:i386 depends on libc6 (>= 2.4).
 libkrb5-3:i386 depends on libc6 (>= 2.16).
 libwrap0:i386 depends on libc6 (>= 2.11).
 libcupsimage2:i386 depends on libc6 (>= 2.4).
 libcap2:i386 depends on libc6 (>= 2.8).
 libxt6:i386 depends on libc6 (>= 2.7).
 libasyncns0:i386 depends on libc6 (>= 2.15).
 libglib2.0-0:i386 depends on libc6 (>= 2.17).
 libgphoto2-port0:i386 depends on libc6 (>= 2.15).
 libwebp5:i386 depends on libc6 (>= 2.4).
 libpcsclite1:i386 depends on libc6 (>= 2.15).
 libvisual-0.4-plugins:i386 depends on libc6 (>= 2.4).
 libstdc++5:i386 depends on libc6 (>= 2.3).
 libstdc++6:i386 depends on libc6 (>= 2.18).
 libmad0:i386 depends on libc6 (>= 2.4).
 gstreamer0.10-x:i386 depends on libc6 (>= 2.4).
 p11-kit-modules:i386 depends on libc6 (>= 2.16).
 libxcursor1:i386 depends on libc6 (>= 2.4).
 libqt4-xmlpatterns:i386 depends on libc6 (>= 2.4).
 libpixman-1-0:i386 depends on libc6 (>= 2.4).
 libpng12-0:i386 depends on libc6 (
 ...

You have managed to uninstall libc, the main runtime library, and EVERYTHING THAT DEPENDED ON IT.

Until you reinstall, your system is worse than a doorstop - it will eat up  infinite time and produce no results.


How to stream desktop and audio with ffmpeg in youtube

1. Choose audio

You can use pavucontrol to choose which audio source ffmpeg will record, such as "desktop" or microphone. This is explained in Capturing ONLY desktop audio with ffmpeg.

2. Encode

Now use ffmpeg to stream to YouTube:

ffmpeg -f x11grab -framerate 30 -video_size 1280x720 -i :0.0 -f pulse -i default -c:v libx264 -preset fast -cfr 26 -maxrate 2500k -bufsize 5000k -g 60 -vf format=yuv420p -c:a aac -b:a 128k -f flv rtmp://youtube

If your ffmpeg doesn't have --enable-libpulse, and therefore no pulse input device, you can try replacing -f pulse -i default with -f alsa -i pulse to use the ALSA input device instead.
Don't just copy and paste the example: you'll need to choose an appropriate -maxrate and -bufsize. See FFmpeg Wiki: Encoding for Streaming Sites for more info.


Did you run vlc-cache-gen -f /usr/lib/vlc/plugins in terminal?

Maybe sudo apt-get install --reinstall vlc will help.
As well assudo dpkg --configure -a.
You can also try sudo dpkg-reconfigure vlc as well as
sudo apt-get update && sudo apt-get upgrade && sudo apt-get install -f.

To reset VLC just use vlc --reset-config.


Indentation lost in Libreoffice after hitting enter

Yes, there is a workaround for what you wish. At least of what I can see in the scenery you mention.
I provide you with a fast food recipe for this instance in the best wish for this to solve your issue. If this is not what you expect please don't hesitate to drop a comment and I am going to change/delete this answer based on the best for you.
The Ingredients:

The latest LibreOffice version you can afford.
Patience
A drink and some donuts.

Preparation
First of all we should have in consideration that the proper key accelerators for bullets and numbers are Shift F12 and F12 respectively. So the first thing we should do in order to create a bullet list is to hit the Shift F12 in order to start a bullets list as shown in the next screenshot.

Please notice I haven't added any text yet. That's just because of I am going to perform certain other tasks previous to start typing my list, but you can -indeed- do it on an already made list. The process should result in the same.
Now, I am going to click the "Format" menu and choose the "Bullets and Numbering..." option.

Now, I am going to choose from the ready-made presets, or -as in your case- if I need a different kind of bulleting, I am going to hit the "Options" tab in the "Bullets and Numbering" window, in which I am going to define every options I wish for the main and subsequent bullet levels, see the screenshot.

Now, in the "Character style" dropdown I am going to choose "Source Text", after which I am going to hit the ... button in order to set the text that it's going to be used.
A window will be presented with the fonts and text elements that we can use for such purpose. In this example I am going to use the "Ubuntu Font" with the "General punctuation" Subset (Default) and by choosing the upper left's character I am going to instruct the "Bullets and Numbers" to use such element as shown in the next screenshot.

Now, let's hit Ok on the opened windows, after which the solid rounded bullet will transform in a kind of long dash, in which I can start writing the text. See the screenshot.

Now, in the next screenshot we see a bullet list with two levels using the same bullet.

Let's say I wish to use a plus sign + for the second level of the list. What I should do is exactly the same steps as for level 1, but this time let's choose "Level 2" and give it the + sign. After which I am going to right click the sub level item and chose the "Down one level" option in order to make it use the + sign.

But! The sub level should be nested inside the previous level, so let's hit the "Increase indent" button from the format bar in order to do so.

And we can go further with the same steps for any deepest levels you need to give certain format.
Serving
Oh! Yes, I hope you enjoyed your donuts and your favorite drink when reading this.
So, don't forget to serve an additional portion of donuts and hot drink for the conversation.
Good luck!


Unity broken, can't install due to unmet dependencies

run this commands

sudo apt-get clean
sudo apt-get -f install


Show a window again: Rhythmbox is playing music but I can not see the window anywhere

click the speaker icon the task bar
then you will see a list of players listed click on rhythmbox


What can I do to reduce temperature using various throttling techniques in 10.04?

You could try different things including leaving space behind and under the laptop to let air flow.

You could try also powertop, which is a tool for Intel platforms that helps saving Watts. See LessWatts.org, i guess it is already included in the repositories.

Hope it helps


Byobu statusbars of 2 different servers are still different after resetting Byobu

Looks like this was an issue with rotten default settings of gnome-terminal. I opened Profile Preferences from the Edit menu, went to the Compatibility tab, clicked Reset Compatibility Options to Defaults, closed the running terminal and opened a new one. Now the issue is gone.


I used unetbootin to create an Ubuntu 14.04 installation on a USB stick but had to go through some hoops to make it work. First is that the USB drive must be formatted as a vfat filesystem. That filesystem should be on the first partition, better if it's the only partition. Then mount the USB stick somewhere (change the device so that it is the drive letter of your USB stick (mine was /dev/sdb1), and change the mount point to one that works for your system):

$ mount -t vfat /dev/sdb1 /mnt/usb

I do not use OS X, so you will need to sort out how to access the command line and gain root privileges. Next call unetbootin from the command line giving it the following arguments:

$ unetbootin installtype=USB targetdrive=/dev/sdb1  (or your target drive letter).

That should start the unetbootin GUI and allow you to chose your installation file and write it to the USB stick.


Try using the following command:

rfkill unblock all

I had the same problem and solved it. OR use

sudo ifconfig wlan0 up


Where can I find the feature "Save to Ubuntu One"?

The feature is called "Send to Ubuntu One". You can read more about it here:
http://voices.canonical.com/ubuntuone/2012/04/12/a-sneak-peek-of-send-to-ubuntu-one/

Just a preview was made available, and it hasn't been published yet.


Using the command apt-cache depends <package-name> should tell you which dependencies are needed on a package.


Ubuntu 16.04 hangs on reached target shutdown/restart

After reinstalling Ubuntu on my laptop. I found the best way to avoid this problem. Make sure that when you install Ubuntu you must be connected to the internet so that Ubuntu will fully detect your hardware.


Change your udev-rule

KERNEL=="mouse0",  SUBSYSTEM=="input", ATTRS{idVendor}=="0461", ATTRS{idProduct}=="4d81", SYMLINK+="myusb"

But I would create your symlink in /dev/input/

SYMLINK+="input/myusb"

You can find correct value with

udevadm info --query=all --name=/dev/input/mouse0 --attribute-walk

this is all for the 1. Usb-mouse

readlink -f /dev/input/myusb
/dev/input/mouse0


How can I cleanly remove PulseAudio in Ubuntu 14.04?

You can't remove Pulseaudio in Ubuntu 14.04 without breaking some dependencies. The sound indicator and the sound options panel, even the control center itself, are dependent on Pulseaudio.

Pulseaudio is just a userspace daemon. But you can't simple kill Pulseaudio since it will be respawned by the init system.

jorge@den:~$ ps aux | grep pulseaudio
jorge     3797  0.0  0.1 440464  7360 ?        S<l  17:40   0:00 /usr/bin/pulseaudio --start --log-target=syslog
jorge     3803  0.0  0.0  98392  3028 ?        S    17:40   0:00 /usr/lib/pulseaudio/pulse/gconf-helper
jorge     4057  0.0  0.0  23900   924 pts/0    S+   17:51   0:00 grep --color=auto pulseaudio
jorge@den:~$ pkill -f pulseaudio
jorge@den:~$ ps aux | grep pulseaudio
jorge     4063  6.0  0.1 440680  7236 ?        S<l  17:51   0:00 /usr/bin/pulseaudio --start --log-target=syslog
jorge     4067  0.0  0.0  98392  3028 ?        S    17:51   0:00 /usr/lib/pulseaudio/pulse/gconf-helper
jorge     4069  0.0  0.0  23900   924 pts/0    S+   17:51   0:00 grep --color=auto pulseaudio

You can tell Pulseaudio not to respawn itself by issuing this command:

echo "autospawn = no" > $HOME/.config/pulse/client.conf

You can now kill pulseaudio:

jorge@den:~$ pkill -f pulseaudio
jorge@den:~$ ps aux | grep pulse
jorge     6310  0.0  0.0  23900   916 pts/1    S+   18:11   0:00 grep --color=auto pulse

Pulseaudio should be restarted on session startup, but it might be terminated if there is no sound activity, so after you are done, remember to remove the file you have created before, so Pulseaudio can be respawned when needed.

rm $HOME/.config/pulse/client.conf


Ethernet not showing up in available connections - Ubuntu 15.04

The problem is with glitchy Realtek driver r8169.
Many reported that disabling autonegotiation helps.
You can turn it off by using the following command:

sudo ethtool -s eth0 speed 100 duplex full autoneg off


In my case I was able to do what I wanted using crontab.

I didn't necessarily need to run the code at startup. I just wanted to know that it would run while the computer is on. Using crontab allows me to run the python code every 15 minutes whenever the computer is on which works great.


Where is the gnome-power-manager binary in 12.04?

In the standard installation with Unity you have the same facilities but gnome-power-manager is not running. I believe the facilities are provided by indicator-power.
The indicator-x things are threaded into gnome much deeper than gnome-power-manager was.
In case you need something with the same functionality you can try xfce4-power-manager
It is a little bit slow to "dock" in the tray, but works well and reminds me of the old power-manager. It is light and will not bring all xfce4 with it, but juts a couple of libraries.

I hope it helps
                 Herna


Ubuntu 14.04 Live USB installer will not run

It seems that something was corrupted with my .iso even though the md5sums matched.  I redownloaded the image and remade the live USB and it installed fine.


Is running Ubuntu One on Debian 'possible'?

Just for the record, you can run Ubuntu One anywhere you want, but we don't have the resources to test it and get it running smoothly everywhere.

Having said that, Ubuntu One is made up of several parts; the most problematic to get
running in Debian is the syncdaemon, and I presume that is what you
mean; tomboy, desktopcouch and funambol plugins shouldn't be an issue
at all (at least, no issue specific to Debian :-) ).

@ajmitch is working on getting packages of syncdaemon ("ubuntuone-client") into Debian.

Meanwhile, you can get it running. The versions of some of the
libraries are slightly off for squeeze, so some patching is needed for
now. Here's what you can do for the most rudimentary version of
"running", in squeeze (starting from a base install with the 'desktop'
task installed):

sudo apt-get install bzr python-lazr.restfulclient python-oauth python-pyinotify python-protobuf gnome-common gobject-introspection xutils-dev libnautilus-extension-dev libgconf2-dev libebook1.2-dev gnome-settings-daemon-dev python-twisted-names python-libproxy python-distutils-extra python-setuptools
mkdir ~/u1; cd ~/u1
bzr branch lp:ubuntuone-client/stable-1-4 client
bzr branch lp:ubuntuone-storage-protocol/stable-1-4 protocol
bzr branch lp:ubuntu-sso-client/stable-1-0 sso
bzr branch lp:configglue
sed -i~ -e 's/Spinner()/Label("...")/; /spinner.start/D' sso/ubuntu_sso/gui.py
(cd protocol; python setup.py build)
(cd client; ./autogen.sh --with-protocol=../protocol --with-sso=../sso --prefix=/usr; make)
PYTHONPATH=sso sso/bin/ubuntu-sso-login &
PYTHONPATH=configglue:sso:client:protocol client/bin/ubuntuone-syncdaemon client/data/syncdaemon.conf --debug
PYTHONPATH=sso:client client/bin/u1sdtool -c

while the above gets the syncdaemon online and syncing (assuming you're using Network Manager), it doesn't
include dbus activation and nautilus integration, which help. If you
want those, you could try

(cd sso && sudo python setup.py install --prefix=/usr)
(cd configglue && sudo python setup.py install --prefix=/usr)
(cd protocol && sudo python setup.py install --prefix=/usr)
(cd client && sudo make install)
sudo mkdir /etc/xdg/ubuntuone; sudo cp client/data/syncdaemon.conf /etc/xdg/ubuntuone

this should make the whole stack work. If you get import errors, check
that things got installed in dist-packages and not site-packages
(if they're in the latter, move them over :-) )

See? One-click install.


Unable to find my files, but they take up space

I have a strong suspicion you have another partition mounted on /home. When you booted to a live USB, you didn't mount that partition, so files copied to your home directory were copied to your home directory on the partition mounted on /. When Ubuntu boots and mounts something on /home, the old contents are effectively inaccessible until you unmount /home.

You can bind mount / elsewhere to access the directory masked by other mounts:

mkdir foo
sudo mount --bind / foo
du -sh foo/home


Remmina and Vinagre alternatives for VNC with ssh-tunnel support

Remmina works well for me though I need to establish the ssh tunnel in a terminal before hand.

For a one step VNC through SSH solution I use ssvnc. After some initial setup for each connnection I can establish a link quickly. I don't like the VNC client as much as Vinagre or Remmina but it works well.


OK, the answer that I have and which works almost exactly as requested is actually surprisingly complex. You will use xmacro to record and play back key strokes.

Install xmacro

sudo apt-get install xmacro

Record a macro

xmacrorec2 > test.macro

Now press ESC (to record the "abort" key for recording), type whatever text you want to assign and press ESC  again to stop the recording. The recorded macro is now in the file test.macro; you can edit it with a text editor.
Test that macro works

cat test.macro | xmacroplay -d 0 $DISPLAY

(optional, recommended) Create a script with the above commands. Save it as macro.sh:

#!/bin/bash

cat test.macro | xmacroplay -d 0 $DISPLAY > /dev/null 2>/dev/null

Make it executable:

chmod a+x macro.sh

A little problem remains. xmacro plays back the exact keystrokes, but if you define a shortcut, and run the script from the shortcut, the keys will be played before you release the shortcut key, as if you started typing without releasing the key. You need to prepend the following line to the test.macro file:

KeyStrRelease F1

which will simulate the release of the F1 key.
Using keyboard preferences (you can access them through settings or by typing `gnome-control-center keyboard), create a new shortcut under "Custom shortcuts" and assign to it F1.

OK, but there is one more caveat: the F1 shortcut will now work in every application, not only the terminal. I don't know how to solve it; possibly, in the macro.sh one would have to test what window has the focus first and check whether the identifier of this window is terminal.


How to keep the pen functions on 14.04 LTS or 15.04

Determine why your pen and digitizer work now - what software supports them, and how that software is configured. Read the changelogs for your target Ubuntu version, and see if the supporting software is mentioned. If so, read very carefully.


I am running 11.10 and want to know if this means I have USB 3.0

USB 3.0 uses a different driver than USB 2.0 (or 1.0). I think the 3.0 driver was called xhci---and your print out says driver=ehci, which was the 2.0 driver, but I don't remember the uhci driver.


This should help--- to be able to access the GNOME panel settings or add applets, you need to hold the ALT key and right click the panel instead of simply right clicking it, as it used to be in GNOME 2.


cherry st1044 not recognized in ubuntu 12.10

The pcscd service is started on demand by systemd. See "pcscd auto start using systemd"
So it is normal if pcscd is NOT started by service pcscd start.

See also "Level 1 smart card support on GNU/Linux" to know how to debug your issue.


If you did not mark the partitions to be reformatted, then "deleted" them, and overwrote the previous partitions with the same partition format (ext4 etc) then the data that was on the drive is still technically there so when you reinstall, it is theoretically possible to read the data from a previous install

Source: I have had this happen also


How can I determine what packages I had installed before a new install?

A method to automate the new installation and have it install anything you had on your old system would be:

dpkg --get-selections > installed-software

Back that file up and after installation do...

dpkg --get-selections < installed-software
dselect

If needed you can edit the text file and remove, alter the name of, or include packages.

  Noteworthy

cat /var/log/apt/history.log

shows a list of what you did using apt-get.

apt-mark showmanual

will list packagas that where installed manually.


Reinstall GRUB2. Hopefully your OSes are still there and something happend to GRUB... See: https://help.ubuntu.com/community/Grub2/Installing
With the extra info you provided the commands should be

sudo mount /dev/sda4 /mnt
sudo grub-install --boot-directory=/mnt/boot /dev/sda

The first one mounts your ubuntu file system and the second one repairs the GRUB installation.
Then reboot.


You should use the terminal again. Just copy and paste with your mouse  the following two lines:

xinput set-prop 12 "Device Enabled" 1
;

Be sure that you copy both lines in the same time!


trying to get nomachine working on ubuntu

Maybe you changed something in nxserver configuration. Try to remove NoMachine completely from system sudo dpkg --purge nomachine && sudo rm -rf /usr/NX /etc/NX .nx and reinstall from scratch.

Could be a problem with firewall. But it's weird I use NoMachine regularly on Ubuntu and don't have such problems. It may be a good idea to look on their forums.


pear install bbcode to specific php version on LTS 16.4

If you use

sudo update-alternatives --set php /usr/bin/php5.6

it should update the php version for the cli to be the 5.6 and with that make the system to use that php version. Not sure if it would work for pecl though.


I fixed this by reinstalling the Nvidia drivers. I'm not sure exactly how I managed to do this and the solution was not 100% - rebooting was temperamental each time and switching off took an unusual route also. Anyway the computer was useable but...

Lo and behold, the same thing happened a fortnight later when new updates (which I had hoped would restore the previous smooth performance) again led to a no boot scenario. and it was harder to fix.

I just got a black screen with blinking cursor. Ctrl+Alt+F1 gets you into the TTY1 terminal (and F2 into the TTY2 terminal etc) then you can try various fixes you can find on the web (of course you need another machine to do the research while your computer is down).

I tried about 15 different suggested fixes before I got lucky. I could not get into Grub. Lots of commands were rejected (gtk-warning-cannot-open-display), "no screens found", module errors etc.

Eventually I uninstalled all Nvidia components:

sudo sh NVIDIA* --uninstall

Then reinstalled by:

sudo apt-get update

sudo apt-get dist-upgrade

Then:

sudo apt-get install build-essential

sudo apt-get install linux-kernel-headers *

I could then reboot (sudo reboot) and see my desktop for the first time in hours. The resolution had changed, but that's easily fixed.

I post this answer for my benefit next time this happens to me (it's four or five times in 18 months now) and for anyone else going through the same misery. It can be fixed, keep trying!


Using mimeopen to set default application outputs "Cancelled"

You can see from mimeopen's source (I searched for "Cancelled"), it's expecting a number.

If you want to specify an application, in your case, specify 2 (for "Other...") and then specify the command.


How can I ensure that the theme and apps that I have installed on the admin account have transferred across to the secondary guest account?

I Have tried it to have the same shell theme, icon theme and plank.
applying shell-theme was not successful but icon theme and plank are ok.
Install user-themes gnome-shell-extension as system-wide.
Install shell-theme and icon-theme also as system-wide.
First we need to compile the schemas for admin user as how we want it. In your case
below is an example,
# Custom Settings for ADMIN ACCOUNT which will be used for standard users too

[org.gnome.shell]
enabled-extensions = ['user-theme@gnome-shell-extensions.gcampax.github.com']

[org.gnome.shell.extensions.user-theme]
name = 'Mojave-dark'

[org.gnome.desktop.interface]
icon-theme = 'Mojave-CT-Classic'

create a text file with above content and name it as 99_ADMIN_SETTINGS.gschema.override
move the above file to /usr/share/glib-2.0/schemas/ and then compile the schemas with below command
sudo glib-compile-schemas /usr/share/glib-2.0/schemas/

You can edit the above file with any gsetting keys you wish at any time.
Any changes you made to above file, you need to compile the schemas.
At anytime you wish to have default values.. simply delete the file 99_ADMIN_SETTINGS.gschema.override and compile the schemas.
For plank.. copy the .desktop file of plank from /usr/share/applications to /etc/xdg/autostart with below command.
sudo cp /usr/share/applciations/plank.desktop /etc/xdg/autostart/

Tested in gnome-shell 3.36.6


Is it safe to uninstall flatpak runtimes for apps I no longer have installed?

To add to @karel's answer:
The command flatpak uninstall --unused uninstalls all unneeded runtimes.


Screen tearing on videos (not flash videos)

There is much better performance of AMD cards from both the open source driver and the Radeon driver from ATI since 12.04. Upgrade to the latest version of Ubuntu 15.10 or 16.04.

For future travellers there are two issues with video playing:

Playback refresh, the tearing mentioned above is caused by the frame rate and the playback rate being different and the display method refreshing scan lines instead of whole frames as a cached block.

This issue can be solved by using a video driver that takes advantage of the graphics drivers different ways of caching content and quickly displaying it all in one go. Effectively syncing each frame to the refresh of the screen.

Decoding time, video is almost always encoded in a file which needs to be unpacked in real time. This puts a large demand on the processor to run very complex maths just at the moment you need that particular frame. If your processor is slow, old or broken (or in power saving mode) you may notice performance issues such as stuttering and frame rate reduction.

This issue is harder to solve; you could always buy a new computer of course. But the main way is to offload the decoding from the inefficient CPU to a dedicated video decoding chip that a lot of modern video cards have. You need three things for this to work. a. that the driver supports the chip, b. that the video program supports hardware acceleration c. that the video file is of a format supported by the chip.

So should the stars align for you, it is possible to get better video playback, even with an older machine.


Placing an image behind the text in LibreOffice Writer

Right-click on the image to open its context menu.

Inside that, select Arrange > To Background.

As result, you see that the image is behind the text, without any white box around.

Update: In LibreOffice 6, choose Wrap > In background.


Multiple problems while installing Ubuntu 13.04 on LENOVO G500 laptop

The screen brightness is set to FF, which translates to '0 brightness.' Simply press the f12 key to brighten the screen. This will need to be done every time. Alternatively, you can run this command on startup-

sudo setpci -s 00:02.0 F4.B=00

-where 00 is full brightness and FF is zero brightness. Luckily, I only wasted an hour figuring out how to get it to load and work.

To boot to USB, you must hold 'fn' at the lenovo boot screen, press 'f12' to see boot device options, then select the USB drive you wish to boot from. You do not need to do nomodeset.


Why are the Documents, Desktop, etc. directories not group-writable by default?

First, you can ll -d Documents, and save grep for when it's needed.

In /etc/adduser.conf one finds:

# If DIR_MODE is set, directories will be created with the specified
# mode. Otherwise the default mode 0755 will be used.
DIR_MODE=0751

See man adduser and man adduser.conf.


Unable to set a static ip for Xubuntu system

I prefer vim instead of cat. Here's how I set static IPs on the daily:

Get and install vim (if needed):

sudo apt-get install vim

Open to edit the network interfaces file:

vi /etc/network/interfaces

Make changes to the network interfaces file, to appear as so: I used 192.168.10.10 as the static IP in the example.

auto enp2s0
iface enp2s0 inet static
    address 192.168.10.10
    netmask 255.255.255.0
    network 192.168.10.0
    broadcast 192.168.10.255
    gateway 192.168.10.1
    dns-nameservers 192.168.10.111

Then restart the service as you normally do or as I would do:

sudo ifdown enp2s0

wait

sudo ifup enp2s0

Now check your ifconfig and you should now see the static IP

ifconfig

Good luck and Enjoy!

If that doesn't work, try shutting all network interfaces off and back on with sudo ifdown -a and sudo ifup -a


i can burn .iso image but i can't burn new data dvd

Test this:

Open a terminal,Press Ctrl+Alt+T

Run it:

sudo -i
apt-get update
apt-get install --reinstall brasero brasero-cdrkit brasero-common cdrdao cdparanoia cue2toc dvdauthor dvd+rw-tools genisoimage wodim


How to downgrade PHP from 5.3.x to 5.2.x

I found this script on the ubuntu forums which worked for me

http://ubuntuforums.org/showthread.php?t=1566808

On ubuntu 10.10 you'll need to install aptitude as it is no longer installed by default.

sudo apt-get install aptitude


Fresh Install of 20.04 Plymouth errors at boot

Just ignore all the boot messages These are just caused as Ubuntu is not custom made for every hardware. Hence it gives these messages. If any of these message is not related to your hardware, then no need to look into it, and if it is related to your hardware, then you cannot do anything. So the best thing you can do is ignore them. If it is a serious issue, you wont be able to boot into Ubuntu.
So as long as you are able to boot, no need to worry.
EDIT 1:
On my PC I have the following parameter in /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash rd.plymouth=0 plymouth.enable=0"

After this run sudo update-grub and then reboot.
I think this will help. Try this. With this I see the Predator logo (I have an acer predator helios 300 laptop) and nothing else while booting up.


Airplane Mode ON - use hardware switch to turn off

My wifi is also disabled after installing Ubuntu on an HP Pavilion laptop, I found that the touch switch that turns my wifi on and off now toggles it into and out of airplane mode. I think that is the manual switch it is talking about. At least it was for me.


MythTV backend configuration. Can't add myself as root user

I had the same problem. The workaround is to do this manually - using the command:

sudo usermod -a G mythtv <userid>

(<userid> being your particular user login)

Use the following command to confirm the change:

id <userid>

You will need to restart/reboot to then successfully run mythtv


Kubuntu installation asks to install on entire partition

This was solved with information given in comments.

mikewhatever said:

  .... The problem seems to be that the hdd already has 4 primary
  partitions. If that is the case, you won't be able to create more,
  before deleting one. Your current options are: delete one of the
  partitions and then create partitions manually, use the Windows
  installer, use VirtualBox. PS: What's ELT.

Seth added:

  Yes, according to the picture you already four primary partitions:
  /dev/sda1, /dev/sda2, /dev/sda5 and /dev/sda6. I hard drive
  can only have four primary partitions at a time.

The OP reported that this worked.


I want to install 12.04LTS 64bit on HP Z820. Will there be any problems?

Looking at the Specs I can see the following:

Out of the several operating systems it can work on, Red Hat is one of them. Since a Linux OS is found there, you have a very good chance of having full support on Ubuntu.
All the (Intel Xeon) Available Processors for it are supported in Ubuntu
All Expansion Slots & Ports (USB, Sound...) are supported
All Network, Sound & Storage Devices are supported.

The ones that would need further research would be:

Drive Controllers - The controllers appear certified in the Ubuntu site
Intel C602 Chipset - The chipset appears certified in the Ubuntu site
Nvidia Graphics - This can be solved quickly by following the steps provided in How do I install the Nvidia drivers?

But even after all of this, I want to add some additional info:

In the Ubuntu Forums, a user tested out the HP Z820 I concluded that everything worked ok.

A Launchpad Bug report confirms a problem with the CPU when stressed. The issues looks like only affects 12.04 but a fix was released for 12.10+


Why is one apache2 virtual host slow and another not?

In Chromium or Chrome you can go to Developer Tools and select Network option to see how long it takes to load each resource. Typically when a page loads slowly it is because the browser is trying to access something that is either not found on the server or it is accessing content on a different server.


My LAMP Custom Server won't display PHP code

I may have misunderstood, but you said that the codes does not work in index.html file!
it is because the extension of file! rename the file from index.html to index.php or something else with .php suffix.
when you save a file as .html, the system treats it like as a HTML file. so if you want to run PHP codes, you must save it as .php file.


Order in which passphrase is asked for encrypted volumes

After some more digging, I found the decrypt_derived script. It allows to derive the passphrase from another encrypted partition. I set up the swap partition in this way, made the necessary changes to /etc/crypttab and it works! I only need to enter one passphrase, the second partition is unlocked automatically during boot and hibernation works.

More details e.g. here.


What is swap and how large a swap partition should I create?

Swap is what is used when you run out of RAM.

RAM is fast. SWAP is SLOWWWWWW (being as its mechanical (hard disk) as opposed to ram (purely electronic)).

In the old days, you allocated double the amount of RAM you had to swap. These days its not such a hard and fast rule. 2-4gb is the usual.

Related question: I have 16GB RAM. Do I need 32GB swap?


The recommended steps to check the webcam quality are (This same problem happened to me for a Logitech webcam):

Test the webcam with another app (Cheese, Kamerka, Kamoso & guvcview). Guvcview and Kamoso are great since they offer many features for webcam that Skype does not. You can even test the webcam with Google Hangouts or http://www.testwebcam.com/
If the webcam works great in other apps or webapps, then you know the webcam is not the problem, but the software. We then go to test capturing methods with tools like qv4l2. You can check several webcam features with this. There are some capturing options that are limited to 5 fps. Others can go up to 30 fps and even other can get to 60 fps.
Last option is to update Skype with the latest version (or a version that works correctly). Is no secret that Skype has had a huge amount of video problems on Linux. From slow webcam, to black one, to crashing if you opened the webcam and more. For some users, using the Skype that comes with Ubuntu works great. For others you need to download a newer version. In my case in one PC it works perfect with the one that Ubuntu had. In another case, the upgraded version worked great. Currently I have the 4.2.0.13 Version.

NOTE: I also followed the steps you are doing and got no solution. A tip I would say is that Skype might crash and leave a zombie in memory, so you need to search for the Skype process and kill it before starting another Skype session. Just mentioning this in case it happens to you.


How to delete or unblock an IP address listed in IPtables firewall?

Look at the number on the left, then use number to delete it. For example delete line number 2, enter:

iptables -D INPUT 2


ImportError: No module named lsb_release

Ubuntu 14.04 has the lsb_release.py file installed for Python 2.7 as well and lsb_release seems to work under python2.7 as well. You can try this by doing:

python2.7 /usr/bin/lsb_release

If that works, make a backup of the file /usr/bin/lsb_release and change the first line to read:

#! /usr/bin/python2.7

(you can experiment with the -Es options, I would leave them out intially).

Once you can run apt-get again, reinstall python3 and it dependencies. You can determine the direct dependencies by using apt-cache depends python3 and use apt-rdepends or reverse-depends (both have to be installed) to get dependencies recursively.

Note - Find Original Answer by Anthon on unix.stckexchange.com


How to install an application like gimp from terminal and install all the available plugins showed in software center?

You need to find out all the package names that you want to install and then you can put them behind gimp (with a space in between)

So ...

sudo apt-get install gimp gimp-data-extras gimp-flegita
gimp-gmic gimp-gutenprint gimp-plugin-registry gimp-cbmplugs
extremetuxracer-gimp-dev gvfs-backends xcftools

Oh and you can leave out gimp (it will install itself due to you installing gimp-plugin-registry).

Addition:

gimp-flegita is a plugin to add scanners to gimp
gimp-gmic is a pluging to manipulate GREYC's Magic Image Converter


How to switch workspaces in Xubuntu by scrolling mouse wheel over the desktop?

Okay, I have found the answer. Settings - Window Manager Tweaks - Workspaces - Use the mouse wheel on the desktop to switch workspaces.


Gparted: Extending to unallocated space in the left

Make sure that you have a good backup of your important Ubuntu files, as this procedure can corrupt or loose data.
Keep these things in mind:

always start the entire procedure with issuing a swapoff on any mounted swap partitions, and end the entire procedure with issuing a swapon on that same swap partition

a move is done by pointing the mouse pointer at the center of a partition and dragging it left/right with the hand cursor

a resize is done by dragging the left/right side of a partition to the left/right with the directional arrow cursor

if any partition can't be moved/resized graphically, you may have to manually enter the specific required numeric data (don't do this unless I instruct you to)

you begin any move/resize by right-clicking on the partition in the lower pane of the main window, and selecting the desired action from the popup menu, then finishing that action in the new move/resize window

Do the following...
Note: if the procedure doesn't work exactly as I outline, STOP immediately and DO NOT continue.

boot to a Ubuntu Live DVD/USB
start gparted
move /dev/sda6 left (or delete it if you wish)
move /dev/sda7 left
resize /dev/sda7 to the right
click the Apply button


How to set default kernel in GRUB without Grub Customizer?

Ok, I installed the grub customizer and set:

default entry
   predefined [Advanced options for Ubuntu>Ubuntu, with Linux 4.2.0-41-generic]

After this I noticed that the following entry appeared in /etc/default/grub:

GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 4.2.0-41-generic"

Then I uninstalled the grub customizer made sure the entry was still there ran sudo update-grub and rebooted. Now the right kernel is used.

It looks like there is a specific syntax GRUB_DEFAULT="submenu>menu". Didn't know about that...


Publishing publishing chromium - desktop web-app to Ubuntu Software center?

FYI, Ubuntu Software Center is deprecated and will soon be removed from Ubuntu. Currently Ubuntu is working on integrating the GNOME Software Center into Ubuntu, and will be developing a method to integrate its upcoming snappy app packaging system into the GNOME Software Center.  As far as electron-based app submissions are concerned, I don't think there should be a huge problem if, in the end, it is just a deb file or snappy package.  At the same time, I could be wrong and it would be better to ask a more credible source about that.  I would suggest talking to some developers who have deployed and maintain packages in the Ubuntu Software Center.  Plus, you could also just simply offer a PPA or a deb file for download on a website, or from Github (like for example, Github does for its Atom text editor, which is another Electron based app).


The download of the diskimage looks like it completed okay, so there's a possibility it's corrupted. Instead you can download the ISO directly (releases.ubuntu.com/12.04/ubuntu-12.04.2-desktop-i386.iso) or using the torrent (releases.ubuntu.com/12.04/ubuntu-12.04.2-desktop-i386.iso.torrent), which is better since your internet connection is intermittent.

Save the ISO in the same folder as wubi.exe before running, and it will use the ISO instead of the diskimage.


Ok, it has nothing to do with major numbers as I thought.  The Cannot open /dev/ttyUSB0 message is printed in dump_one_device() if
pointer returned by get_usb_device() is NULL. This function in turn
calls libusb_get_device_list() that returns a list of USB devices
together with their bus and device numbers which are extracted using
libusb_get_bus_number() and libusb_get_device_address() and
concatenated with "/dev/bus/usb".  You can check it with gdb (I've
used today's master commit c92f1962892d709cb9bad3aac2440932dd9684f6
from https://github.com/gregkh/usbutils):

$ gdb --args ./lsusb -vD /dev/ttyUSB0
Reading symbols from ./lsusb...done.
(gdb) break usbutils/usbmisc.c:134
Breakpoint 1 at 0x40b827: file usbmisc.c, line 134.
(gdb) run
Starting program: /media/data/usbutils/lsusb -vD /dev/ttyUSB0
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
[New Thread 0x7ffff6d44700 (LWP 4621)]

Thread 1 "lsusb" hit Breakpoint 1, get_usb_device (ctx=<optimized out>, path=path@entry=0x7fffffffddab "/dev/ttyUSB0") at usbmisc.c:134
134                     if (!strcmp(device_path, absolute_path)) {
(gdb) print device_path
$1 = "/dev/bus/usb/002/002", '\000' <repeats 4076 times>
(gdb) continue
Continuing.

Thread 1 "lsusb" hit Breakpoint 1, get_usb_device (ctx=<optimized out>, path=path@entry=0x7fffffffddab "/dev/ttyUSB0") at usbmisc.c:134
134                     if (!strcmp(device_path, absolute_path)) {
(gdb) print device_path
$2 = "/dev/bus/usb/002/001", '\000' <repeats 4076 times>
(gdb) continue
Continuing.

Thread 1 "lsusb" hit Breakpoint 1, get_usb_device (ctx=<optimized out>, path=path@entry=0x7fffffffddab "/dev/ttyUSB0") at usbmisc.c:134
134                     if (!strcmp(device_path, absolute_path)) {
(gdb) print device_path
$3 = "/dev/bus/usb/001/002", '\000' <repeats 4076 times>
(gdb) continue
Continuing.

Thread 1 "lsusb" hit Breakpoint 1, get_usb_device (ctx=<optimized out>, path=path@entry=0x7fffffffddab "/dev/ttyUSB0") at usbmisc.c:134
134                     if (!strcmp(device_path, absolute_path)) {
(gdb) print device_path
$4 = "/dev/bus/usb/001/001", '\000' <repeats 4076 times>
(...)

and so on until device_path is equal to the input argument.  Of
course /dev/ttyUSB0 will never match.

It's nice that you can also change to /dev/bus/usb and pass a relative
device address:

$ cd /dev/bus/usb/
$ lsusb -D 001/001
Device: ID 1d6b:0002 Linux Foundation 2.0 root hub
(...)


How can I reboot in recovery mode in a remote machine?

Cloud providers generally do give this kind of access.  Instead, the recovery procedure is to use another instance.

Shutdown broken instance but do not terminate or delete it.
Boot a second instance and attach the volume from the first broken instance to the new one.
Perform maintenance on the newly attached disk (fsck, etc)

You can find more details in this q/a.


BeautifulSoup4 on Ubuntu 14.04 with Python 2.7.6

You named your file bs4.py. So Python imports that file instead of the bs4 module and throws an error as your file doesn't contain anything called BeautifulSoup.

Use another name for your file.


How to forward/route eth0 to specified as0t0 client? (Internet to VPNetwork's Client)

You need to DNAT from Public IP Address to client IP address in VPN network. Assume your public IP is 1.1.1.1 and client IP address is 192.168.1.50, use following command:

iptables -t nat -A PREROUTING -p tcp -d 1.1.1.1 --dport 7777 -j DNAT --to-destination 192.168.1.50

Be sure that client's default gateway is your VPN server.


Random clicking and draging and ghost touching is happening on my Acer Spin 5

You can fiddle around with finger width dimensions in the touchpad configuration file to prevent your palms being interpreted as finger commands. An easier way is software to disable the touchpad whilst typing to avoid unintended actions executed by your palms:

sudo add-apt-repository ppa:atareao/atareao
sudo apt-get update
sudo apt-get install touchpad-indicator

The screen shots and write-up below come from Ubuntu 14.04 installation (tipsonubuntu.com - Install touchpad indicator Ubuntu) but not much has changed.

Touchpad indicator is an applet icon on Unity panel that allows you to enable/disable touchpad via its drop-down menu or a shortcut key. Besides that basic function, the simple app supports:

Disable touchpad when mouse plugged.
Disable touchpad on typing.
Natural scrolling.
Circular scrolling.
Two fingers vertical/horizontal scrolling.


The libboost libraries changed their names, removing the "-mt"  You can probably edit the makefile to remove the -mt s in the names, or try a suggestion from http://forum.freecadweb.org/viewtopic.php?t=4541
to rebuild the makefile.

The kinect requires a 64 bit and your boot libraries are in the 32 bit directory.  Are you on a 64 bit machine and if you are, can you install the 64 bit boost packages?

In a terminal, run

 uname -a

to see if your OS is 32 bit or 64 bit (X86_64 indicates 64 bit).  You might have installed a 32 bit version of the OS.

Check the individual packages for being the 64 bit version with:

dpkg -l |fgrep boost

e.g. the ":amd64" on the package name.

ii  libboost-filesystem-dev:amd64  1.54.0.1ubuntu1  ...
If you get an ":i386" instead of the "amd64", it's a 32 bit version.  Not sure how that could have happened unless you installed them explicitly (including the ":i386" on the package name at installation.  You can simply install the needed 64 bit boost packages with:

sudo apt-get install  libboost-filesystem-dev

or simply force the 64 bit package by using libboost-filesystem-dev:amd64 .  You don't even have to worry about uninstalling the i386 versions, they are different directories, but if you do remove them, use the ":i386" on the package name to select them over the 64 bit version.

On my 14.04 system, I downloaded the latest kinect package (containing imucam-R186M_2014-05-29), added a boost library I was missing, edited the makefile to remove the "-mt"s, and everything successfully compiled with one openni warning.


Unmet dependencies for php7.1 on Ubuntu 14.04

Your command is wrong and won't work. It should be apt-get install <package> not apt-get update <package> as update doesn't accept any parameter.

Besides that, I don't know which Ubuntu version are you using, but on 16.04, php7.1 is not available; the version in repositories is php7.0. Thus, I assume you have modified your APT sources and, though they have php7.1 available in a source you have added, some of its dependencies are not. I guess you have to add sources for the php7.1-common and php7.1-cgi or libapache2-mod-php7.1, or to avoid further problems, remove any repository or PPA that is causing the conflict.

Take a look at https://tecadmin.net/install-php-7-on-ubuntu/


Kubuntu does not always boot after Win10 update

Finally, my solution was to reinstall Kubuntu. I have tried everything else I could find in any forum.

I have used the partition tables above to safely identify my partitions.

Only root (/) sda6 and swap had to be formated during the installation. All other partitions (and the data on it) could be reused.

The packages could be reinstalled by first saving the list via

dpkg --get-selections | awk '!/deinstall|purge|hold/ {print $1}' > packages.list.save

and reinstalling them via

xargs -a "packages.list.save" sudo apt-get install


A problem with headphones: the audio is reproduced both by speakers and headphones

For this kind of problem a stereo male jack adapter is mandatory. In this way Ubuntu should recognize headphones/headsets.


Not able launch Qt5 on ubuntu 14.04 multiple times.like we do in windows.right click and open another Qt5 application

One thing you can do is go to File -> session manager. And then click on new to create new session .During work you can easily switched between two sessions.


There is a Settings tool called Input Method. Open Input Method and use it to set the user configuration "activate Intelligent Input Bus (IBus)".
Then remove the input method variables in /etc/environment and ~/.pam_environment. Input Method sets those variables. (It also starts ibus-daemon at login, so you don't need to do that manually either.)
Reboot

Now open IBus Preferences, add "Intelligent Pinyin" and start typing.


The problem is in the dump, I backup also mysql database with user and permissions and it crash maria db.

So before restoring the data backup your mysql database data

sudo mysqldump mysql > /home/caiofior/mysql.sql

And after restoring all the data restore previous mysql database

sudo mysqladmin drop mysql
sudo mysqladmin create mysql
sudo mysql mysql < /home/caiofior/mysql.sql


guest ubuntu ver 12.04 after log in black screen on vmware workstation 10.04

I was having the same issue and solved it by:

sudo apt-get install xserver-xorg-video-vmware

Follow the post:
Black screen after installing hardware support


Tried to use deja-dup for backup, but it give the following error(UnicodeDecodeError: 'ascii')

This is bug https://launchpad.net/bugs/1080423

I've uploaded a fix to Ubuntu 12.10, but it's slowly working its way through the approval process.


Zentyal- Can I run zentyal as a virtual?

Yes you can! I installed Zentyal inside VMware at my company.


You can try to run this in terminal:

sudo chmod 755 /etc/init.d/couchpotato

sudo update-rc.d couchpotato defaults

================================

And when you want to disable it from running at startup:

sudo update-rc.d -f  couchpotato remove

To find out more information do:

man update-rc.d


Nvidia driver not loading on Xubuntu 17.04, slow performance with 1050 card

use Search to find "Additional Drivers"

in additional drivers tab, several NVIDIA binary options will be presented, along with an X.Org X Server.   mine had the X.Org selected.  i changed it to the NVIDIA version 381 binary (384 is more recent, i'll probably change it to that later)

anyhow, it took a good couple minutes to apply, then i restarted, and sure enough in the Search now appears the NVIDIA X Server application, all my games are smoking the FPS

lol :)


How can I change the ppi of an image in GIMP?

You can change this in the Print Size settings, accessible via Image -> Print Size.

http://docs.gimp.org/en/gimp-image-print-size.html

Please note that this will not change the image content. In particular, it will not increase or decrease the number of pixels in your image.

For A3 at 330 ppi, you will need an image size of about 3858 * 5455 pixels.


how to provide a localized text file that opens within the language that gnome runs

You probably want to check the value of the LANG environment variable:

user@host:~$ echo $LANG
en_GB.UTF-8

You can then write a short script which picks an appropriate file based on the value of this:

#!/bin/bash
SHORTLANG=${LANG:0:2}
zenity --text-info --filename greeting_${SHORTLANG}.txt

Which takes the first two characters of $LANG and displays the appropriate textfile - greeting_en.txt etc.

Finally, create a desktop link to this script.

(Adjust the length of the SHORTLANG string if you're interested in the difference between en_GB and en_US rather than just the difference between fr and de).


Is there anything that ext4. btrfs, or F2FS can do for a usb3.0 thumb drive that fat does not do?

FAT32 has an obvious and glaring limitation:

File size limit: 4 GB.
That, for me, is show-stopper. And possibly the only reason I still use FAT32, would be that some startup disk creators (perhaps the Startup Disk Creator as well) format the drive to FAT32.

Given cross-platform support is not a limitation, there is absolutely no reason to use FAT32. In fact the only reason to use ext4 is that btrfs is not quite there yet.


How to install recommend packages from a file (package.deb)?

One solution would be to set up your personal APT repository and install the package with APT from there.

Another possibility is to extract the dependencies from the package description. This script pulls the Recommends: line from the description in the .deb file and removes versions and keeps only the first alternative when there are several.

apt-get install $(dpkg-deb -I foo.deb |
                  sed -n 's/^ *\(Depends\|Recommends\)://p' |
                  tr , $'\n' |
                  sed 's/[|(].*//')

With aptitude, you can install the set of packages matched by a pattern. If there are alternatives, install the one you want first.

aptitude install '?reverse-recommends(foo)'

From the aptitude full-screen interface, highlight the package, press Enter, navigate to “Recommends” and press + then g.


Google Apps not autocompleted in application finder in xubuntu

The actual problem is that there's no desktop app for the gmail platform, so the application finder has no way to locate an unexisting file. What we can do to troubleshoot the problem is creating a desktop launcher that points to an executable file (actually called script) that contains the command to open your default browser with the link to the gmail web. Let's do this:

You may find this link interesting: https://help.ubuntu.com/community/UnityLaunchersAndDesktopFiles [describes the process i'll explain][1]

1- open your text editor of choice and paste the following text:

#!/bin/bash

x-www-browser gmail.com

2- save the document on your desktop

3-  open a new file in your text editor of choice and paste

[Desktop Entry]
Version=x.y
Name=gmail
Comment=this opens the gmail.com domain
Exec=[write the absolute path of the first file here]
Icon=[ write here the absolute path of the icon]
Terminal=false
Type=Application
Categories=Utility;Application;

4- You can download the Gmail icon and paste the absolute path of the file on the Icon section

5- Remember to save the files on your desktop
Gmail

6- Now we have to give the files permission to be executable

7- right click on the document and go to properties

8- go to permissions and click in the allow this file to run as a program

9- now you can type the gmail command on your application finder or click on the desktop icon

10- if you prefer a minimalist desktop you can move the files to any other place, it just made easier the whole process, it's just personal preference


How to get WGET to download exact same web page html as browser

As roadmr noted, the table on this page is generated by javascript. wget doesn't support javascript, it just dumps the page as received from the server (ie before any javascript code runs) and so the table is missing.

You need a headless browser that supports javascript like phantomjs:

$ phantomjs save_page.js http://example.com > page.html

with save_page.js:

var system = require('system');
var page = require('webpage').create();

page.open(system.args[1], function()
{
    console.log(page.content);
    phantom.exit();
});

Then if you just want to extract some text, easiest might be to render the page with w3m:

$ w3m -dump page.html

and/or modify the phantomjs script to just dump what you're interested in.


How to activate Pinch-To-Zoom/Twisting with Synaptics Touchpad?

Holding down CTRL while pinching or zooming will allow you to perform the gesture.


You can use the lprm command:
Use
man lprm

to get a description.
To delete all queued jobs:
lprm -

NAME
lprm - cancel print jobs
SYNOPSIS
   lprm [ -E ] [ -U username ] [ -h server[:port] ] [ -P destination[/instance] ]
   [ - ] [ job-id(s) ]

DESCRIPTION

lprm cancels print jobs that have been queued for printing.  If  no  arguments
are supplied, the current job on the default destination is canceled.  You can
specify one or more job ID numbers to cancel those jobs or use the - option to
cancel all jobs.

OPTIONS
   The lprm command supports the following options:

   -E   Forces encryption when connecting to the server.

   -P destination[/instance]
        Specifies the destination printer or class.

   -U username
        Specifies an alternate username.

   -h server[:port]
        Specifies an alternate server.

   The  CUPS  version of lprm is compatible with the standard Berkeley command of the same name.

EXAMPLES

Cancel the current job on the default printer:
  lprm

Cancel job 1234:
  lprm 1234

Cancel all jobs:
  lprm -


Try this:

Click the Places menu on the top right of the screen and select Home Folder.

A File Browser window will appear.

Click the View menu and select Show Hidden Files if it isn't already checked.

Double click the folder marked .mozilla.

Double click the folder marked firefox.

Delete the profiles.ini file.

When you start Firefox, a new profile will be created.


Running Skyrim under separate x session?

Try the following command and run Skyrim from the terminal after you open the x session:

sudo xinit /usr/bin/sudo -u $USER gnome-terminal -- :1

Make sure you also add your user to the audio group in /etc/group if you want audio in your separate session. Edit from this:

audio:x:29:pulse

to this:

audio:x:29:pulse,username


When will add ofono-phomesim to the focal repository (20.04)?

The package was removed from Debian Unstable at 2019-09-13, so it will not be until official port to Qt5.
You can install it from some third-party PPA for both 20.04 LTS and 20.10:
sudo add-apt-repository ppa:smoser/bluetooth
sudo apt-get update
sudo apt-get install ofono-phonesim


How can I fix my NTFS partition after shrinking in Windows?

So!  I gave up on the whole thing and after buying a new external drive and backup the data, went to install Windows again fresh (still need to dual boot).  Windows STILL couldn't pick up the drive.  That's when I got suspicious.

I went into gparted
Deleted the mount that I'd attempted to create in Windows
RE sized  the drive back to what it was before.
Rebooted.
Windows asked whether I wanted to recover Windows (instead of booting normally)
THIS TIME, it actually seemed to do something.
Rebooted, and all was well.

Thanks to the advice from all.  Turns out even undo'ing what you've done with partitions can sometimes fix issues.


How to block certain websites using Gufw?

I would suggest setting up a proxy, like Squid, if the hosts file is not working for you. It would be a more effective method. You could block IPs with UFW. I am not familiar with GUFW(prefer CLI), but it is just a GUI for UFW.

sudo ufw deny from 172.217.194.190  to any

The problem with that is that youtube and google have many IP addresses. Your DNS resolver may return a different IP every 10 minutes or so for load balancing. To see how many IP addresses youtube has run this command:

whois -h whois.radb.net -- '-i origin AS15169'

A proxy would be a easier option than assinging a rule for every ip address. They could be blocked as an entire range, but you may block something else unintentionally. A proxy could be set up on your network. Configure the browsers to use the proxy and then blocking by Domain Name becomes a whole lot easier. But your more technical users will find a way to bypass.


Can't type in my password when waking laptop from sleep mode

I’ve seen this happen with some keyboards that have some non-standard chipset. The solution has generally been to update the Grub config file, as you’ve done, but with different flags. nouveau.modeset=0 would be for machines that have Nvidia graphics cards and shouldn’t have any effect on the keyboard. Instead, update your GRUB_CMDLINE_LINUX_DEFAULT line to look like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash nouveau.modeset=0 i8042.reset i8042.nomux i8042.nopnp i8042.noloop"

If your system was generally fine before adding nouveau.modeset=0 then you should be able to remove it.
The four kernel flags I’ve suggested here will do the following:

Flag
Action

i8042.reset
Reset the controller during init

i8042.nomux
Don't check presence of an active multiplexing controller

i8042.nopnp
Don't use ACPIPnP / PnPBIOS to discover KBD/AUX controllers

i8042.noloop
Disable the AUX Loopback command while probing for the AUX port

You can read more about these flags here. Hope this helps


Flash audio problem; redirecting to Pulse?

I solved it. The problem was that I needed to update the flash plugin in Chrome and Chromium manually. I went to http://get.adobe.com/flashplayer/ and downloaded the ".tar.gz for other Linux" option and copied the .so file into the plugins directory for all of my browsers.


I put a patch based on what you found on my github, to install do
sudo apt install dkms git build-essential
git clone https://github.com/jeremyb31/newbtfix-4.15.git
sudo dkms add ./newbtfix-4.15
sudo dkms install btusb/4.0

Check results for mokutil --sb-state if it says Secure Boot is enabled, then Secure Boot will need to be disabled when you reboot, if it says Secure Boot disabled, mokutil not installed, or system doesn't support EFI variables, just reboot


How do you make steam see my system as 64 bit system on PlayOnLinux?

When I installed it, I used the default Steam on PlayOnLinux, but this sets up a 32bit Wine for it.

Instead, when you use PlayOnLinux's "Install a program" feature, you have to click on the "Install non-listed program" and go through the entire setup.

When it asks you if you want 32 bit or 64 bit, select 64. Then when it asks you for the setup file, select the SteamSetup.exe file from the Steam website (for windows). Install everything and then check in the steam settings if you have a 64 bit windows system.


Partitioning my hard disk keeping everything and saving 20GB for Ubuntu:Possible?

Using Gparted always involves the possibility of losing all the data on that drive or partition. You wont harm the hardware of the drive with standard operations though. You should always back up your data before using Gparted

With Gparted you can just click the move/resize button with the partition you want selected. Then modify the before and after spaces next to the partition.

If it were me doing this, I would backup the partitions that you want to modify. Then format them and then just install everything from scratch. Resizing partitions is more complicated than its worth in my opinion.


As stated on NoMachine website version 3 it is no longer officialy provided and they link to some open source alternatives (FreeNX, NeatX, X2Go, 2X and Xpra).

If you really want 3.5, you can download it from Web Archive - choose DEB packages for Ubuntu. There are installation instructions under links, and here - https://help.ubuntu.com/community/NomachineNX

Keep in mind that 3.5 version is no longer supported and can contain security vulnerabilities.


How do I copy files from one system to another on the same computer

Boot the system you plan to keep.

For each of your partitions (16.04 & other-17.10) do the following

Mount your partition to a directory. A common mount point in /mnt but you can mount to any directory you want, but check you have nothing already mounted to /mnt, or subdirectories inside there. If you need help here look at Detect and mount devices
Copy the files to wherever you want them (I'd suggest cp -p or -p to preserve file attributes, but it's up to you). You could also just use mv to move which means the subsequent [diff] step needs to be skipped
eg. cp -prnv /mnt/username/* /home/username/ which will copy everything from your old username-dir to your new username-dir preserving file info, recursively doing subdirectories but only copying 'new' files only (I included this to avoid clobbering any config files in your 'new' directory; but its up to you!). if you don't want all your old-home directory; adjust as appropriate.
Diff the original with your new home-directory.  this is optional, and if you did the whole /home/username directory new 'config' files will of course show as errors. this step is easiest if you do subdirectories within /home/username, and not the whole user directory
unmount when you're happy, sudo umount /mnt (adjusting /mnt to whatever directory you used)

you can of course use your GUI if you prefer. mounting can be done with disks or other tools, and copying with a file manager (files etc).


permission denied on key while trying to change the swappiness- Ubuntu 12.10

You need to use sudo before your command.

sudo sysctl vm.swappiness=10

then type in your password


System identifies the dongle but doesn't let me connect to the internet

Try

./configure
make
make install

Might need sudo in there too.


Dual Monitor Configuration, Maximizing spreads between monitors

I switched to unity 2D and my monitors work the way I wanted in my question.

Both my monitors behave like 2 independent screens (Not like one Giant desktop). Dragging a window from one monitor to other automatically resizes the window to fit the resolution.


There are three steps to this process

Step One: Make your brother a member of your group.

Your group-name is same as your user-id. Say, if your user-ID is akumar your group name is also akumar. If your brother's ID is bkumar, then you want to make bkumar a member of the group akumar. See How to manage users and groups? for how to add your brother's user-ID to your group.

Step Two: Change the permission of the folder you want to share.

Open Nautilus. Right click on the folder you want to share. Go to permissions tab. look for the group permissions and change it into "Read and Write." Check the box for allowing the same permissions to the files and folders inside.

Step Three: Verify that your brother can create delete files in the shared folder.

Let your brother login to the computer. Open Nautilus. It will open to your brother's home folder. Navigate to your home folder and open the shared folder by:

click on Computer or System Files (depends on the version of Ubuntu) on the left panel.

Double click on home folder, double click on folder named akumar inside home.

Create a file in the folder. Delete the new file.

Step Four: (optional) Make a link of this folder to your brother's home folder.

while logged in as your brother, open another window of Nautilus next to the first one, by middle-click or Ctrl+Left click. In your own home folder where the shared folder resides, hold down Ctrl+Shift and drag the shared folder to your brother's home folder.

Hope this helps


Is there any child safety software for Ubuntu?

Filtering webpages can be done with dansguardian.

Time limiters I don't know any. But there are browserplugins which can do this, for example leechblock for firefox. If you limit access to other browsers on the computer it can be used.


How to make Live Server USB with updated package

Please check the Bionic daily iso files at the QA iso testing tracker. See this link with a live-server 'Subiquity' iso file from yesterday.

At that link there is also the old style server iso file with the classic Debian installer (from today) according to what I see right now. This iso file might also work for you.

If the Subiquity iso file is not updated with the bug-fixed installer today, maybe it will be there tomorrow.

Edit:

It seems that the links from the QA iso testing tracker to the [iso] files are broken. This link works for me,

http://cdimage.ubuntu.com/ubuntu-server/bionic/daily-live/pending/

to get the Subiquity server iso file.

The following link works to get the old style server iso file,

http://cdimage.ubuntu.com/ubuntu-server/bionic/daily/pending/

The daily iso files of the future version, now Cosmic, should not be recommended for a server (except for testing), but here we are talking about Bionic daily iso files, which belong to the released version 18.04 LTS (and will developed into the point releases 18.04.1 - 18.04.5 in due time). This development is slower and less prone to show-stopping bugs, so I think you can consider using them, at least until there is a released version, that works for you.

Edit:
An alternative approach.

If that approach doesn't work for you you can always manually customize the live iso to suit your needs. The package you desire is available in the repositories here


Do in terminal:

  sudo apt-get install libc6

If wouldn't help try this:

  sudo apt-get install '^libc6.*'


If your entire disk is already devoted to your windows partition, re-partitioning that drive is risky at best.  For me, the ideal way has always been to install side-by-side is to install windows first, but specify that the partition that is created only takes up half the drive or whatever.  Then when you install ubuntu, you install it in the unpartitioned space left over.

The safest thing if you're worried about your existing data and install, is to use Wubi.  This allows you to install ubuntu directly to your windows partition, but in a way that makes it look to Ubuntu that it's in its own partition.  It's pretty cool, but the drawback is supposedly that disk access would be slower, hence Ubuntu would appear slower.  Personally, I haven't noticed that much of a difference, but I'm sure it's there.

Either way, backups are highly recommended before you proceed.


It seems to be a conflict between indicator-multiload and indicator-sound-gtk2

indicator-sound is broken in XFCE, currently.
To fix this, you can edit /usr/share/dbus-1/services/indicator-sound.service

  sudo gedit /usr/share/dbus-1/services/indicator-sound.service

And change the content to this :

  [D-BUS Service]

  Name=com.canonical.indicator.sound

  #Exec=/usr/lib/x86_64-linux-gnu/indicator-sound/indicator-sound-service

  Exec=/bin/sh -c 'if [ -n "$(ps -U $USER | grep xfce4-panel)" ]; then
  /usr/lib/indicator-sound-gtk2/indicator-sound-service;else
  /usr/lib/x86_64-linux-gnu/indicator-sound/indicator-sound-service;fi'

This will load indicator-sound-gtk2 when using XFCE session, and use indicator-sound when another session (like Unity) is loaded.

I'm currently using Arch, but maybe this will help you :

As you can see, it works for me. But interresting fact : it's not named indicator-multiload but xfce4-systemload-plugin. I think this plugin comes with xfce4-goodies package.
That might be the indicator you'r looking for ?


Dual displays not working, white backgorund

I've had success solving a similar problem in the past doing the following.  First unplug the second display and run:

sudo aticonfig --initial

This will reinitialize your xorg.conf.  Now reboot your machine.  After the reboot, plug the second display back in, run

gksu amdcccle

and configure the displays how you like.  Note that if you run the Catalyst Control Center from the dash, it won't have root permissions and won't be able to save your configuration to xorg.conf.


You can't unless you find a MS Windows 9x GTK theme. While KDE can use GTK themes, GTK cannot use KDE themes.


Printing multiple pages per sheet doesn't work

Just guessing from sparse / generic information provided, there basically are two places/points worth looking into:

In "Printing" (configure printers, etc), check "page-per-sheet" settings there.
In Evince, again check "page-per-sheet" settings there.

Further, you may want to try printing from yet another application like *office or gedit (and browse their resp. printing options) for comparison and to confine/define the problem.

Good luck !
(with saving paper :)


on 20.04 after a recent upgrade I am unable to clear DNS cache

resolvectl flush-caches
It can depend if you are using systemd-network or network-manager.  It looks like your resolv.conf is pointed at 127.0.0.53, which is a loopback address that systemd-resolved binds to.  It maintains its own cache and can be controlled with resolvectl.  Using systemd-resolved is the default setup in 20.04 (if using systemd-networkd), but not previous LTS releases.
The upstream DNS servers could also have your result cached.  If you want to query a DNS server specifically, then you can use the command nslookup the-domain-name.org the-dns-server or dig the-domain-name.org @the-dns-server.  For example, to query Google's popular quad8 server, either of those commands works.
nslookup example.com 8.8.8.8
dig example.com @8.8.8.8


How to Lasso-select multiple files in Nautilus using the mouse in List-View?

I don't think this is possible because of the nature of this view.

However: to select multiple files I suggest you learn the Shift keyboard shortcut for selecting files "in a row" and Ctrl for selecting individual files "all over the place" as it were. You'll quickly pick these up.


get back command prompt after opening programs from terminal

There is no way to do what you are asking without patching either bash or every application you wish to give this behavior to. However if you want to put a program running on a terminal into the background (as though you had run it with & is to switch to the terminal it is running on, press CTRL-Z and then type bg. The first thing says to suspend execution of the process and the second says to restart it in the background.


evolution 3.16 cannot open encrypted office 365 message

Found a solution.

Export the user certificate from Windows / Outlook in .pfx format
Import the certificate in Evolution via Edit -> Preferences -> Certificates -> Import

The only drawback is that it will ask you for the certificate password every time you open Evolution.


Installing libfprint 0.99.0 using meson and ninja

First, install all the dependencies with the following command

sudo apt-get install gtk+-3.0 libglib2.0-dev libnss3-dev libpixman-1-dev libusb-1.0.0-dev libx11-dev libxv-dev pkg-config ninja-build

Later, move to the container directory, usually in  cd ~/libfprint

Although the installation is recommended in a non-isolated environment, it is more complicated. So once in the mentioned directory follow the next commands:

python3 -m venv venv
. venv/bin/activate
 pip install -U pip
 pip install meson

Once the isolated'environment was created is time to install the program. So the commands are as follow

venv/bin/meson builddir #After this line all dependencies should be in red YES
venv/bin/meson configure builddir -Ddoc=false -Dlibdir=lib
cd builddir
ninja
sudo ninja install

Finishing this, you must have the installation, to check out if it is working and if the installation is Home just go to the directory ~/libfprint/builddir/examples and execute sudo ./img_capture to register a fingerprint, or sudo ./verify to verify a registered fingerprint.

If you want to use your fingerprint to login into your system, then you need to enroll it to fprint-demo. To do so just execute sudo ./enroll considering you are in the last mentioned directory.

In case you haven't install fprint-demo just do sudo apt-get install fprint-demo and to run it a simply fprint_demo is enough.

Cheers.


Is there a way to replace Unity Dash with a classic style applications menu

You can always switch to the gnome desktop. Open a terminal and issue the following command.

sudo apt-get update; sudo apt-get install gnome-session-fallback

Logout and then back in, choosing Gnome. (You'll have to click the Ubuntu symbol next to your user name on the login screen to access the options for Gnome Metacity and Gnome Compiz).


How do I extract the value a script assigns to an environment variable, from outside the script?

You can use a single grep command for this.

This extracts the N from lines like export OMP_NUM_THREADS=N and prints them one per line, where N is a sequence of one or more decimal digits (0-9):

grep -hoP '^export OMP_NUM_THREADS=\K\d+' test1.sh test2.sh

This prints:

8
4

Caveats

You may notice this is somewhat similar to wjandrea's way. Like that solution, this will work provided that:

You know that the files are called test1.sh and test2.sh (or whatever their names actually are), so you can list the filenames in the command.
You either don't have to worry about the possibility of multiple matches per file, or you want them all.
It is acceptable that text to the right of the final digit is ignored, even if there is no space. This probably isn't a problem; presumably you have some control over these scripts (or someone you trust does) and they are not going to give non-numeric values to OMP_NUM_THREADS. However, one reasonable alternative is to use \b after \d+ to ensure the match appears on a word boundary (and not produce a result if it doesn't).

And like any solution that does not perform very sophisticated analysis (which is only sometimes possible), this assumes that:

You really are looking for that particular text; you do not need to actually parse the script and figure out how it will behave when it runs. If your goal is to find out what value of OMP_NUM_THREADS the script exports to its environment, this may or may not achieve that. It depends how the script is written. In particular, just because a line that matches the pattern appears in a script doesn't ensure the line is executed. The script that contains it could exit first; it could be controlled by if, case, or while/until; it could even be part of a larger command or comment if the preceding line ends with \. (This is not an exhaustive list.)
Note also that if a variable is exported, then later assigned without the export builtin, the new value becomes the exported value as well. export exports a variable and optionally assigns it, but really these are separate things--when you change the value, that applies to the exported variable. Similarly, it is possible for a script to remove variables from the environment after exporting them. (See this post by Nathan Long for details.)

What the command-line options -hoP do:

The -h flag keeps grep from printing the filename; without it, you get:

test1.sh:8
test2.sh:4

The -o flag prints only the matching text; without it you get the whole line:

export OMP_NUM_THREADS=8
export OMP_NUM_THREADS=4

The -P flag uses Perl Compatible Regular Expressions (PCRE). I use that regex dialect because it supports \K (see below).

What each part of the pattern ^export OMP_NUM_THREADS=\K\d+ does:

^ matches the beginning of the line. Remove it if you want export to be able to appear anywhere on the line.
export OMP_NUM_THREADS= matches itself literally.
\K discards the text that has been matched so far, so that it will not appear in the match.
\d+ matches any decimal digit (\d) one or more times (+). They don't have to be the same digit.

Extracting both values separately, in a third script.

You mentioned you plan to write a third script that uses these values. How best to do that cannot be fully answered, based on what you have asked so far. However, it is common to want to capture separate values into separate shell variables.

You can extract the value from test1.sh into the shell variable n1 and the value from test2.sh into the shell variable n2 like this:

#!/bin/sh

get_num_threads() {
    grep -oP '^export OMP_NUM_THREADS=\K\d+' "$1"
}

n1="$(get_num_threads test1.sh)"
n2="$(get_num_threads test2.sh)"

This uses command substitution to obtain the output of grep that would otherwise be written to stdout. Rather than writing the grep command twice or introducing a second step to process its output, I put it in a shell function. The function is called twice to assign n1 and n2; "$1" expands to test1.sh in the first call and test2.sh in the second.

You would put whatever code you want the script to run, that uses the values stored in n1 and n2, after the code shown above.

I left off the -h flag since, in this script, the get_num_threads shell function (which you can call pretty much whatever you like) is only being used to process one file at a time. You can keep the -h if you like, though.
If you want the script to run with a different shell than sh, change the #!/bin/sh hashbang line accordingly. If you just plan to source the script (. scriptname), you can remove it entirely; remember that whatever shell sources the script will get get_num_threads, n1, and n2 defined unless you subsequently undefine them.
As written, the script happily assigns multiple numbers to n1 or n2 if multiple matching lines exist in test1.sh or test2.sh, respectively. If this isn't what you want then you'll have to modify the script accordingly.

To illustrate the current behavior for multiple matching lines in the same file, considered what happens if you append the following printf command to the script so it prints each match surrounded by [ ] and separated by a blank line:

printf '[%s]\n\n' "$n1" "$n2"

Suppose test1.sh has one match (8) and test2.sh has two matches (4 and 5). Then you get:

[8]

[4
5]

This is to say that n2 contains both 4 and 5, separated by a newline, just as grep outputs them.


The preferred way would be

result=$(wget -qO- http://example.com)
echo "$result"

(lowercase variable name, $() instead of `` and quoted expansion of the result variable).

For shell scripting with bash and/or POSIX sh, http://mywiki.wooledge.org/BashGuide is the guide to read. And there's a lot more useful resources on that wiki, and on http://wiki.bash-hackers.org/. I'm afraid most other resources on shell scripting are garbage, so it's best to stick with those two.


PC no longer boots after partitioning second hard disk

It seems the boot order in your BIOS is "wrong", but it's not apparent because the boot loader skips unpartitioned media.

My BIOS setup offers a separate configuration option for the boot order of individual hard drives, which is sometimes messed up, after I (dis-)connect (non-boot) drives.


How to revert software sources back to default?

I don't think it has anything to do with the add-on but I had a similar problem. Somehow your sources.list is modified on line 2. Do this:

Make a copy of your sources.list, just in case you need to revert the changes:

sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup

Open the file with an editor, like:

gksu gedit /etc/apt/sources.list

In the second line you'll find the problem: That sentence:

See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to

has to be commented, otherwise the update manager will try to read it as a source and that's the error you are seing.

Simply add a # in front of that line. I should appear like this:

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to

If the problem persist, maybe because you have other lines with the same error, just correct'em all. But DON'T comment all the lines, first try to find which ones are wrong. Run update-manager each time and if there's an error it will tell you the line where it is.

Good luck!


How to install qtiplot on Ubuntu 20.04 Focal Fossa

Really you have a way to install the QtiPlot on the 20.04 LTS system.
You have to add special PPA with Qt4, download qtiplot package and some its dependencies from 18.04 LTS repository and install it.
Use the commands below:
sudo add-apt-repository ppa:rock-core/qt4
sudo apt-get update

cd ~/Downloads
wget http://archive.ubuntu.com/ubuntu/pool/universe/a/alglib/libalglib3.11_3.11.0-3_amd64.deb
sudo apt-get install ./libalglib3.11_3.11.0-3_amd64.deb

wget http://archive.ubuntu.com/ubuntu/pool/universe/q/qt-assistant-compat/libqtassistantclient4_4.6.3-7build1_amd64.deb
sudo apt-get install ./libqtassistantclient4_4.6.3-7build1_amd64.deb

wget http://archive.ubuntu.com/ubuntu/pool/universe/q/qtexengine/libqtexengine1_0.3-3_amd64.deb
sudo apt-get install ./libqtexengine1_0.3-3_amd64.deb

wget http://archive.ubuntu.com/ubuntu/pool/universe/q/qtiplot/qtiplot_0.9.8.9-17_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/q/qtiplot/qtiplot-doc_0.9.8.9-17_all.deb
sudo apt-get install ./qtiplot_0.9.8.9-17_amd64.deb ./qtiplot-doc_0.9.8.9-17_all.deb

and enjoy.


Untick "Display incoming events in the notifications area" in Preferences. I had the same issue as you, as soon as I changed that option and logged out/in I was able to approve the request =) Hope that helps!


I can't connect to internet without using my VPN with Ubuntu 16.04 LTS

Finally, it works with both:

First (https://askubuntu.com/a/164351/664380)

$ sudo mv /etc/resolv.conf /etc/backup.resolv.conf

Then, run (https://askubuntu.com/a/835198/664380)

$ ifconfig

and see the name of your network adapter. Mine is: enp0s31f6

now run this command

$ sudo nano /etc/network/interfaces

and you should get something inside....delete everything and paste this (but change the network adapter name where enp0s31f6 is):

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

# The primary network interface
auto enp0s31f6
iface enp0s31f6 inet dhcp

save the document and reboot...

In my case I had only in /etc/network/interfaces the three lines below

# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback

I had to add on top

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

and below:

# The primary network interface
auto enp0s31f6
iface enp0s31f6 inet dhcp


PowerPC packages don't show up on packages.ubuntu.com because PowerPC is not an official architecture.  You should look them up on launchpad.net instead where you will find them.

There are PowerPC meta packages for xubuntu-desktop and lubuntu-desktop. There are instructions on how to install these derivatives already in the FAQ.  I know this because i wrote the thing!!!!

The FAQ gives detailed instructions on how to install lubuntu/xubuntu from the minimal CDs plus it gives you the link to psychocats.net/ubuntu/xfce so that you could 'transform' Ubuntu into Xubuntu etc

PowerPC has exactly the same packages in the repos as other architectures with the exception of chromium/chrome and a few others.

Please read the PowerPC Known Issues page before upgrading to 11.10 because it is a known issue to be left at a BusyBox prompt in 11.10.