Vim periodically reverts to system version

This was caused by apt overriding my own version of Vim whenever I ran it. The solution was to use apt-mark hold vim to tell apt not to try to upgrade Vim.


This is normal - Ubuntu has this out of the box.

What you can do, is restrict access to the actual command that allows you editing network settings, the nm-connnection-editor.

Open terminal with Ctrl + alt + T, and enter the following commands:

ls -l $(sudo which nm-connection-editor) ; This will show current permissions for the nm-connection-editor

2.sudo chmod 700 $(sudo which nm-connection-editor) ; this will change the permissions

Repeat the command #1, to make sure you have changed the permissions. Now try editing the connections.

NOTE : in case you ever want to go back to editing , you will need to enter this command sudo chmod 755 $(sudo which nm-connection-editor) to make the editor accessible again


Nautilus bookmarks and smb shares work with non-root user

This is expected behaviour. Your root user doesn't have a full set of gnome settings and it would not be a good idea to have it automatically connect to smb shares. In that direction, madness.

The root nautilus is only intended for use with your system files. It's not intended that you use it for connecting to network shares or opening files using applications. Both of which offer huge security problems.


I can't upgrade to Raring Ringtail; is it because of the traffic?

run sudo do-release-upgrade another way that is not usually recommended is this:

`sudo sed -i "s/$(lsb_release -sc)/raring/" /etc/apt/sources.list{"",".d/*"};sudo apt-get update;sudo apt-get dist-upgrade`

the second one will also update any ppa you have, but if they don't have a raring version yet they will 404 error on you (eg getdeb)
If you have a nvidia gpu is highly recommend using this before rebooting:
https://github.com/GM-Script-Writer-62850/Ubuntu-Mainline-Kernel-Updater


How does one count the packages in Ubuntu's repositories from the command-line?

apt-cache has a function to list all packages

sudo apt-cache pkgnames | wc -l

returns 58218 packages with main, universe, multiverse, restricted and backports enabled on artful.


Failed to upgrade certbot on Ubuntu Bionic

Try with the following commands (replace -nginx with -apache if you need) to get the latest version of CertBot:

sudo apt update
sudo apt install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt update

If this is a new installation or it's not a problem to upgrade all packages on your system:

sudo apt install python-certbot python-certbot-nginx
sudo apt install python3-certbot python3-certbot-nginx
sudo apt upgrade

If you do not want to upgrade all packages in your system, then you can use:

sudo apt install --only-upgrade python-certbot python-certbot-nginx
sudo apt install --only-upgrade python3-certbot python3-certbot-nginx

References:

https://certbot.eff.org/lets-encrypt/ubuntubionic-nginx
https://certbot.eff.org/lets-encrypt/ubuntubionic-apache
certbot version updgrade not implemented

Reasons to update - from Let's Encrypt newsletter:

  TLS-SNI-01 validation is reaching end-of-life. It will stop working
  temporarily on February 13th, 2019, and permanently on March 13th,
  2019. Any certificates issued before then will continue to work for 90 days after their issuance date.

  You need to update your ACME client to use an alternative validation
  method (HTTP-01, DNS-01 or TLS-ALPN-01) before this date or your
  certificate renewals will break and existing certificates will start
  to expire.

  Our staging environment already has TLS-SNI-01 disabled, so if you'd
  like to test whether your system will work after February 13, you can
  run against staging: https://letsencrypt.org/docs/staging-environment/

  If you're a Certbot user, you can find more information here:
  https://community.letsencrypt.org/t/how-to-stop-using-tls-sni-01-with-certbot/83210

  Our forum has many threads on this topic. Please search to see if your
  question has been answered, then open a new thread if it has not:
  https://community.letsencrypt.org/

  For more information about the TLS-SNI-01 end-of-life please see our
  API announcement:
  https://community.letsencrypt.org/t/february-13-2019-end-of-life-for-all-tls-sni-01-validation-support/74209


17.10 How to remove painful screen tearing with Nvidia-Intel GPU

I found the solution to my problem HERE.

Don't worry if the file /etc/modprobe.d/zz-nvidia-modeset.conf is missing, just create it if it is.


You'll want to use the nvidia/cudagl:11.0-base image instead of nvidia/cuda:11.0-base to leverage NVIDIA's opengl support libraries.


I had the same problem. Almost took me a month to set it straight.
Mine is an ATHEROS AR5007EG.

First I tried ndisgtk (NDISWRAPPER), ... it worked but was very fuzzy. It used to show all available Wireless networks but connecting to it took a lot of time.

Growing tired of waiting I gave mad wifi a try. It worked ... the only downside was that it needs reinstallation for each kernel upgrade.

Here are the steps:

First and the most important bit is
undoing all that you have done so
far ... specially all blacklists you
have added.
Uninstall the mad wifi drivers
    already installed .. follow this
    link under the header "Removing
    old modules".
Once all modules are
    removed use this link to follow
    Dr. P.J. Kurian's method listed
    under the heading "Method Using madwifi and
    ath_pci" ... follow all the steps
    mentioned.

That should do it :)

The secret is being patient.

Hope this helps.


Start nagios web interface on a different port

I just worked on this, and figured it out.  It's not ideal for some, but for me it works perfect.  I just changed the default port apache2 looks at by :

Changing /etc/apache2/sites-available/default
First line ( Default )  :

 <VirtualHost *:80>

Changed to :

 <VirtualHost *:8085>  # Change 8085 to whatever port you want

then linking default in sites-enabled ( not sure if this site is needed, but it works )

 cd /etc/apache2/sites-enabled/
 ln -s ../sites-available/default default

then cycle apache2 by :

 sudo service apache2 restart

Then test it out!  This is what worked for me, hopefully it works for you.


Ubuntu unusable after trying to update to 16.04

You can revert your Xorg.conf (possibly under /etc/X11/) file to its previous state to use default nvidia driver & boot into it, then try using aptitude to see if you can get the package manager to a more stable state. Reverting is a vague term here. May mean using a backup copy of it if there's one, or just creating a new one (see the link in the update below).

Also, since aptitude works in console mode, you can try booting to console mode from grub to do the same, but you'll need to fix the Xorg.conf before you can get the xwindows.

update:

This answer is downgraded, possibly because there may not be an xorg.conf file. I thought since you tried to install non-default nvidia drivers, you may have ended up with an xorg.conf. Regardless, have a look at another answer for xorg.conf: Where is the X.org config file? How do I configure X there?

Remember, since you're mounting your linux partition from a live-cd, your root partition is mounted somewhere. If, for example it's /media/Linux, than you would be checking /media/Linux/etc/X11/ folder to find it, if it exists.


As per this answer: Can I use cron to chime at top of hour like a grandfather clock? you need to export an environment variable before playing sounds in your cron script:

export XDG_RUNTIME_DIR="/run/user/1000"

So rather than calling your music player directly, call a script name in crontab like this:

0 1,13 * * * /home/ME/bin/big-ben.sh /home/ME/bin/bigben/Clock_Chime_01.ogg >/dev/null 2>&1 # JOB_ID_75
    (... SNIP ...)
45 0-23 * * * /home/ME/bin/big-ben.sh /home/ME/bin/bigben/Clock_Chime_15-3.ogg >/dev/null 2>&1

Replace ME with your user name.
You had an error (the spaces after /bigben and before /Clock on in the last line of your crontab. I've fixed the error above.
You were using ~/ shortcut for /home/ME which cron doesn't like. Use full path names in cron.

Then create your /usr/local/bin/big-ben.sh script:

#!/bin/bash
export XDG_RUNTIME_DIR="/run/user/1000"
mplayer -really-quiet "$1" -volume 100

"$1" is the parameter 1 passed by crontab entry to your script

Remember to mark the script executable by using:

chmod a+x /usr/local/bin/big-ben.sh


Unable to unzip a file with the ubuntu terminal

As your zip file seems to be corrupt (zipfile corrupt), you can try to repair the file and then unzip the repaired file:

zip -FF corrupt.zip --out repaired.zip
unzip repaired.zip

Note that the corrupt parts might be missing.

from unzip manual:

-FF
   --fixfix
          Fix the zip archive. The -F option can be used if some portions of the archive are missing, but requires a reasonably intact central directory.  The input archive is scanned as usual, but zip
          will ignore some problems.  The resulting archive should be valid, but any inconsistent entries will be left out.

          When  doubled  as  in -FF, the archive is scanned from the beginning and zip scans for special signatures to identify the limits between the archive members. The single -F is more reliable if
          the archive is not too much damaged, so try this option first.

(via)


Every modern USB drive will work with Ubuntu, unless it is physically broken. You just need to connect it to you PC and format it. System will suggest the settings. After formating it will appear as external drive.


At the moment there is no realtime notification of file changes to cloud files. However, if you're happy to poll, you can retrieve the data for a directory with the cloud files API at https://one.ubuntu.com/developer/files/store_files/cloud. You can also retrieve the generation for a volume (a whole synced folder); any change to anything in that synced folder will increment the generation number, so it's the first thing to look at if you're polling.


Keeping monitor Dell desk monitor 'connected' to dell studio 15 laptop?

I'm assuming you're using the proprietary fglrx-driver supplied by AMD. Last time I checked it doesn't yet support Xrandr 1.2, which is the part of the display server that does the magic you're after (activate monitor automatically when connected).

You might want to try the open source radeon driver available, which is called xserver-xorg-video-radeon (find it through Synaptic). As stated here: http://wiki.x.org/wiki/RadeonFeature the R600-series (your HD 3450) should be working with xrandr1.2.

This will be a trade-off between performance and better multimonitor support. The situation is exactly the same for me with nvidia.


keyboard input meathods (ibus?) crashed, and icons randomly rearranging

IBus is an Intelligent Input Bus. It is a new input framework for the Linux OS. It provides full featured and user friendly input method user interface. It also may help developers to develop input method easily.

Check the version of ibus library on repository:

apt-cache show ibus|grep "Version:"

Probably the version of ibus should be 1.5.10 of the kernel 4.2 of Ubuntu 15.10 Wily Werewolf. In this case there is already a bug recognized for your issue, as described below:

IDEA-78860 Keyboard input sometimes is blocked when IBus is active

Solution:

Either upgrade IBus to version 1.5.11 or add export IBUS_ENABLE_SYNC_MODE=1 to your ~/.profile, then restart a session.

Alternatively, you can turn off IBus at System Settings | Language Support | Keyboard input method.


Use this:

so for your 400MB example, if the duration is 1 hour (3600 seconds):

x = 400MB*8192/3600 = 910 Kbps

Then you subtract 128Kbs for standard 128 Kbps audio (MP3/OGG/AAC whatever) and you are left with ~800 Kbps for your (hopefully x264) video


wlan0 does not appear in Ubuntu server and raspberry pi 4

I had the same problem with ubuntu 18.04.3 on a 3B+, but user chilli555 posted a link to this:

b43 Wireless Driver Problems in Ubuntu Server 18.04

and it worked for me, except that I had to replace the name of the wlan interface from wlp1s0 to wlan0.


How to configure zend framework 2 with vhost?

In the following file:

$ cat /etc/apache2/mods-available/rewrite.load

The line that enables mod_rewrite was commented. So I uncommented the line.

LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so

Then I ran the following command:
sudo a2enmod rewrite

I also got in slackware, was just uncomment this line in the httpd.conf file

LoadModule rewrite_module lib64/httpd/modules/mod_rewrite.so

So it was just restart apache:

apachectl restart


how to install AMD Catalyst or AMD Graphic Drivers and other drivers in Ubuntu 13.04

check: Is my ATI graphics card supported in Ubuntu?

or http://wiki.cchtml.com/index.php/Main_Page


Caps lock stopped working after an update

Had similar problems with a KDE VM that had been working for years, before a VMWare update, and after trying MANY possibilities within KDE, to no avail, turned off the VMWare's enhanced keyboard and everything returned to normal.


Followed the below links :

Unable to connect to detected wireless network while connects to wired

"Wired Network Disconnected" even when connected- no ethernet connection possible

Ubuntu 17.04 connected to wifi but can't browse internet

Was able to enable wired and wifi connection

Using Lubuntu 17.04, hence used leafpad instead of gedit
Also if you do not have permissions to make changes using GUI, use terminal
this might be of disabling prompt for credentials on log in

Thanks all for help


"GPG error: Release: The following signatures were invalid: BADSIG"

Try this:

sudo apt-get clean
sudo mv /var/lib/apt/lists /tmp
sudo mkdir -p /var/lib/apt/lists/partial
sudo apt-get clean
sudo apt-get update


Is it possible to change how Update Manager displays the updates?

Maybe you can:

1) alt+f2 and gconf-editor

2) Edit → Find: update-manager

Then changes sone option e.g. show_details, show_version,


How To Access Eclipse workspace remotely from Ubuntu?

If you want to get into a remote box the best method I know of is using SSH/SFTP.

Inside nautilus you can mount a drive as if it was a local drive and once you do that you could potentially open up an Eclipse project.

If it is on your local LAN you could maybe even do FTP instead since it would be faster, but I usually just stick with SFTP since it is fast enough for me when ever I need to work with a project even on a remote system several hundred miles away.

Here is a link on how to install an SSH server on what ever system is hosting the files.

http://tuxtweaks.com/2012/07/install-ssh-sftp-server-ubuntu-linux-mint/
Here is another tutorial
https://help.ubuntu.com/8.04/serverguide/openssh-server.html

Basically if you want a working default setup just use this command

sudo apt-get install openssh-server

and connect with

ssh usernameonremote@remoteIPAddress

The ip address should be the local LAN address if your working that way if not you might need to work with your router.

You can also now mount easily with nautilus if you open a nautilus window and click connect to server.

If you plan on running this all the time you might need to consult some security manuals.  I am not a security expert and I use this setup only locally.

Good luck, hope this helps.

UPDATE
If you want to edit something remotely with Eclipse that isn't really a Ubuntu/Linux question, but its easy enough to do from what I have read.  I don't personally use Eclipse for this because I prefer Netbeans.

Take a look at this https://stackoverflow.com/questions/4216822/work-on-a-remote-project-with-eclipse-via-ssh


"/proc/self" - Dynamically changing a soft link

/proc is a mount point for procfs (kind of tmpfs, lives in memory), which is an interface to the kernel's internal data structure. Whatever you see in /proc is directly populated by Linux and also maintained by the kernel itself.

/proc/self is a symlink to the /proc/<PID> directory, where <PID> is the Process ID of the process accessing /proc at that very instant. So while in bash if you do cd /proc/self, you will be cd-id into the /proc/<PID>/, where <PID> is the PID for that instance of bash, while if some other process, let's say for cat:

$ cat /proc/self/comm
cat

You should absolutely not change anything in /proc except if kernel provides some interface to change the values. For example, kernel provides the interface /proc/sys/ to change kernel parameters at runtime, although mostly you should use sysctl to change values under /proc/sys/ rather than directly editing any file. Mishandling of Kernel's internal data structure would result in an unusable system or even system crash.


Why are these directories called file systems?

The term "file system" has several meanings. When people talk about the file system names like ext4, UFS, NTFS etc. they have in mind the organization of data storage at low level (in terms of blocks on media). Such "file systems" usually requires driver to access data stored on media formatted with that file system. In the case of /proc, /usr, root file system or something file system simply refers to a directory structure.

Technically in Linux any directory can be a mount point for file system. This allows you to select the best type of file system (ext4, ufs, xfs etc.) for individual directories, depending on the nature of the stored information and security requirements.

I believe in your case those directories are called "file systems" because they are are often used as a mount point for individual file systems. /proc is always a mount point for the procfs pseudo-file system that presents information about processes and other system information in a hierarchical file-like structure.

There are a few directories which can be considered file systems: /dev, /sys and /tmp.


How to completely remove lamp server and phpmyadmin

To remove the LAMP stack :
1.sudo apt-get purge mysql-server apache2 php5
Note: This assumes you have no other programs that require any of these packages. You might wish to simulate this removal first, and only remove the packages that don't cause removal of something desired.

2.sudo apt-get purge apache2 apache2-mpm-prefork apache2-utils apache2.2-common libapache2-mod-php5 libapr1 libaprutil1 libdbd-mysql-perl libdbi-perl libmysqlclient15off libnet-daemon-perl libplrpc-perl libpq5 mysql-client-5.0 mysql-common mysql-server mysql-server-5.0 php5-common php5-mysql

And for fresh Installation below is the optimal method
Installing LAMP Stack


Many packages been uninstalled by mistake? How to recover Ubuntu

If you were running Ubuntu desktop, try to install the following package:

sudo apt-get install ubuntu-desktop


That post on Ubuntu Forums is over 4 years old - newer drivers have been released since then.

For Radeon drivers, this is my method.

Boot up and when the black screen appears, press some of the cursor keys and a box appears with an X server error.
Press CTRL + ALT + F1 to get a tty terminal.
Log in as root. The password is your own password that you set during installation.
Remove the Xorg drivers. apt-get remove --purge xserver-xorg-video-ati xserver-xorg-video-radeon
Reboot
Repeat steps 1-3
apt-get update
apt-get install fglrx-amdcccle-updates
aticonfig --initial

10.Reboot.


How can I upgrade from an older version of Ubuntu to a newer one

There is no direct upgrade path from 12.04 to 20.04.
It may be possible to do-release-upgrade from 12.04 to 14.04 to 16.04 to 18.04 to 20.04. However, best practice is to test each release --and fix the problems you discover-- before release-upgrading to the next release, so that might be many hours (perhaps days) of testing and troubleshooting and upgrading. Nobody has tested release-upgrading in series like that. If you feel like testing it, let us know what happened.
It seems unlikely that a dist-upgrade from 12.04 to 20.04 would work -- even if that method were supported (it's not). Many important components and default packages have changed. Again, nobody has tested it. If you feel like testing it, let us know what happened.
The only supported method is to back up your data and then clean-install Ubuntu 20.04. It's also likely to be the fastest and simplest method...even with the data backup/restore.


Ok, seems I was a bit too fast. I found a partial solution to the problem. Create a file check_tun0.sh and store it in /etc/NetworkManager/dispatcher.d. The script is run with root:root permissions.

The script:

#!/bin/sh
# use tail - /var/log/syslog in terminal to check if it is executed the four lines help you spot easily

logger -s XXXXXXXXXX
logger -s $1
logger -s $2
logger -s XXXXXXXXXX

if [ $2 = "vpn-down" ]
    then
# Stop downloads if vpn is down
    deluge-console "pause *; quit"
fi

Why aren't the commands executed, whereas they run fine in the terminal? I replaced the deluge-console commands with a killall deluged as an example and the script works. So obviously I can't run deluge-console commands in the script. Why is that? Also, do you have an idea to extend this to support resume of downloas as soon as tun0 is re-enabled?


Since you don't provide exact command that lead to this state, I can only think of a few possibilities:

You did not run this with root privileges (you need special privileges to access mentioned path /var/lib/dpkg and /var/lib/dokg/lock) - you can fix this by adding sudo before your command (like sudo any commands you wish and entering your accounts password when prompted.
Another program is currently accessing aforementioned directory (like opened package manager). You can just close it and thus unlock it.

Next time, please provide command that led to your behavior and Ubuntu version for good measure.


Ubuntu 14.04: How to send email without registering a domain or having an MX or A record?

You can use mail option from Linux command line. Default format is given below.

mail -s "Hello ASKUBUNTU" you@youremailid.com

To add content to the body of the mail while running the command you can use the following options. If you want to add text on your own:

echo "This will go into the body of the mail." | mail -s "Hello world" you@youremailid.com

And if you want mail to read the content from a file:

mail -s "Hello world" you@youremailid.com < /home/calvin/application.log

Some other useful options in the mail command are:

-s subject (The subject of the mail)

-c email-address (Mark a copy to this “email-address”, or CC)

-b email-address (Mark a blind carbon copy to this “email-address”, or BCC)
Here’s how you might use these options:

echo "Welcome to the world of Calvin n Hobbes" | mail -s "Hello world" calvin@cnh.com -c hobbes@cnh.com -b susie.derkins@cnh.com

To add attachments u can use the -a option in mail

mail -a /path/to/file.to.attach -s "Hello ASKUBUNTU" you@youremailid.com

Hope this helps.


Here is the description https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1548587/comments/18

Reboot your PC, hold shift while boot load and select previous kernel.
Last kernel seems broken


Tinkering with the rendering settings on the font tab of System>Preferences>Appearance should let you fine-tune the appearance. The hinting (instructions on how to best suggest the shape of the letters at low resolution) on some fonts doesn't work well with the default settings.

This Ubuntu Wiki entry has some explanation of font settigns in Ubuntu.


Unity uses a lot of CPU resources.  You may look to a method of removing Unity and using gnome.  Of course, if you remove a lot of the defaults of the distro you might lose some support for other functions that might be associated with the distro.

I understand a lot of public sentiment that lots of wasteful resources are built into the various OS' each day.  The developers try to make things convenient for the users and add features.  These features take up CPU cycles.  That's why XP was slower than Windows 3.1 and Windows 3.1 was slower than DOS.  Each generation required more resources from the computer.  If Windows XP could run on one of the earlier computers (a 286 for example) because of the CPU cycles, it would probably take nearly a year for it to boot up.  It would probably also take a week for a mouse movement position to be updated.

Please consider that hard drive space of a new computer is measured in 100's of gigs rather than 100's of megs as when XP was release.  Of course when DOS first came out the hard drive sizes were measured in Mbs (not 10's of Mbs).  Thge first hard drive I bought was actully 2 megs for two dollars.

The CPU speed of the computers running DOS were less than 1MHz.  The CPU speeds of computers today is measured in GHz... still in the single digits, but imagine what the applications will be doing when the hard drive space and speed is 1000 times what they are today and the CPU's are measured in triple digits of GHz.  The developers will add even more functionality that will take even more cycles.

I believe the best suggestion for you is to look for a Linux distribution that requires less resources and has less default functionality, or get a higher performance computer, or deal with the slower operation.

As computers develop in performance, the developers are going to put the CPU cycles to use... not only the developer for the OS, but the developers of each of the application that you load to the computer.

I understand my answer might not be the best and the most direct answer, but hopefully it might ease some of your aggravation and get you quicker to the resolution of changing distros if Ubuntu isn't for you.  Looking for an older version might cause you to lose support from the developers.

But you can always pick the oldest version of Ubuntu that is currently supported.  The performance would most likely be higher, because it'll actually do less in the background.


As the other suggestions, you need to fix your route first. If not sure which one is the IP of your router you can check that on your windows checking the networking details.
Try sudo to make sure you are running the ifconfig command with permissions.


Is it a good idea to install ubuntu server on Raspberry Pi Zero W?

It seems quite a simple task and I would guess the hardware can handle it.  However I would probably stick with a recent Raspbian (I guess they call it Raspberry Pi OS now?) unless you have lots of experience with running third-party OS's on the platform, or just want to learn how.  Most of the public info out there (and there is LOTS) assumes you're running some flavor of Raspbian.
I will tell you from experience that when the WiFi is doing lots of I/O, it eats the CPU (there is just one core) and the Zero will fall on its face pretty quickly.  They are great, as long as you don't ask too much of them...


The names are a combination of an adjective and an animal name with the same first letter. The names are alphabetical, so after Natty Narwhal (11.04) comes Oneiric Ocelot (11.10). After that comes P.P, which is scheduled for release in April 2012, and will therefore get the version number 12.04.

Since it is possible that a release has to be delayed, it is possible that the version number will change. The Dapper Drake, for instance, was initially scheduled for April 2006, but it had to be delayed two months, so it became 6.06 instead. In that way, it's nice to have alphabetical code names. Since 12.04 hasn't been given a name yet, some people are referring to it as "The P-cycle". The Ubuntu Developer Summits are also named like that: UDS-P for instance, is where planning of 12.04 will take place.

Mark Shuttleworth comes up with these names.


How can I get to any place in the file system in the graphical folder display?

The default file manager Nautilus supports Ctrl+L shortcut. That'll highlight the address bar, and you can type in destination you want, whether it's / or /usr or anything else. Hit enter to actually navigate there.

You can also type special destinations such as trash:///. Notice the tripple slash.

Note that ~ is property of command-line utilities ( aka shell ) and may not work in graphical file managers.


How to replace all images in Libreoffice with their description

This is a different way without using Macros. As .odt file is basically just zipped files and the main file is an XML.

Create a XML style sheet texmath_raw_equation.xslt

Full Contents are here, just in case link brakes.

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rpt="http://openoffice.org/2005/report" xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:grddl="http://www.w3.org/2003/g/data-view#" xmlns:officeooo="http://openoffice.org/2009/office" xmlns:tableooo="http://openoffice.org/2009/table" xmlns:drawooo="http://openoffice.org/2010/draw" xmlns:calcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0" xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0" xmlns:css3t="http://www.w3.org/TR/css3-text/" version="1.0">

    <xsl:template match="@* | node()">
      <xsl:copy>
        <xsl:apply-templates select="@* | node()"/>
      </xsl:copy>
    </xsl:template>

    <xsl:template match="draw:g">
        <xsl:value-of select="svg:desc"/>
    </xsl:template>

</xsl:stylesheet>

Extract .odt file to tmp folder, example texmath_test.odt:

7z x -otmp texmath_test.odt

Replace TexMath image (hold by <draw:g></draw:g> tag) with its description (hold by <svg:desc></svg:desc> tag)

xsltproc -o content.xml texmath_raw_equation.xslt tmp/content.xml
mv content.xml tmp/content.xml

Compress back to new .odt file

cd tmp
7z a -tzip ../texmath_test_new.odt *
cd ..
rm -r tmp

References:

XSLT transform replacing a tag that appears periodically through document
man xsltproc


Burned 16.04.3 LTS to a DVD and the touchpad is fully functional! Looks like 17.04 hasn't been given support for my device as of typing this.


Dual boot on two separate disc drives - prevent Linux from accessing Windows disc?

The only way to do this is to physically disconnect the Windows disk at the system.  There's no real way to prohibit accessing the Windows drive if the system can see it.
The other thing you could do is just not click the drive and mount it - Linux won't automount the drive unless you've configured it to, and without the drive being mounted Linux can't change the Windows files.


error trying to exec 'cc1': execvp: No such file or directory (possible SAGE/python issue)

How did you install sage? If you used the AIMS ppa, it looks like their sagemath-upstream-binary package doesn't include a cc1 for the packaged gcc - but the package sagemath-upstream-binary-full does –steeldriver

This comment was key. I uninstalled my version of SAGE and used the AIMS ppa with the package sagemath-upstream-binary-full. This fixed my CC1 issue.

An addendum: If you are here because of trouble with flagmatic, I was still receiving an error message about a failed cython compilation. In the file hypergraph_flag.pyx I changed line 38 from:

include "cdefs.pxi"

to

#include "cdefs.pxi"

Just in case you happened upon this thread specifically due to a flagmatic compilation error.


apt-cacher-ng: force client on local repository

Have you tried putting the acng service into offline mode?

After you've updated the dev server, add offlinemode:1 to the acng config file and restart the server. It can still serve the cached content but won't retrieve any newer packages over the Internet.


How do I open screen with many tabs to execute some commands within each one

slm already answered it over here thanks to him

How to open tabs windows in Gnu-screen & execute commands within each one


Install java in a linux server without admin rights

The location of the binary executables which you have to add to $PATH in your setup is

/home/my_user/programs/java/jre1.8.0_101/bin

(you forgot the /bin).

Additionally, you want your added location to have the highest priority (it must override the system's default location of java), so you need to swap the order of the directory and the old $PATH content.

Simply edit the line you added to your .bashrc file to:

export PATH=/home/my_user/programs/java/jre1.8.0_101/bin:$PATH

Don't forget to reload the .bashrc file by either closing and reopening the terminal or by running source .bashrc for the changes to take effect.


1. In the terminal, run the command:
sudo journalctl -f

Then launch the app from Activities.  Wait a minute without doing anything else, then close the app, and Ctrl+C to stop the journalctl.
2.  If that doesn't work, you might need to reinstall gnome-control-center.  Do so with:
sudo apt-get install --reinstall gnome-control-center

And then run it from the terminal, sudo gnome-control-center, or launch it from Activities.


This has been aswered a few times possibly, anyway something like this might help.


This problem was solved by the OP:

  Changing the USB-ports solved the problem. The modem has to be on the
  left port, the mouse on the right one. Don't ask why


How can I bulk-add a file's creation date to the filename?

You can use rename with a real Perl expression

$ rename 's/(\d+\.jpg)/use File::stat; sprintf("%s-%s", stat($&)->mtime, $1)/e' * -v
0000.jpg renamed as 1408057200-0000.jpg
0001.jpg renamed as 1408060861-0001.jpg
0002.jpg renamed as 1408064522-0002.jpg

That leaves the files with a time-since-epoch. Find for sorting, poor for reading.

The only problem here is you need to match the whole filename (so that you can stat $& —aka the entire match— inside the substitution). That could get a little tiresome with really complicated names.

We can build on that to have a more conventional date formatting:

$ rename 's/(\d+\.jpg)/use File::stat; use POSIX; sprintf("%s-%s", strftime("%Y%m%d-%H%M%S", localtime(stat($&)->mtime)), $1)/e' * -vn
0000.jpg renamed as 20140815-000000-0000.jpg
0001.jpg renamed as 20140815-010101-0001.jpg
0002.jpg renamed as 20140815-020202-0002.jpg


Kubuntu 16.04 Lost Dual Monitor Capability

I have a similar setup, different gpu version and using VGA and DVI. I am facing the same problem from the most recent update. I previously had both monitors working with the 4.4.0.22 kernel.

During startup see if there is a new kernel installed and try booting into an older one.

How to change kernel at boot

edit: also try this Dell 3543 Kubuntu 16.04 can't get output to 2nd monitor on HDMI i haven't had a chance to give this solution a go


Use dav_svn_module

Here is a sample conf, look to svn book to go deeper

LoadModule dav_svn_module /usr/lib/apache/mod_dav_svn.so
LoadModule authz_svn_module /usr/lib/apache/mod_authz_svn.so

<IfModule dav_svn_module>
<IfModule authz_svn_module>
<Location /svn>
    DAV svn
    SVNParentPath /svn

    AuthzSVNAccessFile /etc/apache2/svn_authz
    Satisfy Any
    Require valid-user
    AuthType Basic
    AuthName "Subversion repository"
    AuthUserFile /etc/apache2/svn_passwd
</Location>
</IfModule>
</IfModule>

An authz example:

cat /etc/apache2/dav_svn.authz

[groups]
admin      = foo
graph      = bar
developers = foo,baz

[/]
*           =
@admin      = rw
@developers = rw
@graph      = r

[/branches/prod/*]
*           =
@admin      = rw

[ZCS:/]
*           =
@admin      = rw
@developers = rw
@graph      = rw

[SYMFONY_PLUGINS:/]
*           =
@admin      = rw
@developers = rw

[SYMFONY:/]
*           =
@admin      = rw
@developers = rw


/dev/nvme0n1p1 780 M EFI System is required to boot in an (U)EFI system, whether Windows or Linux.  You must have it.

/dev/nvme0n1p2  5 G Microsoft reserved is a Windows Recovery partition. Once p4 is virtualized, you can eliminate it.

/dev/nvme0n1p3  415 G Linux filesystem That's Ubuntu OS and Ubuntu data.

/dev/nvme0n1p4 56.2G Microsoft basic data  This is the NTFS partition which contains the Windows OS and Windows data. This is the only thing you need to virtualize. You may wish to copy some of your data to your Ubuntu partition; documents and media files (music, movies, ebooks, and pictures) before you virtualize it, but that's a personal choice.


nope Alt+Tab won't work if you hold your left mouse button
instead try draging the file or folder on to the icon of the application present at the  left of the screen (if you are using unity)


After kernel update, stuck on purple screen but old kernel still works

Boot into the working kernel.

Then investigate which kernels you have installed by doing:

Kver=$( uname -r)
( dpkg -l linux-image\*; dpkg -l linux-doc\*;dpkg -l linux-headers\*) | egrep -v "$Kver"

This will produce a list of installed packages containing kernel-specific kernels, documents and headers, EXCLUDING the current, running kernel.

Select, from the list, the package names you want to delete, and use them as parameters to
    sudo apt-get purge <...>
to delete the packages cleanly.


Run script at user login as root, with a catch

Do not put the script in the user's home directory. Instead, put it in a fixed location. If the script needs some user-dependent arguments, make the script read that from a file — but you don't even need that since you're copying the script from /etc/skel anyway.

If you allow a user to run a script in their home directory with elevated privileges, then they can replace the script by another script. So your proposed rule would be equivalent from a security point of view to

ALL ALL=(ALL) NOPASSWD: /etc/skel/createSambaShare.php
MANY ALL=(ALL) NOPASSWD: ALL

where MANY is any user whose home directory is under /home/DOMAIN. (Ok, unless a user's home directory is owned by root, not writable to the user, and the script is not writable by or owned by the user either. But that would be pretty unusual.)

Also, I recommend not using ALL in a User specification. Restrict the rule to a group.

%sambasharers ALL=(ALL) NOPASSWD: /usr/local/bin/createSambaShare.php


Script to recursively grep data from certain files in the directory

There is at least one syntax error; you are missing a space before the ] of the if statement. The line should be

if [ -f "$dir"/sysconfig.out ] ;

Strange that your script does not report that. Do you run it from cron? Before you start your script automatically, first make it sure that it works correctly. Add echo statements to debug your program:

if [ -f "$dir/sysconfig.out" ] ; then
  echo "$dir/sysconfig.out present"
  echo running grep -A 1 "Drive Model" "$dir"/sysconfig.out
  grep -A 1 "Drive Model" "$dir"/sysconfig.out | tail -1 >> /home/xtee/sst-logs.out
else
  echo "$dir/sysconfig.out absent"
  echo running rep -m 1 "Physical memory size" "$dir"/node0/setupsys.out
  grep -m 1 "Physical memory size" "$dir"/node0/setupsys.out | tail -1 >> /home/xtee/sst-logs.out
fi


Troubles with Nexus 4 Ubuntu touch - Ubuntu 13.10 connection

For some reason for me it works for but only if a turn off the mtp sharing from nexus 4 itself while connected to my computer and then turn it back on again.

The first time I connect the nexus Nautilus shows a Nexus 4 device but no internal storage.  After restarting the mtp connection from the nexus itself, the internal storage is found and I can access everything.  I got Ubuntu 13.10


How To Disable Touchpad Running Ubuntu 12.04LTS On Dell Inspiron 1525

Actually, the best way I found is to open Terminal and type:

xinput list

Your touchpad should show up in there somewhere.  Make note of the touchpad's full name.  Then, in your Startup Applications, make a new entry and put in:

xinput set-prop "ETPS/2 Elantech Touchpad" "Device Enabled" 0

Where I have ETPS/2 Elantech Touchpad, put in the full name of your touchpad and save it.  Make sure the touchpad's name is wrapped in quotes.  Now every time you log into Ubuntu, the touchpad will be disabled.  You can uncheck it in Startup Applications to stop this behavior or run that command in terminal with a 1 instead of a 0 to enable it again.


how to prevent the computer from going into sleep mode when data is being read over ethernet?

This has been answered here...

Is there any way to make Ubuntu not to suspend while a download in progress?

Its a program I wrote to sort out the exact same problem and more.  In my case I was serving to Kodi and DLNA devices videos, pictures and music; also when doing backups to another server.

It also solves the problem of running a program unattended over a period of time.

Launchpad link here:

https://launchpad.net/keep.awake


Can you confirm that the answer was to use a 32-bit version of the Ubuntu Core VM on your 32-bit host Ubuntu? Would like to get this question answered in askubuntu, at the moment it's in limbo :)


1. Disabling lock screen

gsettings set org.gnome.desktop.lockdown disable-lock-screen true

2. Removing/ Hiding the "Power Off/ Logout" Text and Power Off Item

Install the extension  Bringout Submenu Gnome Extension  and compile the gschemas.. Then turn on the remove-power-button from dconf-editor or via gsettings

3. Connections/Network Settings

edit the extensions extension.js file.

gedit $HOME/.local/share/gnome-shell/extensions/BringOutSubmenuOfPowerOffLogoutButton@pratap.fastmail.fm/extensions.js

add the two lines in different positions without // as below

function enable() {
modifiedMenu = new _bringOut();
// Main.panel.statusArea.aggregateMenu.menu.box.remove_actor(Main.panel.statusArea.aggregateMenu._network.menu.actor)
}

function disable() {
modifiedMenu.destroy();
// Main.panel.statusArea.aggregateMenu.menu.box.insert_child_at_index(Main.panel.statusArea.aggregateMenu._network.menu.actor, 5)
}

you may need to change the position value 5 in the line number 119 If it sits at different position while disabling the extension. It does not matter if you do the gnome-shell refresh once you disable the extension.


You can reset the /home directory to a different disk by following the below steps.

Boot from a Live CD/USB. Click on try to enter a live session.
Open GParted and search your HDD from the list and format your to-be /home partition to EXT4
Open terminal and type in the below command

sudo blkid

This would list all the partitions in your system and you can note down the UUID of the partition which you want to assign as a /home directory
Open Nautilus and mount the partition which was your / partition in your initial setup. Lets say it got mounted at /media/<UUID>. Here <UUID> refers to the UUID of your / partition
Open terminal and make a copy of your fstab file

cp /mnt/<UUID>/etc/fstab /mnt/<UUID>/etc/fstab.bak

Now edit the fstab file by sudo nano /mnt/<UUID>/etc/fstab and search for the line where you have the UUID of your previous /home partition and replace it with the UUID of the current one.

Reboot system and you should be good to go.


With the comments already, something that you can try is to reinstall all vim packages that are installed already on your system.

Run the following command in a terminal window to reinstall all packages that vim has:

dpkg -l | grep vim | awk '{print $2}' | xargs sudo apt install --reinstall

Hope that helps!


What is the VESA:WRESTLER driver and why am I using it?

Wrestler is a code name AMD/ATI gave to that model. I found this wikipedia article that has loads of names.

fxglr is a display driver so a piece of software to drive your videocard. So something different ;)

  fglrx is the name of the Linux display driver used for ATI Radeon and ATI FireGL family of video adapters and stands for "FireGL and Radeon for X". It contains both free and open-source and proprietary parts. Starting from Catalyst 7.11, the ATI Proprietary Linux driver was renamed ATI Catalyst Linux.

So one (wrestler) is the name of a piece of hardware that the other one (fglrx) can use to use your display.

VESA is an organisation (Video Electronics Standards Association) and they define and create standards as their name implies.


GIMP tries to access a scanner each time GIMP gets started. How can I disable this?

Problem solved. When I start Gimp from the command-line, I get the message underneath:

bernard@Sable:~$ gimp
Gtk-Message: Failed to load module "overlay-scrollbar"
`menu_proxy_module_load': /usr/lib/gimp/2.0/plug-ins/iscan: undefined symbol: menu_proxy_module_load

(iscan:3947): Gtk-WARNING **: Failed to load type module: (null)

So at installation of the scanner a plug-in for Gimp was automatically created? I removed the link and now Gimp is starting up without accessing the scanner.


Prevent /usr/lib/xorg/Xorg from using GPU Memory in Ubuntu 20.04 Server

I have a setup with Nvidia 2080 GPU. I have observed that remoting into the machine via xrdp leads to a GPU use of only 14 Mb. If a physical screen is connected, it consumes the memory as per the screenshot posted above.
Edit: Even chrome remote desktop leads to xorg consuming just 14 Mb of GPU RAM


How to open OneDrive documents in Windows 10 partition from Ubuntu 18.04

Using OneDrive in Ubuntu

If you have not synced your OneDrive folder to Disk, the data only exists on the cloud.

What worked for me:

https://onedrive.live.com/about/signin/
Sign in using the same info as in Windows 10.

The OneDrive folder you see in Windows 10, (Users/username/OneDrive), looks like it contains files and folders but likely just contains links to your data on the Microsoft cloud.


MongoDB - Failed to unlink socket Fatal Assertion

This is most likely your problem:

NonExistentPath: Data directory /data/db not found., terminating

Your configuration points to a data directory (/data/db) which does not exist.
Either create this directory or edit your configuration to a valid data directory.


Can't Install Ubuntu 16.04 on Toshiba Satellite c600 laptop

This is a hardware issue, most likely. I would make sure the memory is correctly slotted. Try removing it and putting it back in-place just to be suer. If the laptop does this behaviour when you don't try to boot of a live USB or CD, then then next logical culprit in that the CPU is reaching the maximum heat threshold and aborting boot (safety feature).

Try the following:

Clean the computer. Make sure the CUP Cooling is taking air good and that it's not full of dust.
Try to boot only into the BIOS. This will let you run a memory test, which you can probably get away without doing. But more importantly you should comb thought the settings and turn off anything like secure boot.

Also it can't hurt to make edit your boot order so that the computer tries to boot from the CD or USB first before the hard-drive. This just makes think a little easer for you when you go to install Ubuntu. This will be good to check so that you can see if there are any weird boot options enabled as first priority. While normally you can get away with non ideal boot sequence, since your having problem it's best to have all your bases covered.

Finally, you might just have a bad computer. If you try all above and your still having the same problem then you may want to take the computer to a technician that can accentually replace components soldered to the motherboard. But at that point, given the cost of the work and that it's an older computer this might be the end of it's life.

Since the computer is older, and you didn't say that is wasn't abnormal behaviour for it, it sounds like you haven't been using this machine too much lately. Because you haven't used this computer in while and it's not getting far into the boot, I'm willing to bet it's the CPU overhearing and shutting down as a safety feature.


How to start a new app in a new workspace on Xubuntu 16.04

I haven't implemented this particular application, but it looks like xdotool will do what you want.

Try launching your application with a wrapper script something like:

desktops=$(xdotool get_num_desktops)
desktops="$desktops"+1
xdotool set_num_desktops "$desktops"
xdotool set_desktop "$desktops"
run-my-application

I left out some details which are needed to make this more robust as they will vary a bit depending on what you are doing and would obscure the main idea:

Each xdotool command returns a status which you should check. If a step fails, you don't want to proceed blindly.

You may want to set a maximum number of desktops which your script can create.

xdotool can see if a window already exists and what desktop it is currently on. It can also move a window to another desktop. It can also activate a window, bringing it to the foreground and into focus.

You may need to add sleep commands after certain operations to give the desktop and especially applications time to do their thing before you run the next step.

Since your script may be run from the desktop (and not just from a terminal), you may also want to log some messages to a file telling you what the script did to make debugging it easier.

The part where it gets a bit tricky is when an application has more than one window open. Then, you have to deal with a stack of instances and somehow find the right one or work on all of them. For instance, my Thunderbird asks for a master password when it starts, so it has two windows open.

xdotool also offers command chaining where you can run multiple actions from one xdotool command. The results of the current action get pushed onto a stack read by the next action in the command. I have found this difficult to visualize and debug, but it's quite powerful if you can get it to work.

While xdotool is the best fit for this particular issue, you may also want to take a look at AutoKey which can help you automate all sorts of desktop/GUI actions by issuing keypresses and mouse events that look just like you were doing them manually so they will work on most application and desktop features.


Hello and welcome to Ubuntu.SE!

Here is a proposal using ImageMagick

You can use ImageMagick for that task:
http://www.imagemagick.org/script/command-line-options.php

Example

Here is a 40x30 pixels original image (file size of 1367 bytes) with a resolution of 72 PPI (in both X and Y directions):

You can change its resolution using the following command:

convert -units PixelsPerInch my_original_image.jpg -density 300 my_new_image.jpg

This is the result of the previous command:

X Resolution 300 PPI
Y Resolution 300 PPI
Image Size 40x30 pixels
File Size 981 bytes

Or if you need resampling:

convert -units PixelsPerInch my_original_image.jpg -resample 300 my_new_image.jpg

Which gives:

X Resolution 300 PPI
Y Resolution 300 PPI
Image Size 167x125 px
File Size 7.7 kB

Don't hesitate to open these images with Gimp for example to see the differences.

Source

https://www.imagemagick.org/discourse-server/viewtopic.php?t=18241

More information

https://medium.com/@onlinelogomaker/what-is-the-difference-between-dpi-ppi-resolution-and-image-size-b42328e7ed22
https://en.wikipedia.org/wiki/Image_resolution


How to uninstall *old* versions of LibreOffice (6.2, 6.3...) not in Software Center?

I would avoid any wildcards in apt commands unless absolutely necessary. In your case I'd opt for listing what is installed (dpkg -l) and just remove those specific packages thus avoiding all complications from the use of wildcards.  FYI: Lubuntu is no different to any other Ubuntu (or flavor) for the 18.04 in this regard.

Package managers are an easier bet though; as they list all packages and not just 'selected' ones like Software Centre.  synaptic is installed by a default Lubuntu 18.04 LTS installation (https://packages.ubuntu.com/bionic/lubuntu-desktop) and is another option, though there there are many others too.

Also please note I booted a very recent QA-test install of Lubuntu 18.04.4 (for the picture), and no LibreOffice packages are installed by default (see prior list of packages installed) so none were found.  Your packages may have been installed manually, thus removing them will depend on how you installed them, thus prior details could differ if you installed flatpak, snap etc.

Lubuntu 18.04 LTS comes with abiword and gnumeric only by default, not LibreOffice.


How can I copy the contents of a child folder to its parent folder using command line?

If you want to copy all content then run the command below

cp path-of-child-folder/* path-of-parent-folder

If particular content then run the command

cp path-of-child-folder/content path-of-parent-folder


Press the windows key than type in steam and it should show up. This might help you with future questions.


I don't think it is possible to disable the reflection in Docky. However, Docky has been (for all intents and purposes) replaced by Plank, which is created by the original developer of the Docky Dock.

Here's how to install it:

sudo add-apt-repository ppa:ricotz/docky
sudo apt-get update
sudo apt-get install plank

Source: here.


Can't resolve windows domains in local network

Change hosts line:

hosts:          files dns mdns4_minimal [NOTFOUND=return] mdns4

.local is used by mDNS (Avahi), dns should comes first.

See http://www.lowlevelmanager.com/2011/09/fix-linux-dns-issues-with-local.html


I have Zoom 5.1.422789.0705 on Ubuntu 20.04. I have times when Zoom locks up and sends an "unstable internet connection" message on my monitor. The thing is that when I test my internet speed my connection is good. My conclusion is that Zoom will lock up if OTHER connections are bad on a conference call. Meaning that the problem is not necessarily on your computer (other than the incorrect message about unstable connections).
The other thing is that Zoom seems to work better if the window is small (not full screen).


How to list the files and folders inside a partition

After you mounted /dev/sdb1 on /mnt,  you must check the existence of the file inside /mnt

ls /mnt


Where does Nautilus-actions configuration tool save actions?

According to the source code, it uses GConf to store configuration. Gconf can be manipulated from the command line using gconftool-2 but you do need to understand the schema because gconftool is pretty low-level and can't ensure that your changes are correct or consistent.

You might find it easier to use the nautilus action configuration tool to change an action and gconftool to see what gets changed than to make sense of the schema description directly.


Is there a difference between Ubuntu Gnome-shell and Fedora Gnome-shell?

both are same but i feel it's my personal perspective it may be wrong but the gnome shell in ubuntu is more beautiful than in fedora , The fonts look rather blurred overall, not helped by the low-contrast theme. Then, you also get icons that are rendered with low quality, making the product feel cheap. i love ubuntu and with gnome 3 shell it is the best one


First, follow the steps here and here to set up your puppetmaster and agents.

Add the following lines to your /etc/puppet/puppet.conf under the [master] header.

storeconfigs = true
dbadapter = sqlite3

Now, install rails with

sudo apt-get install rails

And then restart your puppetmaster with

sudo service puppetmaster restart

Now, you should be set to use storeconfigs.


How can I get avahi-autoipd to get an address on an alias, regardless of the state of the interface?

I looked at the ifupdown source and definition file and the ipv4ll interface type is just a manual up/down wrapper.  You can configure an avahi-autoipd interface in /etc/network/interfaces as a manual type:

auto eth0:0
iface eth0:0 inet manual
  up avahi-autoipd -D --force-bind eth0:0
  down avahi-autoipd -k eth0:0

If you have eth0 configured for dhcp then you also need to comment out the line in /etc/dhcp/dhclient-enter-hooks.d/avahi-autoipd that causes the avahi interface to be killed off when dhcp configures itself.  Once you do these things then you will be able to use an eth0 and eth0:0 (which gets renamed to eth0:avahi after you ifup eth0:0, oddly).


Ubuntu 11.10 cannot connect to projector

I had a similar problem with my Lenovo E535 running 12.04.
I am used to the function keys swapping out the display selection.

If you go to System Settings | Displays the secondary monitor comes up and you can configure the settings.

It wasn't as convenient at flipping the "F8" key but it worked.


Entering keys doesn't work on 18.04 with gnome-tweaks

I'm answering my own question, but only to document the solution that worked.

It turned out, gnome-tweaks was not at fault here. The culprit was the lack of a Keyboard input method system in Language Support.

After picking one from the dropdown list the character entry method (as described in the question) works. For reference, Compose Key is disabled in my gnome-tweaks installation.


You can get a lot of cool information by poking around /sys. /sys/class has entries for every class of device your linux install is equipped to handle. The driver info is found at this path:

$ ls /sys/class/net/wlan0/device/driver/module/drivers
pci:ath5k@

My wifi card, named wlan0, is using the ath5k driver. Here's the driver info for one of my ethernet cards:

$ ls /sys/class/net/eth1/device/driver/module/drivers
pci:forcedeth@

As an aside, Ubuntu (like most linux distros) includes device drivers as kernel modules. The kernel is the big piece of software that runs your computer hardware. Ubuntu loads modules for your hardware based on what it senses you have. You can get a list of loaded modules by running this command: lsmod. Here's a snippet of my lsmod output:

bluetooth             130968  0
ath5k                 127724  0
ath                    11990  1 ath5k
eeepc_laptop           12412  0
sparse_keymap           2660  1 eeepc_laptop
mac80211              196283  1 ath5k
pci_hotplug            22072  1 eeepc_laptop
cfg80211              142540  3 ath5k,ath,mac80211
rfkill                 12470  3 bluetooth,eeepc_laptop,cfg80211
crc16                   1091  2 bluetooth,ext4

The left column is a list of loaded modules, the right-most column shows what modules they in turn use. As you can see, these all use or are related to the ath5k module.


Disabling gvfs directory monitoring on specific share

I was suffering from the same problem, did try changing GVFS enviroment variables and related dconf keys, but didn't get any good results, so decided to look at the source code. I found the next code in the daemon/gvfsbackendnetwork.c file:

g_warning ("Couldn't create directory monitor on %s. Error: %s\n",
                   uri, error ? error->message : "");

...which is producing the warning described in the question. Btw, there are 2 places in that file with same warning in Ubuntu GVFS sources, while in GNOME.org's git 1 of the entries is actually g_debug, not g_warning. I decided to change both g_warning calls in Ubuntu version to the g_debug just because that would be smallest patch to clean out the syslog of these noisy warnings.

To reproduce next steps, you have to enable source code repositories first. Then run described commands in the system Terminal (aka bash, sh):

# install build tools
sudo apt-get install build-essential devscripts fakeroot
# install gvfs build dependencies
sudo apt-get build-dep gvfs

# create temporary directory for the source code and get it via apt
mkdir ~/src; cd ~/src
apt-get source gvfs

# at the moment I've got gvfs-1.28.2 @ Ubuntu 16.04, update the path if you've got another version
# check g_warning entries to be sure what we're editing:
cat ~/src/gvfs-1.28.2/daemon/gvfsbackendnetwork.c | grep g_warning

  g_warning ("Couldn't create directory monitor on %s. Error: %s",

  g_warning ("Couldn't create directory monitor on %s. Error: %s",

# replace g_warning to g_debug as described way above
sed --in-place "s/g_warning/g_debug/g" ~/src/gvfs-1.28.2/daemon/gvfsbackendnetwork.c

# go to the source directory root
cd ~/src/gvfs-1.28.2
# bump version, edit changelog if needed, then save the file
dch -i

That will look something like:

  gvfs (1.28.2-1ubuntu1~16.04.2ubuntu1) UNRELEASED; urgency=medium

  Keep syslog clean of the non-disableable warnings by turning them
  into a debug messages.

  -- Habetdin  Fri, 21 Dec 2018 20:00:00 +0300

# finally, build the .deb packages
debuild -b -us -uc
# one level up from the source root - to the compiled .deb packages
cd ..
# install them all
sudo dpkg -i *.deb

As a last note, description of debuild parameters I've got with man dpkg-buildpackage:

  -b     Specifies  a binary-only build, no source files are to be built and/or distributed.

  -us    Do not sign the source package.

  -uc    Do not sign the .changes file.

This is little bit dirty way to solve the problem, but I didn't find suitable built-in solution, so for now this is the only way I found to practically clean out the syslog.


It might just be a typo if you copied by hand but the line in /etc/NetworkManager/NetworkManager.conf should be dns=dnsmasq not dns=dnqsmasq that you have reported.

Your /etc/resolv.conf file is missing a nameserver line

echo "nameserver 127.0.1.1" | sudo tee -a /etc/resolv.conf

Then reboot


Why is using the '-execdir' action insecure for directory which is in the PATH?

You could run the wrong program. Someone could make you run their program.

The -execdir action runs your command from the directory that contains the file(s) found. When $PATH contains relative paths, such as . or anything that doesn't start with /, -execdir is insecure because a directory where a file is found (or another directory resolved relative to it) could also contain an executable of the same name as the one you are trying to run. That potentially untrusted executable would then get run instead.

This could be deliberately exploited by another user to cause you to run their program, which might cause harm or breach data security, instead of the program you are trying to run. Or, less often, it might simply result in the wrong program inadvertently being run, even without anyone trying to make the problem happen.

If everything in your PATH environment variable is an absolute path, this error should not occur, even if the directory you're searching and -execdiring from is contained in PATH. (I've checked that this works.) If you believe you don't have any relative directories in $PATH but are still getting this error, please update your question with details including the output of echo "$PATH".

A concrete example.

As an example of what could go wrong, suppose:

Alice has . in her $PATH because she wants to be able to run programs in whatever directory she's cd'd to, without bothering to prepend their names with ./.
Alice's frenemy Eve has shared /home/eve/shared with Alice.
Alice wants statistics (lines, words, bytes) on the .c files Eve has shared with her.

So Alice runs:

find ~eve/shared -name \*.c -execdir wc {} \;

Unfortunately for Alice, Eve has created her own script, named it wc, set it executable (chmod +x), and placed it clandestinely in one of the directories under /home/eve/shared. Eve's script looks like this:

#!/bin/sh
/usr/bin/wc "$@"
do_evil    # Eve replaces this command with whatver evil she wishes to do

So when Alice uses find with -execdir to run wc on the files Eve has shared, and it gets to files in the same directory as Eve's custom wc script, Eve's wc runs--with all of Alice's privileges!

(Being crafty, Eve has made her wc script act as a wrapper for the system wc, so Alice won't even know something has gone wrong, i.e., that do_evil was run. However, simpler--and also more sophisticated--variations are possible.)

How find prevents this.

find prevents this security problem from happening by refusing to take the -execdir action when $PATH contains a relative directory.

find offers two diagnostic messages depending on the specific situation.

If . is in $PATH, then (as you've seen) it says:

find: The current directory is included in the PATH environment variable, which is insecure in combination with the -execdir action of find.  Please remove the current directory from your $PATH (that is, remove "." or leading or trailing colons)

It probably has a special message for the . case as it's especially common.
If a relative path other than .--say, foo--appears in $PATH and you run find with -execdir, it says:

find: The relative path `foo' is included in the PATH environment variable, which is insecure in combination with the -execdir action of find.  Please remove that entry from $PATH

It's better not to have relative paths in $PATH at all.

The risk of having . or other relative paths in $PATH is especially heightened when using a utility that automatically changes the directory, which is why find won't let you use -execdir in this situation.

But having relative paths, especially ., in your $PATH is inherently risky and is really best avoided anyway. Consider the fictional situation in the example above. Suppose instead of running find, Alice simply cds to ~eve/shared/blah and runs wc *.c. If blah contains Eve's wc script, do_evil runs as Alice.


"Unable to copy the user's Xauthorization file"

Please check the permission, user name and user group of .Xauthority

ls -la ~/.Xauthority

It needs to be owned by you and the permissions should be -rw-------
To alter name and group:

sudo chown youruser:youruser ~/.Xauthority

To alter persmission to -rw-------
chmod u+rw ~/.Xauthority

(Replace youruser by your username.)

If this is the cause: Did you install anything prior to this package or issue sudo commands? There are some things in the past that I saw messing up the permission for this file. Notably things like samba, sudo ssh.


Full-screen problems with LibreOffice/Unity

LibreOffice has issues going into fullscreen in Unity. The launchpad bug #768966 regarding this issue has a good work around from Daniel Centore:

"Install compiz-plugins-extra and compizconfig-settings-manager. Open ccsm and go to "Extra WM Actions." Map Toggle Fullscreen to something you will remember and use it to bring a program into fullscreen with Unity (I use SUPER+G)"


How to detect Creative Sound blaster Audigy 2?

See https://wiki.ubuntu.com/DebuggingSoundProblems for the troubleshooting steps. These steps include actions to retrieve information that describe your sound hardware in detail.


How can i export Skype Chat history to a text file or other readable file in Ubuntu 13.04

You should be able to do the following:

Right click in a chat window → Select All or Ctrl+A
Press Ctrl+C to copy.
Paste it into a file of your choice.

The output will be something like this:

[7:39:36 AM] destiny: pingu pingu
[7:39:46 AM] name: pingu to you as well
[7:39:54 AM] destiny: pingu to everyone
[7:39:55 AM] destiny: i see
[7:40:02 AM] destiny: so pingu to u
[7:40:12 AM] name: ok...?
[7:40:19 AM] destiny: :D
[7:41:08 AM] destiny: pingu 1234


Zim

Zim is a similar note taking application with wiki like features. Zim supports rich text formatting, links between notes and to external resources, inline images and even LaTeX equations. It has a familiar 'notebook' layout with tabs.
Here is a quick screenshot demonstrating some of the features:

Zim is extendible using plugins - such as the LaTeX plugin. There are lots more. Here is the list of default plugins (you may need to install dependencies of some):

Calendar
Create Note (from command line for keyboard shortcuts etc.)
Diagram Editor (using graphviz)
Equation Editor (using LaTeX)
GNU R Plot Editor
Insert Screenshot (using scrot)
Insert Symbol
Link Map (using graphviz)
Spell Checker
Task List
Tray Icon (actually an application indicator)
Version Control (using bzr - this should make synchronisation and back up really easy)

The only feature it seems to be missing is Ubuntu One synchronisation like with Tomboy, however, if you use the default Notes directory (~/Notes), you can synchronise this over Ubuntu One, as your notes as held in files in this folder.


Well, there is this MoviX GNU/Linux distribution, which is a few megabyte big and you are supposed to burn it onta CD or DVD together with some media files. When booting it would simply play the media files from the live medium and spare you the hassle of making sure the buddys to which you hand a movie CD have appropriate media codecs installed.

Other than that... well in a distribution without a package manager you are normally supposed to compile mplayer or VLC or whatever you like on your own.

You can use a normal desktop system to compile any of those media players using the -static flag. This allows you to copy the resulting program to any system, where needed libraries are not installed.

I'm not aware of any project which offeres precompiled statical binaries of media players nor am I aware of any GNU/Linux media player with a windows-style binary installer.


Since I've moved to the GNOME Shell, is it safe to remove compiz?

Yes, it should be. To be on the safe side, run a simulation first with

sudo apt-get -s remove compiz*

-s is there for simulation, so that nothing is really removed.

If the list of the 'to be removed' packages looks reasonable, run the above command without -s.


apt-get upgrade stuck on postgresql dependency

I experienced this same problem with this postgresql update.

The newest version of postgres is 9.1.7, for some reason 9.1.6 is not in the repository, so here is how I downgraded to 9.1.5:

sudo apt-get -V install postgresql-client-9.1=9.1.5-0ubuntu12.04
sudo apt-get -V install postgresql-9.1=9.1.5-0ubuntu12.04

Note that I downgraded to client first.  It appears there is a bug in the latest update, which causes a dependency error between the client and the server.

edit:
If you want to prevent postgresql from upgrading in the future see this page:
https://help.ubuntu.com/community/PinningHowto.  Be sure to apply this method to both the client and the server.


Better late than never I hope. I suggest FreeCAD, available in the Ubuntu repositories. It offers a lot more features than HeeksCAD, and is a more active project.

v0.13 will be published soon (no date is set, should be in the coming weeks) with a ton more features, a stable PPA repo will be available to update FreeCAD.

Although if what you want is the CNC component in HeeksCAD, then you're out of luck, FreeCAD does not offers this functionality yet.

Disclosure: I'm contributing to the FreeCAD project. :-)


Booting from USB inside VMware Workstation

Vmware BIOS doesn't support that feature but you can do a bridge to support this feature, the explanation here


Is it possible to use the Greek keyboard layout in Scribus?

I'm pretty sure that Scribus does work with the Greek keyboard layout.
(But I cannot test, since I don't have the keyboard layout installed and cannot write Greek...)

Luckily, in a side note, you describe your issue as: "it stays blank". In that case, I guess that the default font (or the font you have picked does not contain the Greek glyphs (letters).
Can you try with a different font?
If possible, a boring one with lot of glyphs...

And if you only need a lambda (or single "scientific" letters from the Greek alphabet) you can always use "insert > glyph"...
(you can create a set of often used letters in there...)

In your coments below you have now specified the font you are using and I got tempted to try it out.
(The hardest part being: find out how to switch keyboard when you have no Desktop Environment...)

I have a Debian Testing system with the current stable release of Scribus and this is the result:

This should be pretty close to what should be able to achieve with Ubuntu.

My conclusion: Scribus does work with a Greek font...
With the information you have currently provided, I don't see a reason why it should not work on your system, too.
So, you need to provide further information, or try to get it to work with the mindset that on the Scribus side everything is fine (sometimes, when one has doubts about the outcome, some small "errors" sneak in...).

Just one more information from my side: I've switched the keyboard layout with setxkbmap -layout gr: You might want to try this, in the case your keyboard layout manager does not work well with Scribus...


Can app developers indicate folders to be excluded from Déjà Dup?

Déjà Dup will ignore any files in ~/.cache.  So if you're asking because you have cache files, put them in ~/.cache/program-name/.  See the XDG basedir spec for more information.

You could also forcibly add folders to the user's exclude-list key in the org.gnome.DejaDup gsettings schema.  That's not very user-friendly (that key is designed only for users to modify), but it's a last resort.


Ubuntu 12.04 boots into black blank screen

I was able to resolve this issue after a few hours of battling it. It was unfortunate that so many seemingly related questions were caused by something else, so it took some guessing and trial and error to get it working.

First of all, I gather that the issue was that grub was failing to load /vmlinuz or /initrd.img and crashing before anything got to the screen. I believe that running apt-get upgrade at some point had updated the kernel and had not updated grub's settings.

What worked for me:

I booted off an ubuntu server 12.04 live CD and went into "Rescue a broken system". From there I went and selected "assemble raid array automatically", selected my root partition (the raid e.g. /dev/md0) and chose to go on a chroot shell on that directory.

From the shell I had to:

Regenerate mdadm's config: mdadm --detail --scan > /etc/mdadm/mdadm.conf
re-install grub:

grub-install /dev/sda
grub-install /dev/sdb

Update grub: update-grub
Update initramfs: update-initramfs    <--- I believe this was the crucial part.

I then restarted the system and boom. Good to go.

P.S. This other question had some important background information that helped me. I did the kernel re-install bit from there, but it didn't work as that was not the problem.


I figured it out. I changed the openssl generation command from:

openssl req -x509 -nodes -days 720 -newkey rsa:2048 -keyout /etc/vsftpd/vsftpd.pem -out /etc/vsftpd/vsftpd.pem

to:

openssl req -x509 -nodes -days 720 -newkey rsa:2048 -keyout /etc/vsftpd/vsftpd.key -out /etc/vsftpd/vsftpd.pem

Resulting in a /etc/vsftpd/vsftpd.pem and a /etc/vsftpd/vsftpd.key.

I updated /etc/vsftpd.conf and the service started right up.


How does unattended-upgrades handle new releases?

You will be getting updates for your current release.
To get the new release (next 18.04) you will have to upgrade manually.


How can I hide the "An error occurred" tray indicator icon?

The best and recommended way to make the error notification icon disappear is to resolve the root cause. The message shown in the screenshot above notifies you about a serious problem with the software sources. It seems that you are having unmet dependencies.

To solve this issue execute sudo apt install -f. If you still receive this special error message, investigate the software sources by checking the /etc/apt/sources.list file and the files in the etc/apt/sources.list.d folder for wrong entries and correct them.

When you execute sudo apt update afterwards, this error notification icon will be gone and that's the way you should go. Removing the icon manually would not be the solution you want, operating system security and stability is more important than optical things.


Calling for executables not yet installed displays a message in German

I think that the problem is the error line:

locale: Cannot set LC_MESSAGES to default locale: No such file or directory

When trying to print the messages, the C library will try the first locale in LANGUAGE which in your case is en but it has an error; so it switch to the second one which is de (german). And probably your de locale is not UFT-8 so you have the strange  hex data (probably \xbb and \xab are some kind of opening-closing quotation marks).

BTW, which locale is en_RO? In my system I have just the following:

en_AG,en_AG.utf8,en_AU.utf8,en_BW.utf8,en_CA.utf8,en_DK.utf8,en_GB.utf8,en_HK.utf8,en_IE.utf8,en_IN,en_IN.utf8,en_NG,en_NG.utf8,en_NZ.utf8,en_PH.utf8,en_SG.utf8,en_US.utf8,en_ZA.utf8,en_ZM,en_ZM.utf8,en_ZW.utf8

so you probably added it from some non-standard package? (I do not know, just asking).

Have you tried to check if the language support is completely loaded? (Settings -> Language Support in Gnome, it may vary with Ubuntu flavors). It sometime got quite scrambled up and selecting the option gives you this:

In my system it works ok and it switches language ok:

romano@pern:~$ tcl
No command 'tcl' found, did you mean:
 Command 'tcm' from package 'tcm' (universe)
 Command 'tcal' from package 'gcal' (universe)
 Command 'tcs' from package 'tcs' (universe)
 Command 'tdl' from package 'tdl' (universe)
 Command 'tcc' from package 'tcc' (universe)
 Command 'tel' from package 'orville-write' (universe)
 Command 'tjl' from package 'pvm-examples' (universe)
 Command 'gcl' from package 'gcl' (universe)
 Command 'mcl' from package 'mcl' (universe)
 Command 'ncl' from package 'ncl-ncarg' (universe)
 Command 'tbl' from package 'groff-base' (main)
 Command 'tc' from package 'iproute2' (main)
 Command 'cl' from package 'cl-launch' (universe)
 Command 'ccl' from package 'cclive' (universe)
 Command 'ecl' from package 'ecl' (universe)
tcl: command not found

and

romano@pern:~$ LANGUAGE=it:en tcl
Comando "tcl" non trovato. Forse si intendeva:
 Comando "ncl" dal pacchetto "ncl-ncarg" (universe)
 Comando "ecl" dal pacchetto "ecl" (universe)
 Comando "tel" dal pacchetto "orville-write" (universe)
 Comando "ccl" dal pacchetto "cclive" (universe)
 Comando "tdl" dal pacchetto "tdl" (universe)
 Comando "mcl" dal pacchetto "mcl" (universe)
 Comando "tcc" dal pacchetto "tcc" (universe)
 Comando "tc" dal pacchetto "iproute2" (main)
 Comando "tbl" dal pacchetto "groff-base" (main)
 Comando "cl" dal pacchetto "cl-launch" (universe)
 Comando "tcm" dal pacchetto "tcm" (universe)
 Comando "gcl" dal pacchetto "gcl" (universe)
 Comando "tcal" dal pacchetto "gcal" (universe)
 Comando "tjl" dal pacchetto "pvm-examples" (universe)
 Comando "tcs" dal pacchetto "tcs" (universe)
tcl: comando non trovato


How to use telnet client in Ubuntu 18.04 terminal?

try this:
$ telnet sflash.biz 80
Trying 109.206.168.84...
Connected to sflash.biz.
Escape character is '^]'
GET /ip.php HTTP/1.1
Host: sflash.biz


maybe you already solved the problem, but... I am also having weird problems with my mic, it works normally most of the time, but once during the skype phone call, it just muted, the other person didn't hear me at all. I tried everything, pulse audio, alsamixer... but what finally helped was, even though it is weird, to unbalance the INPUT volume in pulse audio control - now the right (or left) mic is 100% and the other one is 0. And I disabled skype to set automatically the volume of the mic...the disbalancing is suggested in here Microphone not working at all in Skype
hope this helps


In Gnome Nautilus is used to manage the desktop background including showing the icons and the context menu.

Thunar can not do this so you need to either install Nautilus or another program to manage the desktop background, for example xfdesktop4.

If you use a program other than Nautilus you may need to add it to your autostart programs to start it at login time.


Is it possible to use `musique` to sync with an iPod?

In my experience synchronizing iPods in Linux specially the touch ones can result into some troubles, you'll have serious trouble if you'll sync again with iTunes (wich is something every iPod user does from time to time). My suggestion is to keep synching it with iTunes (using wine or in another OS) and buy a different portable music player, an android based one could be a better choice in the future if you'd prefer using Ubuntu.


I am dealing with same problem, while trying to change NVreg_RestrictProfilingToAdminUsers parameter.
https://developer.nvidia.com/nvidia-development-tools-solutions-err_nvgpuctrperm-permission-issue-performance-counters
Above link might be helpful. To change parameter temporally Do as instructed in the link. When you try to unload nvidia module you might encounter below error.
modprobe: FATAL: Module nvidia is in use

Then you should turn nvidia-persistenced.service off.
systemctl stop nvidia-persistenced.service

Then you could proceed
modprobe -r nvidia_modest nvidia

Then you could reload nvidia module with parameter
modprobe nvidia [parameter_name]=[value]

I do not know why paramter are not shown in systool -vm but changed parameter takes its effect.
Otherwise
if you want to add config in /etc/modprobe.d/ you should rebuild initrd with update-initramfs -u


How can I open multiple windows in one application, and show them at the same time?

I like the shortcut Super+` (a backtick). Similar to alt tab, Super+` switches between windows of the same application.

So if app B1 is in focus on the right, and you press Super+` app B2 will appear  with focus on the left.

Note that the apps will have the same geometry they had the last time they were in focus, so if you put app B1 on the right and app B2 on the right, app B2 will appear over app B1. This is rather obvious, but I'm saying it anyway.


Prevent Google Chrome from opening PDF files?

Yes, there is a way. Open this URL chrome://settings/content, scroll down and enable last checkbox. (Open PDF files in the default PDF viewer application) Your PDF files will be downloaded, not opened.

Check this post.


Best underlying file system type and configuration for HDFS

Here are the best practices:

Best Practices

Executive summary:

ext3 is most tested and reliable
ext4/xfs are less tested, but offer performance benefits


With Tor running, you can use torify command.
Eg:

torify ssh user@remotehost
torify curl curlmyip.com


Using the df command to keep track of the disk space, and the lsblk command to keep track of the mounted drives, the script below, run in the background, will log changes in the free space of all mounted drives. It creates a log file: ~/disklog where it writes changes to (in k).

If you run it in the terminal, it will output the result simultaneously.

The content of the log file looks like:

[mountpoint / change / date/time / used]

/ . . . . . . . . . . . . . . . . . .            36 k       Fri Mar 27 08:17:30 2015    used 87989352 k
/media/intern_2 . . . . . . . . . . .         -1792 k       Fri Mar 27 08:17:32 2015    used 562649592 k
/ . . . . . . . . . . . . . . . . . .            -4 k       Fri Mar 27 08:17:39 2015    used 87989356 k
/ . . . . . . . . . . . . . . . . . .           -36 k       Fri Mar 27 08:17:43 2015    used 87989392 k
/ . . . . . . . . . . . . . . . . . .            -4 k       Fri Mar 27 08:17:55 2015    used 87989396 k
/ . . . . . . . . . . . . . . . . . .             4 k       Fri Mar 27 08:18:11 2015    used 87989392 k
/ . . . . . . . . . . . . . . . . . .           -32 k       Fri Mar 27 08:18:13 2015    used 87989424 k

How to use

Copy the script below into an empty file, safe it as log_diskusage.py
In the head section of the script, set the time interval the treshold and the max number of lines in the logfile:

#--- set time interval in seconds, threshold in k, and the max number of lines in the logfile
interval = 20        # the interval between the checks
threshold = 0        # in K, you'd probably set this higher
max_lines = 5000     # if you want no limit, comment out the line line_limit() in the script
#---

The interval to run the disk-space checks, as it is, 20 seconds
The treshold: You probably wouldn't want to keep record of all (very) small changes, since the disk has a lot of small changes in free disk space. As it is, it is set to 10k
The max_lines, since the logfile will grow quickly, especially if you set the treshold to zero

Test-run the script with the command:

python3 /path/to/log_diskusage.py

If all works fine, add it to your Startup Applications: Dash > Startup Applications > Add.

The script

#!/usr/bin/env python3
import subprocess
import os
import time
log = os.environ["HOME"]+"/disklog.txt"
#--- set time interval in seconds, threshold in k
interval = 1
threshold = 0
max_lines = 5000
#---

def line_limit():
    lines = open(log).readlines()
    if len(lines) > max_lines:
        with open(log, "wt") as limit:
            for l in lines[-max_lines:]:
                limit.write(l)

get = lambda cmd: subprocess.check_output([cmd]).decode("utf-8")

def disk_change():
    mounted = [l[l.find("/"):] for l in get("lsblk").splitlines() if "/" in l]
    data = get("df").splitlines()
    matches = [("/", data[1].split()[-4])]
    for l in mounted:
        if l != "/":
            match = [(l, d.replace(l, "").split()[-3]) for d in data if l in d][0]
            matches.append(match)
    return matches

disk_data1 = disk_change()
while True:
    time.sleep(interval)
    disk_data2 = disk_change()
    for latest in disk_data2:
        try:
            compare = [(latest[0], int(latest[1]), int(item[1])) for item in disk_data1 if latest[0] == item[0]][0]
            if not compare[1] == compare[2]:
                diff = compare[2]-compare[1]
                if abs(diff) > threshold:
                    with open(log, "a") as logfile:
                        drive = compare[0]; lt = 18-int((len(drive)/2)); lk = 14-len(str(diff))
                        s = drive+" ."*lt+lk*" "+str(diff)+" k   \t"+str(time.strftime("%c"))+"\t"+"used "+str(compare[1])+" k\n"
                        logfile.write(s)
                    print(s, end = "")
                    # if you don't want to set a limit to the max number of lines, comment out the line below
                    line_limit()
        except IndexError:
            pass
    disk_data1 = disk_data2


/var/log/lastlog is a sparse file meaning its real size is not reported by ls -l but by ls -s. This means that your lastlog might not be as huge as you think:

Try:

ls -s /var/log/lastlog

to get a report of its size in blocks.

The sudden growth of /var/log/lastlog means a high UID user as logged out. Look at lastlog man page

Edit - To fix it:

You can found out the last logged out user by using lastlog command.

And  after making sure the user is not logged in with w command, change its UID. See how in "How to change user gid and uid"

Then clear /var/log/lastlog like you already did with

> /var/log/lastlog

Note: Using an uid of 6565666, I only got 1.8G for /var/log/lastlog. So your user must have an uid higher than 26262664 ???


Yes, you can have more than one network interface on a host at the same time with one external and one internal.  At my job we do it all the time.  The internal we use for controlling or building the server.  All you need to do is specify what networks they will be attached to.  The host will do the rest.

See examples in this answer here:

How do I configure two network adapters in Ubuntu Server?

To allow a specific IP address to access the host, you would need to set it up with IP Tables.  Here is a nice little "how to" for configuring IP Tables:

http://safesrv.net/quick-how-to-denyallow-ip-using-iptables/

NOTE: with the above "how to" you can specify what interface you are blocking or allowing on by putting in -i eth0 or -i eth1


I successfully installed rofi v.1.5.1 on Ubuntu 16.04 by adding this ppa maintained by Jason Pleau.

sudo add-apt-repository ppa:jasonpleau/rofi
sudo apt update

And then install rofi or upgrade your system if rofi is already installed.

sudo apt install rofi


How do I install my graphics driver for Dell Latitude D620?

you dont need to install the drivers are present in your kernel


Does the native RAID in Ubuntu support RAID configurations with hard drives of different sizes?

Btrfs can also manage RAID5/6 in last versions


(Windows10) Ubuntu bash multitasking. is it possbile

Yes, you can run apps in the background on Bash on Windows (see this useful guide).

Update 2018-02-06

Removed previous caveat since we recently introduced the ability for WSL to keep your daemons/background-services running even if you close all your Linux consoles: https://blogs.msdn.microsoft.com/commandline/2017/12/04/background-task-support-in-wsl/

Also, yes, WSL supports backgrounding tasks, running multiple sessions in different panes of a single Console via tmux/screen, or multiple Windows Console instances operating the same distro instance.


Libreoffice Presenter Console in single window

I've been looking for a way to do the same thing.

While still quite clumsy, this is the simplest method I have found so far:

You will need to install Xephyr (which lets you start an X server in a window) and a light window manager like xfwm4:

sudo apt-get install Xephyr xfwm4

Then start up Xephyr with two screens:

Xephyr +xinerama -screen 800x600 -origin 800x0 -screen 800x600 :1 &

Then start a window manager on the new server:

DISPLAY=:1 xfwm4 &

Then start impress:

DISPLAY=:1 libreoffice --impress &

I wish it weren't this complicated. Having an option in Impress to view the console on a single monitor setup would be very useful when practicing presentations.


JSDB showing error libodbc.so.1 can't be opened

error while loading shared libraries: libodbc.so.1: cannot open
  shared object file: No such file or directory

sudo apt install apt-file
apt-file search libodbc.so.1
           ## the reply : libodbc1
sudo apt install libodbc1


No swap space. encrypted swap in crypttab not created

When setting up encrypted swap like this, you cannot use the "by-uuid" method as above, since the swap partition will be reformated with a random key every time your computer boots, and the UUID will change every time this happens.

The correct way to do this is to use another persistent method, for instance the "by-id" or the "by-path" method. If you list the contents of /dev/disk, you'll see four or five different entries (depending on your partition table type):

[root@computer~]# ls -lA /dev/disk/
total 0
drwxr-xr-x 2 root root 360 Feb 24 23:51 by-id
drwxr-xr-x 2 root root  80 Feb 24 23:51 by-label
drwxr-xr-x 2 root root  80 Feb 24 23:51 by-partlabel
drwxr-xr-x 2 root root 100 Feb 24 23:51 by-partuuid    # only available if your disk is GPT-formatted
drwxr-xr-x 2 root root 160 Feb 24 23:51 by-uuid
[root@computer ~]#

You never listed your original blkid or lsblk -f, but from your original post leads me to believe you have sdb1 is a luks-formatted partition, which volume you mount as swap. If so, when you list the contents of `/dev/disk/by-path/´ you should see something like this:

[root@computer ~]# ls -lA /dev/disk/by-id/
total 0
lrwxrwxrwx 1 root root  9 Feb 24 23:51 ata-MY_OTHER_HARD_DISK -> ../../sda
lrwxrwxrwx 1 root root 10 Feb 24 23:51 ata-MY_OTHER_HARD_DISK-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Feb 24 23:51 ata-MY_OTHER_HARD_DISK-part2 -> ../../sda2
lrwxrwxrwx 1 root root  9 Feb 24 23:51 ata-HARD_DISK_MAKE_MODEL -> ../../sdb
lrwxrwxrwx 1 root root 10 Feb 24 23:51 ata-HARD_DISK_MAKE_MODEL-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Feb 24 23:51 ata-HARD_DISK_MAKE_MODEL-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Feb 24 23:51 ata-HARD_DISK_MAKE_MODEL-part3 -> ../../sdb3
lrwxrwxrwx 1 root root 10 Feb 24 23:51 dm-name-luks-12345678-abcd-1234-5678-abcdef123456 -> ../../dm-0
lrwxrwxrwx 1 root root 10 Feb 24 23:51 dm-uuid-CRYPT-LUKS1-12345678abcd12345678abcdef123456-luks-12345678-abcd-1234-5678-abcdef123456 -> ../../dm-0
lrwxrwxrwx 1 root root  9 Feb 24 23:51 wwn-0x1234567890123456 -> ../../sda
lrwxrwxrwx 1 root root 10 Feb 24 23:51 wwn-0x1234567890123456-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Feb 24 23:51 wwn-0x1234567890123456-part2 -> ../../sda2
lrwxrwxrwx 1 root root  9 Feb 24 23:51 wwn-0x5555444433332222 -> ../../sdb
lrwxrwxrwx 1 root root 10 Feb 24 23:51 wwn-0x5555444433332222-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Feb 24 23:51 wwn-0x5555444433332222-part2 -> ../../sdb2
lrwxrwxrwx 1 root root 10 Feb 24 23:51 wwn-0x5555444433332222-part3 -> ../../sdb3
[root@computer ~]#

From this output:

I have two disks, which make and model are "HARD_DISK_MAKE_MODEL" and "MY_OTHER_HARD_DISK", and which have "serial numbers" 1234567890123456 and 5555444433332222. In both cases, those are sda and sdb, respectively.
From the -partX suffix in each of them, you can also identify which partition is which, too.
These values are also unambiguous values to identify your partitions and disks, but they will NOT change, since they're based on hard values from your disks.

So, /dev/disk/by-id/ata-HARD_DISK_MAKE_MODEL-part2 will be the same partition, no matter if the disk is /dev/sda, /dev/sdb or if the partition is reformatted and it's UUID changes. This would be the best way to refer to your swap partition on crypttab, since it doesn't depend on anything recorded inside the partition.

Further references:

explanation above comes from here. (this is from the Arch Linux wiki, but the explanation is valid nonetheless).
https://code.google.com/p/cryptsetup/wiki/FrequentlyAskedQuestions#2._Setup (check item 2.3)
https://wiki.archlinux.org/index.php/Dm-crypt/Swap_encryption


10.04 LTS Update Manager suddenly starts failing

I'm not sure of the answer, but to get past it I would drop to the terminal and run the update from there:

sudo apt-get update  and then;
sudo apt-get upgrade

After the upgrade and a reboot, I'm guessing that whatever is holding back the update manager will be repaired.


here is an update. And the solution

First I did never try to install the drivers offerd on the HP website. I always tried the on by ATI. Well but also there is a problem while installing the one from HP. I think the problem with the standart driver is, that it does not use the mobility versions of the graphics cards correctly! Because on another computer with a ATI card (but a normal one) I have temperatures around 45 °C in idle

So then I tried the solution with the CPU frequency but I did not really understand how to use it. But it brought me to another idea. Because also I do not want to limit the frequency. After some search I found this:

How do I set the CPU frequency scaling governor for all cores at once?

And that did the trick! Now I have temperatures around 65 °C in idle. And using firefox with multiple tabs around 70 °C. That is okay for me.

I did exactly this:

cpufreq-info

to get informations about the CPU's

It says for core 0 and core 1 that both run between 1.8 GHz and 2.2 Ghz ondemand.

Also there are the possible types of usage displayed. Like available cpufreq governors: conservative, ondemand, userspace, powersave, performance

So then I put this line:

sudo bash -c 'for i in {0..1}; do cpufreq-set -c $i -g powersave; done'

the numbers in the {} stand for the cpu cores 0 and 1. (If another CPU has more cores the last numer needs to be the last core (Nr. 3 for a quadcore, 5 for a hexacore))

with cpufreq-info

I checked again and now both cores run in powersave between 1.8 GHz and 2.2 GHz

Oh and by the way. I changed to Kubuntu 18.04 LTS. Because I messed up the system before while trying solutions.


Network-manager cannot install, dependency issue

What is dependency for libnotify1 ?
Try sudo apt-get install libnotify1.
Do the same for libgnome-bluetooth7, libnm-glib2, libnm-util1


Upgrade to 17.10 ONLY Plasma Works - no Gnome

Have you tried to install GNOME related packages:
For those, who can't log in to any shell. Use Ctrl+Alt+F2

sudo apt update
sudo apt upgrade
sudo apt install -f
sudo apt install xorg xserver-xorg xserver-xorg-core xserver-xorg-video-all gnome-core gnome-shell gnome-session

and then reboot?


how to check system config, that helps to buy new HDD

To know the HDD Model, Serial number and much more

sudo hdparm -i /dev/sda
sudo hdparm -I /dev/sda

May be you have old IDE drive check with

sudo hdparm -i /dev/hda
sudo hdparm -I /dev/hda

This will show you every information about your disk and storage

lshw -class disk -class storage

If you have a SATA disk this command will give your the output

sudo dmesg | grep SATA


Release File Error when setting up local/offline apt repository

The "Release" file is a manifest of hash values represent packages' authentication information. By default apt-get require this info to secure the source of your system software environment.

You can just add --allow-insecure-repositories or --allow-unauthenticated to apt-get update to make it work, though security warnings will still be given by apt.


Installing Gnome Classic on Ubuntu Server 12.04.1 64bit

Warning : Untested since I already have gnome-3

To install ubuntu classic,

  sudo apt-get install gnome-panel

as instructed in this link


You can always run your updates and select what to install or what not.
So when you see an update for Clementine simply deselect the update in the update-manager, and you'll come out fine.

The downside is that you'll have to deselect it each time you run your updates.

This is the easiest way.