If you examine /etc/crontab, you'll find it uses run-parts to run the daily/weekly/etc. cronjobs (via anacron):

$ grep run /etc/anacrontab
1   5   cron.daily  run-parts --report /etc/cron.daily
7   10  cron.weekly run-parts --report /etc/cron.weekly
@monthly    15  cron.monthly    run-parts --report /etc/cron.monthly

And by default:

run-parts  runs  all  the  executable  files  named  within constraints
described  below,  found  in  directory  directory.   Other  files  and
directories are silently ignored.

If neither the --lsbsysinit option nor the --regex option is given then
the names must consist entirely of ASCII upper- and lower-case letters,
ASCII digits, ASCII underscores, and ASCII minus-hyphens.

Therefore, to disable a given job, you can either:

remove the execute permissions from it (sudo chmod -x /etc/cron.daily/foo)
rename it to include a . or other character that run-parts usually dislikes

So:

sudo chmod -x /etc/cron.weekly/fstrim


Can't start Ubuntu 18.04 with GTX 970 (Ryzen 3 2200g GPU has no problem on boot)

Not solved. I have already been able to install correctly on Ubuntu Bionic Beaver 18.04 and Linux Mint Tara 19. The procedure was only possible this week after the appearance of the new 4.18 kernel that came with corrections for video. My procedure was with many steps but everything went well at the end:

I placed the HDMI cable on the integrated motherboard video (Ryzen GPU 2200G) and I usually installed Ubuntu (or Mint).
I updated the System and rebooted.
I installed the UKUU (Ubuntu Kernel Update Utility) and updated the kernel to version 4.18.
I turned off PC and changed the HDMI cable to the onboard GTX 960 VGA.
Finally worked well but some boots after got fail again.

Sorry

Btw Im using now the CentOS. It is fine and without fails (I wonder when I could try Ubuntu again...)


You can try Bluetooth Manager. Quite number of option and let you send and received file. Good for smart phone transfer. Been using since Ubuntu 12.10.

Get it Here Blueman

Hope it help.


I use the same mouse with Mint 14 (Ubuntu-based), and it never works from a fresh boot, but unplug and re-plug the USB receiver and it works perfectly.

I normally 'suspend' rather than 'shutdown', and it always works fine when I 'resume', so the problem seems to be in the initial start-up. I've not investigated further, as the workaround is so quick and simple.


ethernet works but wireless does not on Lenovo W520 under Ubuntu 10.10

The link below talks about the two packages needed to make this work:

http://www.thinkwiki.org/wiki/Intel_Centrino_Advanced-N_6205

It might be a bit more involved given the discussion on this thread at ubuntuforums:

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


If parttiton C is a logical drive and Ubuntu and Windows are on different filesystems/partitions then just Format Windows and resize Ubuntu from a different OS than Ubuntu (you can use a live linux burnt to usb for example)

Update:
I assume dev/sda5 is Windows and /dev/sda12 is Ubuntu.If something else then the steps to od are the same anyway.

So format /dev/sd5 partition with Windows on it. Then boot into another OS (like live Lubuntu0 and resize the partition with Ubuntu to what you want.


Gtk-WARNING ** Inhibit called with an unrealized window

I believe, your script can't work. Correct the errors below:

   1  while true
   2  do
   3  for f in $FILES
      ^––SC1009 The mentioned parser error was in this for loop.
   4  do
   5  filename=$(basename "$f")
   6  extension="${filename##*.})"
   7
   8   #shopt -s nocasematch
   9
  10   if [ $extension == "mp4" ] || [ $extension == "mov" ]
       ^––SC1049 Did you forget the 'then' for this 'if'?
       ^––SC1073 Couldn't parse this if expression.
  11  mplayer $filename -fs
  12
  13  elif [ $extension == "jpg" ]
      ^––SC1050 Expected 'then'.
           ^––SC1072 Expected "#". Fix any mentioned problems and try again.
  14  timeout 5 /usr/bin/eog --fullscreen $filename
  15
  16  fi
  17
  18  done
  19  done

I have nothing improved or adapted to this script. Now it works technically. Whether your code is logically correct, you have to decide.

Eg:

while true; do
  for f in $FILES; do
    filename=$(basename "$f")
    extension="${filename##*.}"
    if [ "$extension" == "mp4" ] || [ "$extension" == "mov" ]; then
      mplayer "$filename" -fs
    elif [ "$extension" == "jpg" ]; then
      timeout 5 /usr/bin/eog --fullscreen "$filename"
    fi
  done
done

Extra tip for the future:
Have your scripts checked here.


You should provide more details, like what application exactly is playing the video (VLC, MPlayer, etc...) and how exactly is the "pixelated" pattern. Maybe by pixelated you mean teared? This uses to involve some problem with vertical syncing. Some screenshot would be helpfully.

As a quick test, could you run (install prime if you see command not found):

sudo prime-select query

If Nvidia GPU is the default, you should see "nvidia" as output. If the system is using by default some integrated graphic card, you'll see "intel". You could force it to use the discrete card by:

sudo prime-select nvidia


How to change the CPU escalator configuration that Ubuntu has originally

The file is /etc/init.d/ondemand.

Without any additional packages, you can manipulate the frequency scaling governors using primitive commands.

First, determine what available governors you have available:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors

Perhaps see what you currently have:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor

And then, if different than what you want, just set one of the other available governors, in this example performance:

$ sudo su
# for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "performance" > $file; done
# exit

Example:

$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors
performance powersave
performance powersave
performance powersave
performance powersave
performance powersave
performance powersave
performance powersave
performance powersave
$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
powersave
powersave
powersave
powersave
powersave
powersave
powersave
powersave
$ sudo su
# for file in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do echo "performance" > $file; done
# exit
exit
$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
performance
performance
performance
performance
performance
performance
performance
performance


I have personally installed various Ubuntu server versions from USB. I use the Ubuntu Startup Disc Creator (installed by default in Ubuntu desktop editions). I do remember something like this happening to me with another distro, and I think it had to do with the way I made the USB stick. This http://ubuntuforums.org/showthread.php?t=1369628 thread suggests that unetbootin could be the source of the issue in at least one instance, which also confirms my experience. If you haven't already, I'd try the Ubuntu Startup Disc Creator.

I have assumed you have an Ubuntu desktop install, my apologies if not.

Goodluck!


Filter .txt file on descending order of created date

Expanding on the comment from @soulsource you need to use the find command the most basic usage you could use is finding all files which end in .txt on your machine, the following command will descend though the file system starting at the root directory:

find / -type f -iname '*.txt'

Now if you know you saved the file in a specific directory, your home directory for instance, but forget which sub directory you can always speed up the find by changing the path:

find ~/ -type f -iname '*.txt'

Now, you just need to pipe, |, the resulting files to ls to order them by date

find ~/ -type f -iname '*.txt' | xargs ls -td1

If you're getting a large number of files back, you can always limit the number of responses by piping it again to head. As an example, if you're only interested in the 10 most recent results you can use:

find ~/ -type f -iname '*.txt' | xargs ls -td1 | head -n10

One thing to note about find is that by default it does not follow symbolic links, if like me you have a few symbolic links in your home directory and want to check those too you need to use the -follow option to find.

find ~/ -type f -iname '*.txt' -follow | xargs ls -td1 | head -n10


How to grep names of files, which contain simultaneusly a few words

In general you can use grep’s -H option to “[p]rint the file name for each match”.

This will find lines which contain word1 or word2:

grep -HE "word1|word2" ~/files/* 2>/dev/null

If you want to find lines with word1 and word2, instead do:

grep -HE "word1.*word2|word2.*word1" ~/files/* 2>/dev/null

Sending stderr to a dark oblivion with 2>/dev/null prevents grep from outputting useless error messages, e.g. if one of the matched files is a directory.


How do I fix "no public keys available" errors?

Getting the Keys, Part 1

The program addgpg-apt - which is mine - will only work if the keys are on the Ubuntu keyserver, unless you specifically specify what key server you are trying to get the key from.  It does not go out to the internet and find what key server the PGP key is on.

Using the following command:

sudo apt-get update | grep "NO_PUBKEY" | awk '{ system("addgpg-apt "$21) }'

Will systematically go through each line of output and send each key to addgpg-apt program. addgpg-apt will attempt to get the key from the Ubuntu keyservers.

For ubuntu.com or launchpad.net items, it will work without issue. For keys for other GPG Keyservers, you'll need to find the locations of those keys in their respective keyserver, then use addgpg-apt with the --keyserver flag for each:

addgpg-apt --keyserver <keyserver> <keyid>

That will then take the keys and place them into your APT keyring.

The addgpg-apt program is available via PPA

What are PPAs and how do you use them?

If the first command fails, try this one:

sudo apt-get update | grep "NO_PUBKEY" | awk '{ print $21) }' | xargs addgpg-apt

This will perform the same action as above, only operates differently.

Getting the Keys, Part 2

I recommend checking the site(s) for the other non-Ubuntu and non-Launchpad repositories for the PGP keys, as they more than likely are listed there.  After you find each one, you can run addgpg-apt --keyserver <keyserver> <keyid> and it will download from those repositories' key servers.


PPA purge only works if you've installed a PPA (from ppa.launchpad.net). In order to remove it you need to manually remove the line from /etc/apt/sources.list

How to remove a repository?

If a repository is leaving junk around you don't want, you can synaptic  and click the Origin button:

Then click on the filter on the left that shows the repository, then you can select them and remove them from there. If you've already removed the repository the packages might be listed under "Local".

As far as to why Opera isn't in the Software Center, people need to tell them to submit it to the Software Center so people don't have to do this kind of thing by hand.


go to system setting => power managment
choose the action of closing the lid
or

$ gksu 'gedit /etc/systemd/logind.conf'

then add this line

HandleLidSwitch=ignore

then restart systemd-logind

$ sudo restart systemd-logind

or
search for application named : configuration editor
go to 'i think it is' gnome-power-managment 'or something related to power  managment'
after that go to buttons edit lid_ac value to nothing


Eventhough Linux is a very stable OS their are still numerous things that go on in the system that can cause erratic behavior, mostly when you are in your windows manager like Unity and Gnome etc.  The good thing about linux is the ability to start and stop services that are hanging or causing you problems.  If your window manager hangs instead of restarting your entire machine try the following key combination to restart your session.

alt + print screen + k  or ctrl + alt + backspace

This will exit your current session and return you to your login screen

`


Ubuntu (or debian based) has a boot process that you can find in /etc/init.d/.  Other mayor branches (Fedora, Suse) tend to have their own method though. You can find a rc.local in there that has a remark about it running /etc/rc.local if present. That is the one you probably are expected to create.

In /etc/rc.local you can put scripts to be executed at a run-level.

Example file with 1 line added:

$ more /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

[ -x /sbin/initctl ] && initctl emit --no-wait google-rc-local-has-run || true

exit 0


Ubuntu installation partitioning: Logical or primary?

The short answer "it does not matter much".

MBR partitioning scheme allows you to have up to 4 partitions on a drive, one of those partitions can be an "extended partition", which acts as a container for any number of "logical partitions". The partitions which are not inside the extended partition are called "primary partitions".

There's no difference in how they function or anything. So, if you don't have specific reasons, just go with the default choice.


How to fix “The system is running in low-graphics mode” error on particular kernel?

Start your computer while  pressing these buttons: CTRL + ALT + F1 and then enter your username and password and type the following commands:

sudo apt-get update
sudo apt-get -d install --reinstall gdm
sudo apt-get remove --purge gdm
sudo apt-get install gdm

Select  gdm

sudo reboot


Is there any way to change the "Invalid password, please try again' text?

The message is coded into sudo and you can either recompile (I doubt you want to do that) or configure sudo.

I HIGHLY SUGGEST you use visudo . visudo checks the syntax of your sudoers file and helps reduce the possibility of breakage due to a typo.

See https://help.ubuntu.com/community/Sudoers

You add or edit the line(s)

Defaults        lecture_file = /etc/sudo.message
Defaults        lecture = always

you then write a "/etc/sudo.message" file to read "PERMISSION DENIED... and... YOU DIDN'T SAY THE MAGIC WORD!" or whatever you want.

from man sudoers

  lecture
     This option controls when a short lecture will be printed along with the password prompt. It has the following possible values:

  always - Always lecture the user.

  never -  Never lecture the user.

  once -   Only lecture the user the first time they run sudo.

  If no value is specified, a value of once is implied. Negating the option results in a value of never being used. The default value is once.

  lecture_file

  Path to a file containing an alternate sudo lecture that will be used in place of the standard lecture if the named file exists. By default, sudo uses a built-in lecture.

See http://www.sudo.ws/sudoers.man.html for details and additional options.


Is it safe to write sensitive data to terminal?

Terminals has buffers which might reside on disk even without ecryption ( I don't know about gnome-terminal but I'm using Konsole and if you set the scrollback to unlimited then it buffers its contents unencrypted somewhere in the /tmp)

And another problem might be your bash_history. Each command that you type ( the exception is when you add a space before your command ) will go to your ~/.bash_history file if you close the terminal properly (i.e not in the event of a system crash ).

So if you want to type your sensitive information like passwords in a console command , you have to either delete that line manually or add a space before your command ( I didn't see it anywhere , but I found it myself with trial and error and might not work for other shells other than bash . For example that's not the case in the Z shell. And also might someday get removed from bash. Who knows)

In the ~/.bashrc file there are two variables as follows

HISTSIZE=2000
HISTFILESIZE=2000

If you set them to a negative number like -1 , then the bash history size would be unlimited . And if you want to disable the bash history feature , you can set them to zero. ( note that the bash history is an useful feature  in the case you forgot the commands (i.e syntax or arguments) that you issued. For example I had a bash_history with the age of almost one year ! with almost 60,000 lines !)

Note that if in your terminal you've logged in as another user like root then the bash_history will go to /root/.bash_history not in your home directory.

And if you want to reboot or halt your system via terminal ( when you're working on the server , logged in via console , or just for fun ) then you should issue the command :

history -c && some_halt_command

to prevent the history buffer to be flushed into the bash_history.(although if you disable the feature via the aforementioned variables , I don't think you would need this)

So :
1) Delete that line manually from history
2) Add a space before your command if you use bash (which is default in most (if not all) distros)
3) Disable bash history


Unfortunately nvm is not packaged in the Ubuntu repositories, so you cannot install it with apt (see this question).

To install it simply run either the cURL or Wget command in the installation instructions at nvm GitHub repository.


Ubuntu 16.04 takes 30 minutes to shutdown or restart

I think this question describes a case similar to what you are experiencing. Try verifying it by running sudo swapoff -a before shutting down. Reactivate swap with sudo swapon -a

The problem is that if that's you case you can't do much about it.


Command for increasing the volume of mp3 with lame

You have to use:

lame --scale <scale you want to increase> <infile> <outfile>

So that would be in your example:

lame --scale 3 Because.mp3 Because_loud.mp3


touchscreen on tablet not working when running ubuntu 18.04LTS

I have a Vonino tablet with same KMDF HID Minidriver for Touch I2C Device, touchscreen is working with this driver https://github.com/edward-p/mssl1680-firmware/ but i still have problems with calibration....


configure Intel integrated graphics in thinkpad to drive external 4k display only, via HDMI, using xorg.conf

I use awesome wm (like fvwm, but for more handsome users), and I do this via xrandr. Try:

xrandr --output $laptop_display --off --output $external_monitor --auto

In my case, the displays are eDP1 and HDMI2. You can dump out the values for your system by running xrandr without arguments.


16.04 LTS to 18.04.1 LTS upgrade: No new release found

Upgrades from 16.04 LTS will not be enabled until a few days after 18.04.1's release expected in early August.
https://wiki.ubuntu.com/BionicBeaver/ReleaseSchedule


So you have to do some super sneaky stuff, but it eventually will work. The first step is to make sure that Alsa is installed. Then open file

sudo gedit /etc/modprobe.d/alsa-base.conf

At the bottom of the page paste in a new line:

options snd-hda-intel model=auto

Save and restart! It should work fine after that. Good luck!


Detecting file changes in directory synced with external cloud storage in Ubuntu 16.04 LTS

Late alternative answer: user google cloud storage trigger to detect changes and start cloud functions, but you need rights on GCP (everything is done on GCP side).


Special character at the end of commands

No, there is no "special" character in command output.

It is plain text ending with 0x0a char that is Line Feed.

All previous lines of the output end with the same char.


All your errors point to a server / client inode discombobulation. Add another option to your cifs mount statement: noserverino


OpenVPN configure: error: lzo enabled but missing

sudo apt-get install libssl-dev liblzo2-dev libpam0g-dev

solved it for me. Thank you https://dietervansteenwegen.wordpress.com/2014/12/24/installing-openvpn-on-ubuntu-12-04/ .


ddrrescue error: ddrescue: Can't open output file: Not a directory

You are attempting to write the image (and log) directly to the disk device, instead of a path on the filesystem. You should use something like this (which would put it in your home folder).

sudo ddrescue -r 3 /dev/sdc /home/yinon/ImageFileName.img /home/yinon/TextFileName.txt

If you are doing this from a Live CD, you will need to mount a hard drive prior to running ddrescue and change the output to point to the mounted filesystem. For example, if you wanted to back up the image to sda6, enter the following from a terminal:

sudo mkdir /media/backup
sudo mount /dev/sda6 /media/backup

You are creating the folder /media/backup, which is where we are mounting the drive.

You can also just click on the drive that you want to back up TO in Nautilus (the file manager) and it should automatically mount it. If you hover over it, it should show the full path to it, it should be something like /media/LABEL, where label is the label of your drive.

Your ddrescue command then would look something like this:

sudo ddrescue -r 3 /dev/sdc /media/backup/ImageFileName.img /media/backup/TextFileName.txt


Load custom keybindings not working on Ubuntu 18.04

I was able to solve the issue by adding the same number of custom shortcuts I had before as "dumb" shortcuts in the graphical interface, e.g.,

and then reloading the file, i.e., running

dconf load /org/gnome/settings-daemon/plugins/media-keys/custom-keybindings/ < ./custom-keybindings.dconf

However, this is obviously not ideal, and I think should be reported as a bug (in case I am not doing anything incorrect by using this import method).

Thank you for your support!


How to delete windows, after installing ubuntu via windows installer?

You will have to move the Wubi installation to a new partition, then you can remove Windows.

See the Wubi migration guide:

https://help.ubuntu.com/community/MigrateWubi


"no server suitable for synchronization found" error when trying to run `ntpdate`

The problem was coming from network default restrictions given in /etc/ntp.conf. You may have to uncomment the following lines in ntp server configuration file:

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust

to

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
restrict 192.168.123.0 mask 255.255.255.0


How do I fix the "Google Cloud SDK component manager is disabled for this installation" error?

As the issue was discussed here, try installing google-cloud-sdk from anything other than apt.
1. Remove google-cloud-sdk first:
sudo apt purge --autoremove google-cloud-sdk
2. Then download the correct .tar.gz for your system from https://cloud.google.com/sdk/docs/quickstart-linux and extract it tar -xzf google-cloud-sdk-* to a directory and install it running sudo ./google-cloud-sdk/install.sh.
 Restart the terminal session. gcloud components update should work now.


how can I force the screen to stay at maximum brightness in a laptop running on battery?

See Power Management Preferences:

It might also be handy to put 'put computer to sleep when inactive for' to 'never'

If you want to do this as a command line switch or from a script:

gconftool-2 --set --type bool /apps/gnome-power-manager/backlight/idle_dim_battery false
gconftool-2 --set --type bool /apps/gnome-power-manager/backlight/idle_dim_battery true
gconftool-2 --set --type bool /apps/gnome-power-manager/backlight/battery_reduce false
gconftool-2 --set --type bool /apps/gnome-power-manager/backlight/battery_reduce true


Check these tutorials, they are made by MOTU team.

https://wiki.ubuntu.com/MOTU/Videos


What is the package and background process for "network time"?

Every time a network connection is established, the script /etc/network/if-up.d/ntpdate runs and ultimately calls ntpdate-debian, which sets the clock from the servers listed in the NTPSERVERS variable defined in /etc/default/ntpdate.


I found a fix with a lot of help from @DavidFoerster. Disabled Intel graphics in the BIOS and it seems back to normal. Not sure how long this'll work for or what performance will be like..


Have you tried changing the output device option in settings?
This might help you: https://help.ubuntu.com/community/UbuntuStudio/UbuntuStudioControls


The reason you are given partial upgrade options is because you are using the third party PPA and it is introducing dependency issues that cannot be satisfied.

You have a few options.

Remove the videolan/stable-daily PPA and install VLC from the official repos
Contact the owner of that PPA and ask them why they are depending on the git20120502 version when their PPA contains the git20120503 version (you might also try installing VLC again since it may have been a packaging issue that has been resolved)
Find the correct version of vlc-nox and libvlccore5 and install them manually via dpkg.


I got the solution..
as it is said in howtogeek, we can install gparted and select the device that needed to be recoverd and format it again as ntfs or ext3/ext4. The link provided above gives explanation regarding how to format a usb drive in ubuntu using gparted.
Hope this answer would be helpful to the community.
I appreciate the correction@guiverc


What does "There are problems and -y was used without --force-yes" mean?

I found anytime a package is downgraded it must be done so manually or with --force-yes. This was intended by the makers of the apt package.

If you're using apt version 1.1 you can also use --allow-downgrades. Before 1.1 --force-yes is the only option.

Apt version 1.1 also added --allow-remove-essential and --allow-change-held-packages, which may be useful for anyone who stumbles upon this question.

From man page: http://manpages.ubuntu.com/manpages/zesty/man8/apt-get.8.html

   --allow-downgrades
       This is a dangerous option that will cause apt to continue without
       prompting if it is doing downgrades. It should not be used except
       in very special situations. Using it can potentially destroy your
       system! Configuration Item: APT::Get::allow-downgrades. Introduced
       in APT 1.1.

   --allow-remove-essential
       Force yes; this is a dangerous option that will cause apt to
       continue without prompting if it is removing essentials. It should
       not be used except in very special situations. Using it can
       potentially destroy your system! Configuration Item:
       APT::Get::allow-remove-essential. Introduced in APT 1.1.

   --allow-change-held-packages
       Force yes; this is a dangerous option that will cause apt to
       continue without prompting if it is changing held packages. It
       should not be used except in very special situations. Using it can
       potentially destroy your system! Configuration Item:
       APT::Get::allow-change-held-packages. Introduced in APT 1.1.

   --force-yes
       Force yes; this is a dangerous option that will cause apt to
       continue without prompting if it is doing something potentially
       harmful. It should not be used except in very special situations.
       Using force-yes can potentially destroy your system! Configuration
       Item: APT::Get::force-yes. This is deprecated and replaced by
       --allow-downgrades, --allow-remove-essential,
       --allow-change-held-packages in 1.1.


The first step is to find where the bug is reported in Launchpad. If it's not, report it.

Log in to launchpad (in the above link you have more info about that), go to the main page of the bug, and then:

Add yourself to the "affected-by-the-bug" list,
And subscribe to the mail notifications. You can decide to receive all messages, or just the changes of state (which will tell you if the bug is marked as fixed or whatever).


After performing another Core update for Ubuntu, it is working again.

It seems like there were modifications on the suspend mode or in one of the drivers. I checked the release notes for Ubuntu 18.10 and found nothing, but it looks like there were changes anyway.


I had kind of the same issue, here's how I fixed it:

In VLC, I went to  / Tools / Preferences / Input & Codecs / Codecs ... and set "Skip H.264 in-loop deblocking filter" to "All".

And it worked just fine (it seems that I lost a bit in image quality, maybe you can try other settings for "Skip H.264 in-loop deblocking filter".

Remember to restart VLC.

Source: http://crunchbang.org/forums/viewtopic.php?id=10510


If you do not have it yet, install GRUB Customizer:

$sudo install grub-customizer

...and make sure that GRUB can see both OS's.  If it can, double-check the "General Settings" page.  In the "Advanced Settings" check the values of GRUB_HIDDEN_TIMEOUT, GRUB_HIDDEN_TIMEOUT_QUIET and GRUB_TIMEOUT.

If GRUB_HIDDEN_TIMEOUT is greater than zero, then GRUB is waiting (that many seconds) for a keypress to show the boot menu.  Also make sure that GRUB_TIMEOUT is greater than zero, so that the menu is visible for that many seconds.


Grub cannot boot  after resizing windows XP (NTFS) partition. What is to be done?

Short answer is yes. Use the LiveCD for that. Here is one description on how to repair lost grub.

Another way of doing it is this:

Boot into LiveCD ("try out Ubuntu"). Open a terminal and type

sudo -i

Now you are root.
Mount the system already installed on the hard drive. We pretend that the hard drive of your computer is /dev/sda, and that your Ubuntu is installed on the partition /dev/sda3 (that is, /dev/sda3 would normally get mounted to /). You can find that out by typing fdisk -l.

mkdir -p /mnt
mount /dev/sda3 /mnt
mount -t proc none /proc /mnt/proc
mount -o bind /dev /mnt/dev

Now you will chroot into the system that is installed on your hard drive and run update-grub to restore your grub settings.

chroot /mnt /bin/bash
update-grub


Gimp "Could not interpret PostScript file"

If you installed Gimp 2.10.6 in Ubuntu 18.04 using the software center, it will be installed as a snap package. Applications installed through snap are contained and are supposed to pack all their own dependencies. A solution at the level of the snap package is probably in the hands of the package maintainer.

To avoid this issue, install Gimp through the regular repositories. The version that comes with Ubuntu 18.04 is the older 2.8 version. You can install a newer version by adding a PPA.


How do I install a 32-bit proprietary deb on a 64-bit system without causing dependency problems?

Warning:

  The GuitarPro deb is dangerously packaged!

  On a 64-bit system, if you apt-get -f install after trying to install it, apt-get will want to remove the following system critical packages, which can ruin your Ubuntu installation!

The following packages will be REMOVED:
gksu guitarpro6:i386 libgksu2-0 libpam-gnome-keyring sudo ubuntu-desktop
ubuntu-minimal update-manager update-notifier xauth xinit xorg
  sudo? update-manager?? X! What are the developers thinking?!  It also makes apt-get think a bunch of i386 packages are installed when none have been. Here's the full gory pastebin.

Safely Install GuitarPro without apt-get wanting to remove it

I believe the above behavior comes from the deb's dumb dependency on gksu:i386 (which is the graphical root elevation package)
Unfortunately, the only safe way to install this and not have to deal with apt-get's whining is to manually install it and its dependencies. Here's how:

How to manually examine and safely install a binary i386 deb with its dependencies

First, remove the current half-installed packaged with sudo dpkg --remove guitarpro:i386
Now, change to the directory where your deb file is stored. For easy typing let's create a short symlink - my deb called gp6-full-linux-demo-r11100.deb, yours may differ:

ln -s gp6-full-linux-demo-r11100.deb gp6.deb

1. Examine the deb's architecture and dependencies

First, we examine the deb's dependencies without installing it.

dpkg-deb -I gp6.deb shows us:

 new debian package, version 2.0.
size 172147458 bytes: control archive= 75020 bytes.
 375 bytes,    10 lines      control
335109 bytes,  2770 lines      md5sums
Package: GuitarPro6
Version: 6.1.3
Section: non-free/audio
Priority: optional
Architecture: i386
Depends: libc6 (>= 2.1.3), libstdc++6, libasound2, libxml2, libxslt1.1, libportaudio0, libportaudio2, libglu1-mesa, gksu, libssl0.9.8
Installed-Size: 222632
Maintainer: Arobas Music
Description: http://www.guitar-pro.com
Guitar Pro 6, Linux Version.
So this is an i386 application, and all its dependencies are also going to be i386.
The first thing to do is install the ia32-libs i386 compatibility package, if you haven't already:

sudo apt-get install ia32-libs

Let's also copy and paste the package's dependencies in a text file, for later.

2. "Extract" the deb into a tar archive and examine its contents

Let's extract the deb to a tar archive now so we can examine its contents without having to install it:

dpkg-deb --fsys-tarfile gp6.deb > gp6.tar

And open up the File Manager (Nautilus), and mount the gp6.tar as an archive by right-clicking and selecting Open in Archive Mounter; after that you'll see gp6.tar added to the bottom the left sidebar, with an eject icon next to it:

Go to the View Menu for File Manager, and change the Sidebar to the Tree view option instead of Places:

Now expand the gp6.tar tree in the sidebar by clicking on the triangles; repeat for each level until you can see the folder structure of the file:

From the structure, we see that the program's files go into two locations: /opt and /usr/share:

Anything that goes into /opt is self-contained and will not affect anything else on the system.
We see that /usr/share only contains icons/bitmaps, which are harmless.

3. If it's safe, "install" the program by extracting the tar file

Go back to the terminal, and make sure you are in the directory containing the downloaded deb/tar files. Then type:

sudo tar -C / -xvf gp6.tar

This will extract the program files in the appropriate locations, showing you the file names and progress. (Sample Output)

The -C switch tells tar to perform this operation relative to the root directory, not the current directory.

4. Figure out which dependencies are missing with ldd, install them, and rock-and-roll!

Open up the /opt/GuitarPro6 folder in the File Manager:

We see that the executable is called GuitarPro (with the diamond-"gears" icon), and also that a lot of lib-xxxx files are included in the folder.
This is normal for binary-only programs; they try to include the versions of the specific libraries they need, since those may not be available from the repositories of a specific distribution.

Along with these included libraries and the ia32-libs package, most 32-bit dependencies should have been installed. Instead of blindly installing the dependencies we saw in the deb file info via apt-get--which can cause problems-- let's figure out if we're actually missing anything.

Go back to the terminal, and change to the GuitarPro directory with cd /opt/GuitarPro6

Using ldd

Type ldd GuitarPro | grep found, and the output will be libportaudio.so.2 => not found

ldd prints the dependencies (shared libraries) of a program, and whether they exist or not on the system. Here's what the full output of GuitarPro looks like.
To make life easier, we simply filter for the ones that do not exist via grep found.

Here, only the libportaudio2 library is missing. But the dependencies said libportaudio0? (see step 1.) Which is it??

Let's search for the available versions using apt-cache search libportaudio from the terminal.
That's tells us that both libportaudio2 and libportaudio0 packages are available. Let's install the 2 first, with

sudo apt-get install libportaudio2:i386
The :i386 part is very important, since our program is 32-bit. If apt-get asks to replace/remove libportaudio2 and/or other files, that's OK, because some libraries cannot be installed simultaneously in both 32- and 64-bit versions.

Let's double-check dependencies one final time: ldd GuitarPro6 | grep found gives us nothing (that's what we want!)

If you get the error ./GuitarPro: /opt/GuitarPro6/./libz.so.1: version ZLIB_1.2.3.3 not found (required by /usr/lib/i386-linux-gnu/libxml2.so.2) this means that Guitar Pro is using a wrong version of libz, fix this by removing the libz.so.1 file from the GuitarPro6 directory:

sudo rm libz.so.1

Guitar Pro will fall back to the libz version of your system.

Exit the terminal and go back to the /opt/GuitarPro6 folder in the File Manager. Double-click GuitarPro and...

Clean-up the Download folder by deleting the tar file from the File Manager.

5. The launcher shortcut has already been added

Because the package already contained a GuitarPro6.desktop shortcut that was extracted to /usr/share/applications, there is no need to manually create one. It's sitting there in the Launcher:


Well I somehow found out the solution : it was on my /etc/mysql/mysql.conf.d/mysqld.cnf configuration file. I had :

# [client]
default-character-set=utf8

where I should have had :

[client]
default-character-set=utf8

I found out by looking at sudo journalctl -xeu mysql, where I found these lines :

-- Unit mysql.service has begun starting up.
Jun 02 08:09:24 localhost mysql-systemd-start[18290]: ERROR: Unable to start MySQL server:
Jun 02 08:09:24 localhost mysql-systemd-start[18290]: 2019-06-02T08:09:24.858095Z 0 [ERROR] unknown variable 'default-character-set=utf8'
Jun 02 08:09:24 localhost mysql-systemd-start[18290]: 2019-06-02T08:09:24.861413Z 0 [ERROR] Aborting

Indeed, I tried previously to set UTF8 as default but somehow forgot to un-comment the code [client], and it was preventing MySQL to start-up.


The guide assumes that you are using /mirror as your home directory on all cluster nodes (as well as on the master node, which is ub0 for the guide and pythagoras for you).

If you are not using /mirror as your home directory (or, more precisely, if your home directory is not shared among all nodes), the following line:

mpiu@ub0:~/.ssh$ cat id_rsa.pub >> authorized_keys

will simply add your key to the list of authorized keys on ub0 (i.e. on pythagoras).

If your home directory is not shared among nodes, you need to add your public key to the authorized_keys file on each node.

One way of doing this is to use ssh-copy-id:

ssh-copy-id -i ~/.ssh/id_rsa.pub gsamaras@geomcomp.com

and similarly for all other nodes

Note: At the beginning of step 7, the guide assumes you are creating a user named mpiu on all nodes, whose home directory is /mirror. It doesn't, however, tell you how to do so.


You can use the following extension to completely hide the Dock: https://extensions.gnome.org/extension/307/dash-to-dock/

With this extension, you will be able to hide the dock but keep the dock-specific shortcuts available. To do that, enable the extension, go into its settings and do the following:

Enable the Intelligent autohide option under the Position and size tab.
Click on the "Gear" (⚙) icon next to the On/Off switch of the Intelligent autohide option for more settings.
In the new dialog window, disable both options, Autohide and Dodge Windows.

Disabling autohide will keep the dock hidden even if you try to move your mouse to where the dock is.
Disabling Dodge windows will keep the dock hidden even when it is not obstructed by any window.

As mentioned previously, this will not uninstall or disable the dock. But it will completely hide it. So it will not show on screen again unless at least one of the two previous options is enabled again.


I am new and want to do a dual boot of windows 10 and Ubuntu. How I should manage my built in 120 gb SSD?

You're asking for a step by step guide and there is one here already:
https://help.ubuntu.com/community/Installation

There's also a couple of nice guides with pictures specifically for dual-booting:

https://www.itzgeek.com/how-tos/linux/ubuntu-how-tos/how-to-install-ubuntu-18-04-alongside-with-windows-10-or-8-in-dual-boot.html

https://www.linuxtechi.com/dual-boot-ubuntu-18-04-lts-with-windows-10/

The minimum requirements in the official documentation say 25GiB of hard drive space is needed. In my experience, a fresh install takes up about half of that, but you want to have a little bit of room to install other programs and store your own files etc.

You would be better to do a bit of reading and understand a little about what you're doing first, but basically Windows will have it's own partition and Ubuntu will have it's own partition. One hard disk drive with separate sections for each operating system.

The easiest way to go about it is to use Windows to shrink the 'windows' partition in order to make space on the Hard Drive (SSD) for Ubuntu to have it's own partition.

In the 'Control Panel' program there is a section to manage hard drive partitions. Use that to shrink your 'Windows' partition as much as it will let you.

Try Ubuntu first using a Live USB. This will ensure that it's going to work fine on your hardware - you say you've got a sort of tablet/laptop, so you want to be sure that the touchscreen, wifi, sound etc are all fine before you try installing it.

I'd recommend using the program called Rufus to create your Live USB on Windows.

If you can free up about 30GiB of space on your SSD, then choosing the 'Install Ubuntu alongside Windows' option will let the installer deal with it without you having to worry about it.


Do you have to be rooted to run Ubuntu on the Nexus 4?

You do have to have the device unlocked. More information can be found on the wiki:

https://wiki.ubuntu.com/Touch/Install?action=show&redirect=TouchInstallProcess


for the second part of your question I would recommend djvusmooth.

for the first part of your question I would suggest pdfchain should cover your requirements

both are available from the Software Centre.

I personally use a command in terminal to extract text:

pdftotext -layout *.pdf anyname.txt

this will export the text of the pdf to a file meaning you can edit the text in a text editor.


Cannot change lock screen background on Ubuntu 18.04

If it's a PPA install

sudo add-apt-repository ppa:communitheme/ppa
sudo apt update
sudo apt install ubuntu-communitheme-session

then this is the file

/usr/share/gnome-shell/theme/communitheme/gnome-shell.css

When it's a snap install

sudo snap install communitheme

this is the file

/snap/communitheme/1593/share/gnome-shell/theme/Communitheme/gnome-shell.css

but this snap file is Read-Only.. read about why this snap file cant be saved like other files. https://askubuntu.com/a/1035241/739431..

short .gif file for APT installed Communitheme unlock-screen change...
https://imgur.com/hR3FirP


I accidentally deleted the root partition. GParted says I have to restart

If you have done all that from within the running operating system and did not click the Apply button in GParted, you may be VERY lucky, because normally deleting the root partition is not possible this way - this has to be done from a Live media with unmounted partitions. So, when you reboot everything should be as it was before. In case not, you unfortunately are lost - you only can restore the system from a backup image, which hopefully you have created before.


After renaming directory, getting "Forbidden: You don't have permission to access /index.html on this server."

It sounds like your Apache user does not have permission to read the specified file in that directory. Be sure that www-data, which is the default user on Ubuntu, can read there.

More information here:

https://serverfault.com/a/357109


Is it possible to change the displayed name of the keyboard layout?

I recommend you have a read through the Community Documentation for custom keyboard layout definitions.

  The basic keyboard mapping package is XKB. In current Ubuntus, the
  default directory is not /etc/X11/xkb but rather /usr/share/X11/xkb.
  Layouts are kept in the symbols directory therein: they are generally
  named by a two letter country code associated with the language for
  which the layout is designed.


from kivy.app import App runs without showing an error from the terminal in the python interpreter (Python 2.7), so clearly the error on your computer is caused by Anaconda. Anaconda is known for making a big mess out of the default paths for many Python modules. To fix it you need to tell conda the paths to Python files that were installed by apt (e.g. sudo apt install python-kivy).

You can use symbolic links to tell conda the paths to Python files that were installed by apt in /usr/lib/python2.7/dist-packages/kivy/. Put the symbolic links in conda's own lib/python/site-packages directory which for you would be something like: /home/utkarsh/anaconda2/lib/python/site-packages if utkarsh is your username. Or maybe it's something like lib/python2.7/site-packages directory which for you would be something like: /home/utkarsh/anaconda2/lib/python2.7/site-packages.


script in bash not understood using terminal in Ubuntu 12.04

First && means execute the command which follows only if the command which preceded reports success (exit code zero).

The [ is a test command.  [ -n "$T_R" ] means return success if the shell variable T_R is not empty.  The ! in  [ ! -n "$T_R" ] negates the test so that success if reported only if the variable T_R is undefined or empty.

If T_R is undefined or empty, then the string Message Appear will be echoed to standard out and, since echo will report success, then exit 1 will execute, terminating the script with exit code of 1.


I have the same problem with knetworkmanager. Tried reinstalling, but no success.

Here is the output from running knetworkmanager from cli:

$ knetworkmanager
knotify(15737) KNotify::event: 3  ref= 0
knetworkmanager(17694)/kdecore (KConfigSkeleton) KCoreConfigSkeleton::writeConfig:
knetworkmanager(17694)/kdecore (KLibrary) kde4Factory: The library "/usr/lib/kde4/solid_networkmanager07.so" does not offer a qt_plugin_instance function.
Connecting to deprecated signal QDBusConnectionInterface::serviceOwnerChanged(QString,QString,QString)
QSystemTrayIcon::setVisible: No Icon set

Running ps -ef | grep '[N]et':

~$ ps -ef | grep '[N]et'
root      1012     1  0 18:33 ?        00:00:00 NetworkManager

In the end I installed wicd and that is bringing up the wireless network:

~$ sudo apt-get install wicd wicd-cli wicd-curses wicd-daemon wicd-gtk

And it works flawlessly!


Ubuntu installed successfully but not booting

The problem is with the Linux bootloader (GRUB). Looks like it isn't installed correctly.

To re install  GRUB you will need the live disk once again.

There are two ways,

Manual Method,

You can follow the great answer here - How can I repair grub? (How to get Ubuntu back after installing Windows?)

Though question is different, it is applicable for your case. In your case it should be sda not sdb as mentioned in answer step3.

Also Step 7 is must in this case.

Easier way,

You can use live disk & boot-repair tool to perform a Recommended Repair.

Instruction are here - https://help.ubuntu.com/community/Boot-Repair

At the end, it will generate a URL, please take a note of that URL. If after recommended repair, it doesn't load GRUB, please attach the URL in this question.


After getting NAT working on Ubuntu 16.04, ssh connections into the router won't work

Regarding the notation, from the manpages: <chain-name> <chain-policy> [<packet-counter>:<byte-counter>] is the spec - first number is the number of packets that've been handled per the default chain policy, and the second is the total number of bytes of all the packets.

Regarding your unable to access SSH problem, that's because you didn't specify ACCEPT rules for the SSH port and service from the Outside, and have a default REJECT rule for all NEW traffic.
You need an ALLOW rule on inbound SSH via PPPoE - -A INPUT -i ppp0 -m state --state NEW -p tcp --dport 22 -j ACCEPT before your REJECT rule, to specify that "For NEW TCP connections on port 22 coming into the system via ppp0 interface, permit that connection.


Can I make window title bar merge with menu app in Xubuntu?

According to the link below, in "Settings", search for window.titleBarStyle and set it to from native.
https://github.com/microsoft/vscode/issues/65608


Ubuntu 16.04-LTS desktop won't restart or shutdown

I had the same problem, hard shut-off your computer (Holding the power button down for 10-20 seconds) and turn it on again. Not the most graceful way, but it works. Hope this helps!!


Find its inode number:

stat '\home\profile\\blabla\'

Then remove it by its inode:

find . -inum [inode-number] -exec rm -i {} \;

This will pass the inode number to rm.


Why is there no sound through HDMI in Lubuntu 14.04 on an Intel NUC DN2820FYKH?

Solved.

I downloaded pavucontrol then accessed the app in menu>Sound & Video>PulseAudio Volume Control.

In the Configuration tab choose 'Digital Stereo (HDMI) Output'.

Note this switches off the headphone jack.

It beggars belief that this setting is so hidden in Lubuntu 14.04 and you need to download additional software to switch it on! After all HDMI has been around since about 2003! [ http://en.wikipedia.org/wiki/HDMI ]


With the current errors that are being shown my suggestion would be to reinstall Virtualbox after completely removing the previous packages.

I've tried using /sbin/vboxconfig but it never really solves the issue even though you run it using root account. The best way to solve it is by installing the guest and host modules available for virtualbox against different version of your kernel.

So to know the current version of your kernel just type uname -r


Click on terminal

Type in:

gnome-system-monitor

Then on the icon bar, right click on it and lock it to the bar.

You'll be GUI from then on.


Issues with lost / damaged GRUB - cant rebuild. Need help

While not a perfect fix, I was able to shrink my Windows volume (for the last time) to give me 30Gb free. Then a fresh install of Ubuntu 14.04 LTS onto that free space. Somehow the installation doesnt care about how its set up and just gets the job done. The simple step afterwards was just to fix up the boot preferences in the new ubuntu install so i can tell the difference between the new partition and the old partition.

Whle im sure this is not what anyone would consider a proper fix, grub is now behaving correctly. And I have a spare install of Ubuntu on the system for whatever i can figure out to do with it.

Ironically, i now have 2 Ubuntu 14.04 LTS, a Kali Linux, and a Windows 8.1 on this poor little laptop.

If anyone has a better fix, id love to know it. And I hope this fix I used can help someone else if they have the same issue.


To remove the theme and the PPA -

sudo apt-get purge vimix-flat-themes

sudo add-apt-repository --remove ppa:noobslab/themes


Ubuntu 16.04 cannot hibernate after type the sudo pm-hibernate

Open the Terminal by pressing Ctrl+Alt+t or by searching for terminal in the Dash.

Type sudo systemctl hibernate into the terminal and press Enter.

Enter your password when prompted.

if it turns on again

If hibernate doesn't work:

Check if your swap partition is at least as large as your available RAM.

The presence of btrfs partitions has proved to make hibernation fail, so check that you're not using any btrfs partitions. Besides removing or reformatting such partitions, you may need to remove the btrfs-tools package:

sudo apt purge btrfs-tools


When you run metacity --replace, I would expect it to end the Compiz session for you. Hence, perhaps it would help if you did not call stop_3d, but just start_2d. It might be the case that you now manually kill 3D, which triggers a restart of Compiz, however, before it is restarted, 2D will launch but think 3D isn't running and, hence, not end it properly (without triggering a restart).

Just a hunch, but you never know.


Host file redirect for download another file

Remapping URL

If you want to remap url to a different location, but clients still access and know original url, you should use RewriteRule directive.

Try to add this lines in VirtualHost section:

  RewriteEngine on
  RewriteRule ^/abc/a\.zip$ /abc/b.ziP [PT]

Here is RewriteRule syntax:

  RewriteRule Pattern Substitution [flags]

where, according to apache mod_rewrite manual:

  Pattern: In VirtualHost context, The Pattern will initially be matched
       against the part of the URL after the hostname and port, and
       before the query string (e.g. "/app1/index.html").
  Substitution: A DocumentRoot-relative path to the resource to be served.
       Note that mod_rewrite tries to guess whether you have specified a
       file-system path or a URL-path by checking to see if the first
       segment of the path exists at the root of the file-system.
       For example, if you specify a Substitution string of
       /www/file.html, then this will be treated as a URL-path unless
       a directory named www exists at the root or your file-system
       (or, in the case of using rewrites in a .htaccess file, relative
       to your document root), in which case it will be treated as a
       file-system path.
       If you wish other URL-mapping directives (such as Alias) to be
       applied to the resulting URL-path, use the [PT] flag as described below.
  flag: special action

In this case flag value is PT tha means:

  passthrough|PT    Forces the resulting URI to be passed back to the URL
      mapping engine for processing of other URI-to-filename translators,
      such as Alias or Redirect. details ...

Here is useful link with examples.

There is Alias directive that remap content location too. This one is useful if content location is outside of DocumentRoot.

Redirect request

If you want to inform the client that the requested content is located at a different URL, and instruct the client to make a new request with the new URL, you should use Redirect directive.

try adding this line in VirtualHost section:

  Redirect permanent /abc/a.zip http://example.com/abc/b.ziP

This is useful to inform robot that contents are moved in other location, and prevent errors of indexing in search engines.


How to execute 64bit application on 32bit ubuntu system?

You can't run 64bit application on 32bit Ubuntu.  You need a 64bit kernel to run 64bit apps.  see here.

The only way is by using VirtualBox, or VMWare Player, providing that you have the required hardware.


No internet connection on Compaq 6735S laptop

Try install instructions:

mkdir hybrid_wl

cd hybrid_wl

download it :

if you have ubuntu 32bit

wget http://www.broadcom.com/docs/linux_sta/hybrid-v35-nodebug-pcoem-6_30_223_141.tar.gz

if you have ubuntu 64bit

wget http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_141.tar.gz

extract it

tar xzf hybrid-v35-nodebug-pcoem-6_30_223_141.tar.gz

Build the driver as a Linux loadable kernel module (LKM):

  make clean   (optional)

  make

When the build completes, it will produce a wl.ko file in the top level
directory.

If your driver does not build, check to make sure you have installed the
kernel package described in the requirements above.

This driver uses cfg80211 API. Code for Wext API is present and can be built
but we have dropped support for it.
As before, the Makefile will still build the matching version for your system.

make API=CFG80211

or

make API=WEXT (deprecated)

make sure you installed :

sudo apt-get install build-essential linux-headers-generic

sudo apt-get build-dep linux


Search for Instagraph in Software Center or download and install it using this link; It may fit your requirements.

The installation process is quite easy:

Install software by:

snap install instagraph

and grant access to camera, audio and etc.:

snap connect instagraph:camera :camera
snap connect instagraph:alsa :alsa
snap connect instagraph:pulseaudio :pulseaudio
snap connect instagraph:opengl :opengl

Update:

Ramme is another tool you can use as a Linux-based Instagram client (Link). It also works in Windows and MacOS


Cannot resize LVM2 RAID 5 array after adding a new disk

I had a similar problem, manged to resolve it by changing the allocation policy (mine was set to contiguous instead of the default normal)
lvextend /dev/UPLOADS/data /dev/sdd1 --alloc normal


Android kernel 'fstack-protector-strong not supported` error

You need to edit the MakeFile in the kernel/rpi directory we're working in.
See: "Makefile:660: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler"

Go to line 660 and comment out the block of code relating to CONFIG_CC_STACKPROTECTOR_STRONG then try again :)


sudo apt upgrade/autoremove gives error about dkms Ubuntu 20.04

sudo dpkg-reconfigure [package] seems to be a popular fix for this, however it doesn't always work.
Solution from and possible duplicate of: `Error! Could not locate dkms.conf file`


How can I prevent programs from switching workspaces?

To fix an application to a specific viewport (you can manually move it after it has opened), use Compiz.

Install CompizConfig Settings Manager using Ubuntu Software Manager. Warning: you can mess up your interface if you fiddle with bits you don't know, so follow the instructions here carefully.
Open CompizConfig Settings Manager (also known as CCSM).
Choose Window Management from the left-hand menu.
Choose Place Windows from the right-hand side.

Select the tab Fixed Window Placement.

Now, for each application whose window you want to place in a fixed viewport:

Open the application.
In CCSM, under Windows with fixed viewport, select New.
Press the big green + and then Grab. The cursor changes to a cross; click on the application window you want to fix (e.g. Firefox). The Value will be automatically filled in.
Press Add.

Fill the X Viewport Positions (should be singular); this refers to the workspace number counting from the left.
Fill the Y Viewport Positions (should be singular); this refers to the workspace number counting from the top.
In my example, I have chosen Firefox to always start in the third column, second row of the available workspaces.

Press Close.

Thereafter, that application will always open in that specific viewport.


In Windows with Sun Java 6 it works fine. In Ubuntu Natty with IcedTea (OpenJDK) it doesn't. It could well be down to the version of Java you have installed - try replacing OpenJDK with Sun's Java version.

To get Sun's Java you will need to make sure the Partner repository is enabled in Software Sources.


USB PTP camera no longer working after upgrade to 17.10

https://bugs.launchpad.net/ubuntu/+source/shotwell/+bug/1731341 may be the culprit. It is fixed upstream.


As far as I know there are no C bindings for QML (I don't think there are C bindings for Qt at all actually). Qt is built in C++ anyway, so you would be better off just going with that, unfortunately. If you are looking to use QML, it may be possible to use Python (writing your back-end in Python and simply using a QML GUI, if it is that kind of application).

Otherwise, your options are rather slim here.


try this:

  awk '{gsub("_|\\[|\\]","",$0); print $1 "-" $2;}' prova.txt

awk read each line and use " " (white space) as field separator, gsub remove chars: '_' '[' ']', so $1 and $2 will contains token without undesiderable char.

This script will output:

  111-555
  222-666
  333-777
  444-888

If you would access exactly _111_ and [8888] as first token and last token, try this:

  awk '{gsub("_|\\[|\\]","",$0);if (NR == 1) print $1;}END{print $2}' prova.txt

In this case the output will be:

 111
 888

Here is awk manual where you can found more details.


fatal error :"python.h" no file or directory?

For Ubuntu 15.10 and Python 3:

sudo apt-get install python-dev
sudo apt-get install python3-dev
sudo apt-get install libpython3-dev
sudo apt-get install libpython3.4-dev
sudo apt-get install libpython3.5-dev


Terminal and Nautilus stopped working after a crash

I started experiencing the same problems as you describe today, seemingly out of nowhere. I found my solution in this thread: https://forums.linuxmint.com/viewtopic.php?t=279168

(For posterity) First install Terminator or Xterm to get a working terminal. Open Synaptic Package Manager and install it there.

Check the permissions on the files in your home folder

find $HOME ! -user $USER

In particular be on the lookout for files in .dbus

You may resolve all permissions at once with

sudo chown -Rc $USER:$USER $HOME

Additionally, I removed the files in $HOME/.dbus/session-bus, removed Chrome Remote Desktop and its data in $HOME/.config/chrome-remote-desktop and rebooted. My assumption is that Chrome Remote Desktop restarted itself during an update and wrote some files as root in the home folder.


How to grant root privileges when I generate an OTR key in Pidgin

Ok I found it.

Install gksu

sudo apt-get install gksu

Then run the program using gksu and not sudo command

gksu pidgin

Explanation:

Based on Ubuntu Documentation Page:

  You should never use normal sudo to start graphical applications as
  root.   You should use gksudo (kdesudo on Kubuntu) to run such
  programs. gksudo sets   HOME=~root, and copies .Xauthority to a tmp
  directory. This prevents files   in your home directory becoming owned
  by root.   (AFAICT, this is all that's special about the environment
  of the started     process with gksudo vs. sudo).

So gksu is basically a graphical frontend for sudo that allows graphical command to be run without the need to run an X terminal emulator and using su directly

Reference: This Question


Ubuntu Default Won't Load After Installing Cinnamon

I fixed it. I had to do a sudo apt-get autoremove and it removed all the dependencies. Everything got back to normal.


How to activate cube and related Compiz features without crashing Unity?

How to Enable Compliz on Ubuntu 11.10 I have actually followed this and it works on my setup. If you do decide to follow this guide, you should create a ccsm shortcut on your desktop for use when you log back in. I also had to hit Ctrl + Alt + F1, and log in and restart lightdm by issuing the following:

sudo service lightdm restart

It came to a standard login box, once logged in I was unable to use Alt + F2 to try and run ccsm. Luckily, I did have a launcher for a different application. I just created a copy of the launcher and changed the path to "ccsm" and was able to launch ccsm that way.


This usually happens because the disk you are backing up to is formatted with a system that cannot handle large file sizes (FAT or something like that) - perhaps you are backing up to a USB thumb drive? If that is the case, you will need to reformat the disk to EXT4 or similar to prevent the error.


First, a complaint that boot files are far from the start of the disk is irrelevant on an EFI-booting computer. There are limits under BIOS (which vary depending on how old the BIOS is), but even under a (modern) BIOS, your 750GB disk should pose no problems.

Second, you can change the BootOrder variable with efibootmgr's -o option, as in:

sudo efibootmgr -o 0,1,2

This command will set the two ubuntu instances first, followed by the Windows Boot Manager entry. That should do the trick. Unfortunately, some EFIs are buggy, and "forget" the BootOrder entry or otherwise misbehave. If you have problems, I recommend trying the following command in a Windows Administrator Command Prompt window:

bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi

(If you've disabled Secure Boot, you can replace shimx64.efi with grubx64.efi, although either should work with Secure Boot disabled.)

If that fails, then your firmware is probably defective. There may be an update available from HP. If not, or if it doesn't help, and if you're within the return period for your computer, return it for a refund and get something that's not broken. If you can't do that, then you're into the territory of really ugly workarounds, like renaming GRUB so that it pretends to be the Windows boot loader. See here for some information on that topic, albeit written specifically for rEFInd. The basic principles apply to anything, though.


I fixed this by changing proxy_pass from https://... to http://....


How to remove lingering /etc/openvpn/ directory after removing OpenVPN package?

You can't purge it after you remove it that's why it didn't work

sudo apt-get install openvpn && sudo apt-get purge openvpn

and yes you can remove it manually (as you seem to have already figured out), see these files as well

/usr/lib/openvpn

/usr/include/openvpn

/usr/share/openvpn

/usr/share/man/man8/openvpn.8.gz

To see what files get installed with a package, you can usually run the whereis command to see what goes along with it.

example:

whereis openvpn

example output:

openvpn: /usr/sbin/openvpn /etc/openvpn /usr/lib/openvpn /usr/include/openvpn
/usr/share/openvpn /usr/share/man/man8/openvpn.8.gz


sudo apt-get autoclean
sudo apt-get clean
sudo apt-get auto-remove
sudo apt-get update && sudo apt-get upgrade

autoclean - removes partial packages

clean - removes cached packages

auto-remove - removes orphaned packages

update && upgrade - exactly that

Reply if this doesn't work for you.


Split a large XML file by a certain node into smaller files

One solution is to use Saxon-EE which supports streaming capability. For example

<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:mode streamable="yes" on-no-match="shallow-copy"/>

<xsl:template match="file">
<xsl:result-document href="??????"
  doctype-system="http://data.icecat.biz/dtd/files.index.dtd">

<ICECAT-interface xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:noNamespaceSchemaLocation="http://data.icecat.biz/xsd/files.index.xsd">
  <files.index Generated="20120418012252">
   <xsl:copy-of select="."/>
  </files.index>
</ICECAT-interface>
</xsl:template>


I used esc key to get into grub en select a generic kernal to boot. the 'lowlatency' kernel selected by default does not work for me.

But maybe you do not even get into grub..


du -s -c -h /var
du -s -c -h /tmp

and do it for each and every directory that you suspect might have grown
and do a clean up accordingly.


I've had the same problem for two weeks and today I found a solution by simply buying another cable! This afternoon I received my 3rd "USB-C Male to USB-3 Female" adaptor and a flash drive showed up on the desktop! I don't know if I am allowed to write the make of this adaptor so I won't but the two previous ones from other manufacturers left me thinking that either the USB-C port on my new laptop was dead or that U!buntu 18.04 was incompatible with USB-C !!


How to change a program and all its subroutines executable?

Like for script files command

find -name "*.sh" -type f -exec chmod +rx {} +

This command find all script files & give full permission.

I hope this help you


Can't upload wordpress theme, plugins or images with Filezilla

It was a problem with the permissions.
To see all plugins and themes that are installed in Wordpress you should use the command:

sudo chown -R www-data:www-data /var/www/domain.com


How can I remove the first line of a file with sed?

To suppress the first line, use '1d' (i.e. line 1, delete):

touch essay1.txt
for file in essay_*; do
  sed '1d' $file >> essay1.txt
done

the output will be

~$ cat essay1.txt
line 2 from essay 1
line 3 from essay 1
line 2 from essay 2
line 3 from essay 2
...

for all of the files named essay_* in the current working directory.

Instead of using sed, you can also use tail to do this job:

tail -n +2 $file >> essay1.txt

Where +2 means from the second line onwards (-n 2 would be the last two lines).


The software in question (Zoom) requires libxcb-xtest0. The package is in the repositories, and can be installed with

sudo apt-get install libxcb-xtest0

Note, this should be done prior to the installation of zoom.


You are using mawk but this script requires gawk.

sudo apt-get install gawk

It will automatically reset awk to gawk so the script will work. If it won't reset, then just change every awk in the script to gawk.


How to fix my middle mouse button being recognized as left mouse button?

https://help.ubuntu.com/community/ManyButtonsMouseHowto#Remapping%20buttons documents how to remap the buttons on a mouse. To quote it:

  Some pointing devices have a strange button mapping, so need some tweaking to match X's perception of things. Such tweaking can be performed at runtime with xinput - find your device in xinput list and run xinput set-button-map  1 2 3 6 7, replacing those numbers with your required button mapping. You might be able to find it by searching for other people with the same hardware, or you might need to play around and see what works.

Here is the xinput(1) manual page explanation of the --set-button-map option:

--set-button-map device map_button_1 [map_button_2 [...]]

Change the button mapping of device. The buttons are  specified
in  physical  order  (starting with button 1) and are mapped to
the logical button provided. 0 disables a button.  The  default
button mapping for a device is 1 2 3 4 5 6 etc.

This should allow you to re-map the middle mouse button so that it is properly detected as the middle mouse button.


How to get kernel versions to match in a server and clients?

It's pretty simple, actually.  Just run...

sudo apt-get install linux-generic-lts-quantal xserver-xorg-lts-quantal

and both kernel and X stack will be upgraded.

Note: this upgrade worked fine on a simple HTPC running Mythbuntu, but on a older client that had been originally a 10.4 system, it was severly broken.  Might be a good idea to back-up your system before trying this.

Ubuntu calls it "LTS Hardware Enablement Stack", some details here  as referenced here.

It didn`t take very long for me but I have high speed internet service.

Thanks to chaskes for the explanation.


Prevent/stop/disable automatic updates on ubuntu desktop?

I usually edit the /etc/apt/apt.conf.d/10periodic file to do this.


How do I disable user password request to shut down from retropie?

Edit your box's sudoers file. In a terminal run sudo visudo. visudo does a good job of limiting the damage that can be done by manual edits. Adding the following lines, replacing bob with the correct username. Running the above command with sudo requires the current user's password.

Cmnd_Alias SHUTDOWN_CMDS = /sbin/poweroff, /sbin/halt, /sbin/reboot
bob ALL=(ALL) NOPASSWD: SHUTDOWN_CMDS

If your system is not connected to the Internet in anyway, an alteritive is to change the line sudo ALL=(ALL) ALL to sudo ALL=(ALL) NOPASSWD: ALL. If connected to the internet this is risky.

The sudoers file alters sudo permissions to allow a specified user or group to run specific commands. In this case bob can run various shutdown commands without a password.

  The /etc/sudoers file controls who can run what commands as what
  users on what machines and can also control special things such as
  whether you need a password for particular commands. The file is
  composed of aliases (basically variables) and user specifications
  (which control who can run what).
  -  Ubuntu Community Wiki -
  Sudoers.


Was there not more to the message?  Like "Frequency not supported"?  Was it in a box centered in the middle of the screen?  If so then that's your monitor complaining that it doesn't support the resolution the video card is trying to drive it in.


outdated 14.04 want newer ubuntu version

No need to be a terminal Guru here: Just download the ISO for the Ubuntu version you want and make a "Live CD/USB" for it. Unfortunately, this is installing a fresh version so you will need to back up any files that you don't want to lose permanently.

You can find ISO files here for standard Ubuntu here:

http://releases.ubuntu.com/

I'd recommend Xenial (16.04) since it's a long-term release: it will have updates released for longer than other releases. Of course, ISO image files for and distribution of your choice will work too. I recommend the Ubuntu clone "elementary OS" for a user-friendly, linux GUI which is fairly lightweight and works great on my ancient laptop: https://elementary.io/

To create a Live USB, just insert one into your machine and use "Startup Disk Creator" to select the ISO you want to use.

Depending on your system, you may need to install the disk creator:

sudo apt-get install usb-creator-gtk

See here for more details on the Start up Disk:

https://www.howtogeek.com/howto/linux/create-a-bootable-ubuntu-usb-flash-drive-the-easy-way/

Reboot your machine with the "Live" USB inserted and you're good to go. It should bot onto the disk and you can "Try" or "Install" the Linux distribution all through the GUI. No need for the terminal for the installation unless the packages you wish to install afterwards are not supported by the Software Centre App.


16.04 LTS, `php -v` in console shows PHP 7.0.33, but PHP 7.3 *is* installed, however I can't use Composer since it needs PHP 7.2+

you need to execute:
sudo update-alternatives --config php

it will show you all your versions of PHP and the selected. Only type the number of the optiont that match with the version and press Intro.
The output of update-alternatives is similar to this:
  Selecction   Route            Priority   State
------------------------------------------------------------
  0            /usr/bin/php7.4   74        auto
  1            /usr/bin/php5.6   56        manual
  2            /usr/bin/php7.0   70        manual
* 3            /usr/bin/php7.2   72        manual
  4            /usr/bin/php7.3   73        manual
  5            /usr/bin/php7.4   74        manual

For PHP 7.3, the number is 4 in this case.


External monitor not running with NVIDIA GeForce GTX 965M

For some reason NVidia proprietary drivers seem to work badly on Linux. I had a similar issue with my laptop (HP Pavillion with a GeForce GTX 960M). In the end I solved it by installing a non-proprietary driver.

These steps should do the job: first clean up any eventual mess that there might be by doing

apt-get purge nvidia*

and then you can do the actual installation

add-apt-repository ppa:graphics-drivers/pp
apt update
apt-get install nvidia-387

After rebooting in principle you should obtain a non empty output to

lsmod | grep nvidia

but in my case it was empty and that was why it wasn't working. At the boot Linux wasn't loading the relevant modules. This was UEFI secure boot's fault. Apparently the secure boot didn't like the open source drivers and blocked them from being loaded. This can be fixed by going to the BIOS and disabling it (see here for a more thorough explanation https://askubuntu.com/a/762255).

If it still doesn't work you can try to look for these two possible issues:

Some other drivers are not blacklisted, e.g. nouveau (https://askubuntu.com/a/951892).
The file /etc/X11/xorg.conf isn't there. If so generate it with nvidia-xconfig


What is the blue triangle on the home button for?

The little blue triangle is an indicator that shows when an application is requesting user attention (for instance, a dialogue pops up).

The triangle is in the corner, and indicates the direction/place that the user needs to move the cursor in order to reveal the auto-hidden Launcher.

See also:

When do things in the new Unity Panel turn blue?


I haven't been prompted for updates in  past 4 days, Why?

From my side , i can confirm neither did i got any . As far as the size of Apt-get is concerned , it reduces with time , in initial period of release ,efforts are made to provide as stable and secure System possible by updates for Patches , or Bug fixes.

To confirm manually if Packages are up-to date Visit Precise-Updates packages. And also you can change your Mirror to assure for same.


How can I turn off Xfce session saving system-wide?

(Tested with Xubuntu 12.04, but with the ppas for Xfce 4.10 and 4.12 installed, but the option I discuss was available for Xfce 4.8)

There is a way to globally disable the option of saving the session, and the best way to achieve it is to use Xfce kiosk mode. One of the available kiosk mode options, buried in the source code for xfce4-session, is SaveSession. If we look at /home/mike/xfce4-session-4.10.0/xfce4-session/xfsm-shutdown.c, we can see the undocumented setting:

/* check kiosk */
  shutdown->kiosk_can_save_session = xfce_kiosk_query (kiosk, "SaveSession");

Firstly, create the kiosk directory with

sudo mkdir /etc/xdg/xfce4/kiosk

and then create and edit the kioskrc with your text editor:

sudo nano /etc/xdg/xfce4/kiosk/kioskrc

Place the following in your kioskrc:

[xfce4-session]
SaveSession=NONE

Now, save the changes and logout and login again as your user to test it. The checkbox option to save the session should have disappeared.

Before the setting is applied, the box is still available:

Afterwards, with kiosk mode active, the option is no longer available:

If you wish to use kiosk mode to globally disable other settings, such as the ability to shutdown or suspend, etc, see my answer here:

How to change the hibernate and suspend settings at a system-wide level in Xfce?


Changing file name and adding some line in it

To add your line to the start of each file you could do

for i in 000*; do sed '1i#include<conio.h>' "$i"; done

1i means insert this at the first line (before existing first line). The existing first line becomes line 2. A warning: this command will fail (do nothing) for empty files.

The contents of all the files with the added line will appear in the terminal one after the other. If it looks right, then do again with -i to change the files in place

for i in 000*; do sed -i '1i#include<conio.h>' "$i"; done

If you just want to remove the leading 0 from after _ you could use rename to rename the files...

rename 's/0_0/0_/' 000*


Couchdb package broken on 14.04 lts Trusty

From Digital Ocean, I am summarizing the main contents to just the commands you need to type for installing couchdb:

sudo apt-get update

sudo apt-get install software-properties-common -y

sudo add-apt-repository ppa:couchdb/stable -y

sudo apt-get update

sudo apt-get remove couchdb couchdb-bin couchdb-common -yf

sudo apt-get install couchdb -y


Is Dropbox going to always resolve my symlinks?

I'm not sure this can be answered definitively as Dropbox might change everything or nothing tomorrow. I am neither Dropbox or the omnipotent entity that drives them.

That said, symlink resolution is a feature that allows people to sync things that aren't actually within their dropbox folders. This is handy if you want to back something up without actually moving it. Given that's how it currently works and is how people are using it, I think it highly doubtful they'll change that behaviour...

Since writing this, I've found a dozen or so threads and questions around the internet that all seem to agree. An answer on SU suggests selective syncing as a workaround.


You should be able to scroll in screen using the key combination Ctrl-A Esc (so first Ctrl-A, release, press Escape). This enables copy mode. After you completed scrolling, you can cancel copy mode with another Esc.


Use this command to get full lines:

systemctl -l status vpnautoconnect.service


Clicking the Dash Home causes computer to freeze up?

Try pressing ALT-F2, and typing in sudo apt-get install unity-tweak-tool. Poke around in the settings of the Unity Tweak Tool, under search, and disable background blur. Otherwise, I suspect you have a graphics driver problem. Open System Settings, and go to Software & Updates. Look in additional drivers, see if there's anything listed. If there are proprietary drivers, install them, because they may fix your computer.

You could alternatively install lubuntu, xubuntu or maybe Ubuntu GNOME, and see if they're broken, also.


Can't find Windows 10 in GRUB boot menu after installing Ubuntu, Boot Repair failed

You have mixed UEFI & BIOS. They are not compatible, but just different boot options in UEFI. And Windows in BIOS boot mode must use MBR partitioning.
And normally UEFI installs use gpt partitioning.

It looks like you have a BIOS/CSM/Legacy install of Windows on MBR partitioned drive. But installed Ubuntu in UEFI mode, but still on MBR drive which is unusual as UEFI normally is gpt partitioned. But Windows in BIOS mode must use MBR.

Boot Ubuntu installer in BIOS mode, install Boot-Repair and in Boot-Repair's advanced options run the full uninstall/reinstall of grub. That should uninstall grub-efi-amd64 (UEFI) and install grub-pc (BIOS). You want to convert Ubuntu to BIOS boot.

Since Windows is BIOS, you need to always boot in BIOS mode.
But since hardware is newer UEFI with newest SSD, you may want to consider reinstalling Windows in UEFI mode.

How you boot install media, UEFI or BIOS is then how it installs for both Ubuntu & Windows.

Separately your p2 partition is full. NTFS really likes 30% free to work well. At 20% free it slows and at 10% free you have no working room to run a defrag.


How can I remove gradients from Elementary theme?

The line you are looking for is line 410 in the gtkrc file, under the section

  style "murrine-toolbar" =
  "murrine-default"

starts with: gradient_shades
You need to edit the gradient shade values to what you require.
1.0 is normal color, lesser than 1.0 is darker and greater than 1.0 is lighter shade.

If you want it flat you can set everything to 1.0 and it would look like :

  gradient_shades             = {1.0,1.0,1.0,1.0}


I downloaded and installed debian packages for my arch (amd64) from here:

https://launchpad.net/~nilarimogard/+archive/ubuntu/webupd8/+sourcepub/4063001/+listing-archive-extra

and it worked!

After that, I exported my favourite emerald theme from my Slackware, but you may need to download some existing theme/collection, or create one by your own, because the theme manager is empty with only emerald.


How to have option in Nautilus right-click menu to executed/open as root?

This functionality is provided by the package nautilus-admin.  Just install it and you will have an entry in the right-click menu Open as Adminstrator (or Edit as Administrator as appropriate)
.


espeak command :

a speech synthesizer for English (and several other languages) which will convert text to speech.

espeak options :

man espeak

For example to read the content of man pages :

man ls | espeak

espeak --voices

List all available voice languages

espeak -v en-uk

use “en-uk” – British english to translate the text to speech.

change to your language

espeak -s

The default is 160 words per minute. You can reduce it using option -s

espeak --stdout -t file.txt | aplay

This will convert the text from the file.txt to speech.

Reference : Here


Having some issues to send mails using ssmtp

I had the same problem (on PC-x64) after updating from 18.04 to 18.10. As some other unrelated things got broken, I updated to 19.04 and even zero-installed 19.10 (currently beta). Now everything else works, but SSMTP still broken. It may be needing an unlisted dependent SSL/TLS library or something like that.

Sadly, SSMTP is unmaintained and my searches turned up of no help too. After reading this question and the comments, I too gave up and installed MSMTP, which is supposed to be the actively maintained, basically following the instructions of that link:

Install (I am assuming you use a debian-related distro on your pi):

apt install msmtp msmtp-mta ca-certificates

Edit /etc/msmtprc and put that minimal config:

account default
auth on
tls on
tls_trust_file /etc/ssl/certs/ca-certificates.crt
logfile /var/log/mail.log
host     smtp.gmail.com
port     587
from     username@gmail.com
user     username@gmail.com
password plain-text-password

On the Ubuntu 19.10 beta I saw that the package installer added a user/group "msmtp", and made the binary SGUID, so, for security and homogeneity regarding permissions of the config and log file, I did the same on my other systems:

adduser --system --home /var/lib/msmtp --no-create-home --group msmtp
chown root:msmtp /etc/msmtprc
chmod 640 /etc/msmtprc
chown syslog:msmtp /var/log/mail.log
chmod 660 /var/log/mail.log

Try that, it has more features than SSMTP (like multiple accounts and user-specific ~/.msmtprc config) but continues to be simple to configure.


To check permission of directory /opt run:

ls -ld /opt

output will looks like:

drwxr-xr-x 24 root root 4096 Feb  1 13:34 /opt/

As you see this directory is owned by the root user and group root.

More the others permission is r-x which means no write permission is allowed to others(users which are not owner or not in the group). And when you are making a cp command this means a writing process inside this dir.

So what you shall do is to use the sudo command before your command.

sudo cp -avr /home/hienz1/Downloads/Linux-Track/linuxtrack-0.99.17 /opt


Handling wildcards in linux shell script

echo ${PWD##*/}

Go this from this post in the past:

https://stackoverflow.com/questions/1371261/get-current-directory-name-without-full-path-in-bash-script

if you want the full path then just:

pwd


How to underline hotkeys on Google Chrome or Chromium right-click menu?

In case we don't have the ability to underline the keys, I went ahead and compiled a list of hotkeys for the Google Chrome right-click menu:

open-link-in-new-tab    -       t
open-link-in-new-window -       w
open-link-in-incognito  -       g
save-link-as            -       k
copy-link-address       -       e
inspect                 -       n

open-image-in-new-tab   -       i
save-image-as           -       v
copy-image              -       y
copy-image-address      -       o
google-image-search     -       s

We can use this list as a workaround for reference but I'm still open for any answers.


apt-get install python-software-properties not working

if you installed using 12.04.5 server or alternate install then it usually can be fixed with

sudo rm -fr /var/lib/apt/lists
sudo apt-get update

FYI: Here is the cause of the problem
https://bugs.launchpad.net/ubuntu/+source/apt-setup/+bug/1434699


freezing when an external display is connected

I fixed this promblem by myself.
I changed GeForce 9400M driver to Nvidia binary driver from x server by GUI(Additional Drivers).
It worked.


How to prevent Ubuntu from overwriting grub bootloader after update?

Grub remembers where to reinstall.

To see what drive grub2 uses see this line   - grub-pc/install_devices, check what it is now:

sudo debconf-show grub-pc

to get grub2 to remember where to reinstall on updates, grub-pc is for BIOS and grub-efi is for UEFI, if you unselect everything then the command above  should change to a blank or grub will not reinstall.

sudo dpkg-reconfigure grub-pc
sudo dpkg-reconfigure grub-efi-amd64

Enter thru first pages,spacebar to choose/unchoose drive, enter to accept, do not choose partitions

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

You can also just change to install grub to a partition. We suggest never to install to a partition as it does not work well, but if really booting with another copy of grub that is not really an issue.

How to: Create a Customized GRUB2 Screen that is Maintenance Free.- Cavsfan

https://help.ubuntu.com/community/MaintenanceFreeCustomGrub2Screen


Why do Nvidia mobile cards not work with Ubuntu

You can install drivers to Ubuntu 14.04 this way

sudo add-apt-repository ppa:xorg-edgers/ppa
sudo apt-get update
sudo apt-get install nvidia-346 nvidia-prime
sudo add-apt-repository -r ppa:xorg-edgers/ppa

In 15.04 just sudo apt-get install nvidia-346 nvidia-prime.


Your problem occurs because the application still has the file descriptor open after you moved it on the filesystem. Unless you can tell the program to restart logging directly after moving (usually for deamons, there's a signal for it like SIGHUP), you will have to use another method for rotation than moving files around to which are written into at that time

I suggest to use logrotate like the following. Haven't tested it, as you haven't shared the application involved.

Create your own logrotate configuration file, e.g. abclogrotate.conf:

/var/log/abc.log {
    # don't use time based rotation, but size-based
    size 10k
    # don't move, but copy-and-truncate so the application won't have to be
    # told that the file has moved.
    copytruncate
    # maximum of one old file
    rotate 1
    # counting old files starts at 1 rather than 0
    start 1
    # don't use compression
    nocompress
}

Now call logrotate like this: logrotate /path/to/abclogrotate.conf rather than your own script.


Can't find mysql-admin package in 12.04 repositories

The bad news is that it has been marked as an End Of Life product and removed from the repositories, they recommend using MySQL Workbench:

  December 18, 2009 EOL of MySQL Query Browser, MySQL Administrator,
  MySQL Migration Toolkit

  With the beta releases of MySQL Workbench 5.2 well under way, we are
  announcing the EOL of the MySQL GUI Tools Bundle.

  The MySQL Tools team has been working on MySQL Workbench 5.2 to give
  DBAs and developers an integrated tools environment for:

Database Design & Modeling
SQL Development (replacing MySQL Query Browser)
Database Administration (replacing MySQL Administrator)

  MySQL Workbench 5.2 also provides:

Remote Administration (using SSH-Tunneling)
Python scripting and plugins
Native GUI for Windows, Mac, Linux

  A future release of MySQL Workbench (post 5.2) will add a migration
  plugin, providing features comparable to the MySQL Migration Toolkit
  component of the MySQL GUI Tools Bundle. The MySQL Support team will
  continue to provide technical assistance for MySQL Migration Toolkit
  until such migration support functionality is released in MySQL
  Workbench, but no new development or bug fixes will be provided
  against the existing MySQL Migration Toolkit product.

  MySQL Support will continue to answer questions and provide assistance
  related to MySQL GUI Tools Bundle, as well as assist our customers in
  upgrading from those tools to MySQL Workbench 5.2 until June 30, 2010.

  Starting Dec 18, 2009, MySQL will no longer accept bug reports
  submitted against the MySQL GUI Tools Bundle, and existing bug reports
  against these tools will no longer be worked on. Users should instead
  download, use, and submit bug reports (where necessary) against MySQL
  Workbench. Downloads of the MySQL GUI Tools Bundle will remain
  available, but will be moved into the MySQL Archives location.

  Users should begin planning to upgrade to MySQL Workbench 5.2 GA.

Too bad, I really liked mysql-admin ;(


File manager with two panel synchronized directory browsing

Filezilla can do it, if one connects via ssh to localhost.

I tried Double Commander, Midnight Commander, Dolphin and Krusader, but couldn't find a similar feature.


How to remove kernel installed using dpkg command?

You could try using sudo apt-get --auto-remove purge linux-generic*3.12*. Please note that, although wildcards tend to work will with apt-get, they don't work too well with dpkg directly (at least, not as far as I can tell).


Ubuntu can not find python3, which is intalled

It says Package python3 needs to be reinstalled, so maybe a reinstall will solve the problem. To reinstall python3, please run:

sudo apt install --reinstall python3

After that try to install your packages.


Cannot make change between Traditional and Romanized keyboard layout Nepali?

Install the ibus-m17n package.
Log out and log in again.
Open System Settings -> Text Entry, click the + button and select Nepali (trad (m17n) (IBus).
Repeat the last step for Nepali (rom (m17n) (IBus)


To enable encrypted DVD's use the following command;

sudo apt-get install libdvdread4

sudo /usr/share/doc/libdvdread4/install-css.sh


Mount Windows File Share and acces them on ubuntu 14.04 server

Try this

mount –t cifs //servername/sharename /mountpoint –o username=userid

It will ask for the password, once you enter this command.

Also make sure that you have cifs share entry in /etc/fstab


How to preserve hypertext links while pasting in LibreOffice?

You need to press Ctrl + Shift + V instead of Ctrl + V to preserve hyperlinks. This would bring a Paste Special dialog box, select HTML (HyperText Markup Language) and press the Ok button. Doing so would paste the text while preserving the hyperlinks.

If you are not a keyboard person, you can also access it using the Edit menu → Paste Special.


Attempting to Decrypt an AES-256-CBC Encrypted File but Decryption Password isn't known

You can create a simple shell script to iterate through your dictionary file (search on StackOverflow if you don't know how).

Then use this command to attempt decryption: (source)

openssl enc -d -aes-256-cbc -k $password -in encrypted.data -out un_encrypted.data

You will also need some method to decide whether the decrypted data is of the format you expect. The file command could be useful.


How one may enable debug/verbose mode during installation of Lubuntu?

Remove quiet splash from the boot options (f6 to edit them).

So once one reached this screen:

press F6 and remove quiet splash from command that will be displayed below

(Thanks to leszek from https://webchat.freenode.net/?channels=lubuntu for this answer!)


OpenOffice - combined roman and arabic numerals page numbers

This OpenOffice page  contains the information on changing page numbers from latin to arabic numerals and on how to restart page numbering at 1 again. (I understand you already no this bit)

To combine the two types of numbering, you need to make a new page style, choosing the desired numbering format and then applying this new page style to your target pages.

See for detailed information in the index of the help pages under "page styles;creating and applying".

Make sure to add the pagenumber field again to the footer in your new page style.


Set Window Icon to Gtk Stock Icon in PyGtk

The problem is that you are looking at the PyGTK documentation, but are using PyGI/GTK3 in your script.

The docs on gtk_widget_render_icon() says the following:

  gtk_widget_render_icon has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_render_icon_pixbuf() instead.

Then the docs on gtk_widget_render_icon_pixbuf() says this:

  gtk_widget_render_icon_pixbuf has been deprecated since version 3.10 and should not be used in newly-written code. Use gtk_icon_theme_load_icon() instead.

Great huh?! So let's move on.

gtk_icon_theme_load_icon() takes the following arguments:

icon_name :  the name of the icon to lookup
size :   the desired icon size. The resulting icon may not be exactly this size
flags :  flags modifying the behavior of the icon lookup

Knowing this, you can change your old render_icon line with the following:

        icontheme = Gtk.IconTheme.get_default()
        self.icon = icontheme.load_icon(Gtk.STOCK_FLOPPY, 128, 0)

Which will lookup a 128x128 px image. You might want to change the flags if needed, the enum is documented here. This can be translated into Python like this:

GTK_ICON_LOOKUP_NO_SVG -> Gtk.IconLookupFlags.NO_SVG
GTK_ICON_LOOKUP_FORCE_SVG -> Gtk.IconLookupFlags.FORCE_SVG
GTK_ICON_LOOKUP_USE_BUILTIN -> Gtk.IconLookupFlags.USE_BUILTIN
# And so on...


Why does Ubuntu (and other ubuntu based distros like lubuntu and linux mint) randomly shutdown on my laptop?

In order to check if this is a heating problem you can measure the temperature.

Start by checking if you have "lm-sensors" instaled

dpkg-query -W -f='${Status}\n' lm-sensors

if your output is

install ok installed

then you can see the temperature by simply tiping

sensors

otherwise you first have to install "lm-sensors"

sudo apt-get install lm-sensors


No email message when attachment is sent

This works for my daily backup:

mail -a "$Filename64" -s "$Filename64" "$EmailAddr" < BackupLog

So for your case try:

mail='mail@example.com'
log="/var/log/apt/$(date +"%Y%m%d")-apt-update.log"
echo "Update done" > /tmp/MessageBody
mail -a "$log" -s "update done" "$mail" < /tmp/MessageBody


NMI Watchdog: BUG: soft lockup with Samsung EVO 970 and Ubuntu 18.04

It's work with samsung 970 EVO SSD.

The problem is again the nouveau driver for nvidia video card ...

I make a fresh install of Ubuntu 18.04 with 4.15 kernel. During the installation i have not selected the "install third party ...".

I've made a upgrade of the os (apt-get update & apt-get upgrade) and after :

ubuntu-drivers devices
sudo apt install nvidia-(driver-number)

sudo dpkg -l | grep nouveau

and i delete (sudo apt-get autoremove ) xorg nouveau driver

ubuntu 18.04 how do I install drivers for my NVIDIA GeForce GTX 1050?