Launching Eclipse always Launches the Installer

Okay.. I found a solution!!

This is what I did. I created a new desktop shortcut with the following content.

[Desktop Entry]
Name=Eclipse
Exec=/home/shiv/eclipse/javascript-neon/eclipse/eclipse
Icon=/home/shiv/eclipse/javascript-neon/eclipse/icon.xpm
Type=Application

Basically, I updated the contents of Exec and Icon with these pointing to the already installed Javascript-Neon.

Thanks


How to fix sources list to get the MongoDB packages

Going by this tutorial your /etc/apt/sources.list.d/10gen.list file should look like this:

deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen

Make sure you add their repository signing key:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

Then:
sudo apt-get update and sudo apt-get install mongodb-10gen.


apt-get update: Err https://mirror.umd.edu -> server certificate verification failed

Their certificate is invalid as of the other day - they forgot to renew their SSL Certificate

Simply visiting the URL with Firefox and checking the certificate warning shows you this.

  mirror.umd.edu uses an invalid security certificate.

  The certificate expired on 19/04/17 13:00.

  The current time is 21/04/17 14:31.

You can either

wait a bit
Change repository
Change the URLs in your apt sources to http:// (safe enough fi GPG signing is performed)
Set Verify-Peer in your apt.conf settings to false (not recommended as a set-and-forget solution)


windows 7 booting in background but shows the grub screen of UBUNTU 14.04 wallpaper in distorted way

I faced the same problem with Dell Inspiron 15 3542 with Intel HD 4400 graphics.

GRUB_TERMINAL="console"

Enabling the above line in /etc/default/grub solves the problem but disables the graphical grub and presents a basic text based Grub screen.

Mismatch in the resolution of graphical grub and windows boot screen appears to be the cause of the problem.

To enable graphical grub

$ sudo nano /etc/default/grub

Comment the line:

# GRUB_TERMINAL="console"

Uncomment the line:

GRUB_GFXMODE=1024x768

This changes the grub graphical boot screen resolution to 1024x768. Apply changes to grub:

$ sudo update-grub

I tried the following resolutions on my system:

640x480 - not garbled, but windows boot graphics is not displayed
800x600 - garbled at times
1024x768 - works
1366x768 - garbled

The 1024x768 worked well for my system. Experiment with the resolutions and find one suitable for your system. Carry out various boot checks like restarting the system from linux to windows, windows to windows, windows to linux and power-on to boot windows.


How do I with ufw deny all outgoing ports excepting the ones I need?

This is my setup

sudo ufw default deny outgoing
sudo ufw default deny incoming
sudo ufw allow 993
sudo ufw allow 6969
sudo ufw allow out 53
sudo ufw allow out http
sudo ufw allow out https
sudo ufw allow out 465
sudo ufw allow out 587
sudo ufw allow out 993
sudo ufw allow out 6969

This works well with Ubuntu 16.04: Everything works properly

sudo ufw status numbered                  (the reasoning)

[ 1] 993       ALLOW IN       Anywhere      (thunderbird)
[ 2] 6969      ALLOW IN       Anywhere      (qbittorrent)
[ 3] 53        ALLOW OUT      Anywhere      (dns)
[ 4] 80        ALLOW OUT      Anywhere      (http)
[ 5] 443       ALLOW OUT      Anywhere      (https)
[ 6] 465       ALLOW OUT      Anywhere      (thunderbird gmail) (*send)
[ 7] 587       ALLOW OUT      Anywhere      (thunderbird hotmail) (*send)
[ 8] 993       ALLOW OUT      Anywhere      (thunderbird)

*check thunderbird edit> account settings> outgoing server
I would suggest to allow qtorrent only when using it. Peerguadian will be working overtime!
They say there is no spyware on linux. It's just a barrage :)


Did you know you can use more than one kernel on a distribution?

If you want to try different kernels, is always a good idea to have a back-up one that you know that it works (the default kernel of the distro is perfect) just in case.

But, in my experience, for anything related to realtime (so that would include if you broadcast livestream or record professional music) go for lowlatency kernel (distro like ubuntustudio have them set and ready)

for a daily use (surfing, typing, etc) a regular kernel is perfect.

I don't know about zen.


Can I configure separate sound volume for each user?

I've found the solution here. It sets volume level to a particular value after every login. It works with PulseAudio only.

Copy default pulse config file to your home location:

cp /etc/pulse/default.pa ~/.pulse
In your config file locate the following line:

load-module module-always-sink

Immediately after the above line, add the following line:

set-sink-volume 0 {your-volume-level-here}

Volume level is a number in a range 0..65535. For example:

set-sink-volume 0 32768


Ubuntu crashed while upgrading to latest version

Try starting in recovery mode.

[credit to Mitch]
To start Ubuntu into safe mode (Recovery Mode) hold down the left Shift key as the computer starts to boot. If holding the Shift key doesn't display the menu press the Esc key repeatedly to display the GRUB 2 menu. From there you can choose the recovery option.


Ubuntu 18.04 crashes when second monitor connected by hdmi

The solution may be as simple as installing the updated pro Nvidia drivers:

First add the drivers PPA:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt update && sudo apt upgrade

Then from "Activities" window, search for "Software & Updates" and run said program. Under the "Additional Drivers" tab you will see a list of available drivers. Select the one with the highest version number. When it finishes installing reboot. If X starts up without a hitch, you should be good to go.

If X doesn't start, and instead drops you to a command line, purge out the nvidia drivers:

sudo apt purge "*-nvidia-*"
sudo apt autoremove && sudo apt autoclean

Then reboot, and follow the above instructions again, but this time selecting the next driver in the list. In my case driver 396 does NOT work for me but 390 does. Once you find the driver version that works after reboot, your dual monitors should work.


I personnally had the same problem before. What i suggest to you, find text editor that suits best for you, kate sudo apt-get install kate suits for me, and then just mount the ftp location to the nautilus or whatever file explorer you are using, and open the file from there and save to the same place too.

You can mount ftp in this way easy: write to the file-explorer path ftp://yourdomain.com/folder/. Should ask you your credentials after that and mount your ftp destination.

Hope this helps!


The problem is something wrong with TFMpvalue.cpp:

sudo chown username:username TFMpvalue.cpp
Uncomment line 16 in TFMpvalue.cpp and change GetOpt.h into getopt.h


How to convert .m4a audio files to .mp3 use command line?

I note that your input file is actually a Variable Bitrate (VBR) AAC file with an overall bitrate of 71.7 Kbps and a maximum bitrate of 93.8 Kbps. So you actually have two reasonable choices: encode to a Variable Bitrate MP3 file or simply decide on a suitable bitrate for Constant Bitrate (CBR) MP3 encoding. And FFmpeg is certainly the best tool for both of these!

1. Variable Bitrate (VBR) Encoding

This would be my own choice if only for the reason that the original AAC file is also a VBR file. Encoding to MP3 with a variable bitrate of 70-105 Kbps can be mapped to FFmpeg with the -q:a 8 option as below:

ffmpeg -i show.m4a -c:a libmp3lame -q:a 8 output.mp3

And I suspect that this is your best option with your input file.

2. Constant Bitrate (CBR) Encoding

Constant Bitrate (CBR) Encoding is a little over-used IMHO but if this suits your playback equipment best then it is a valid choice. Since your input file has an overall bitrate of 71.7 Kbps and a maximum bitrate of 93.8 Kbps we could perhaps fudge the numbers a little and use the following:

ffmpeg -i show.m4a -c:a libmp3lame -b:a 96k output.mp3

Some experimentation might be in order with good choices for the bitrate being taken from the following LAME 'allowable' standards: 64k, 80k, 96k, 112k. Whatever sounds best on your playback hardware...

References:

FFmpeg MP3 Encoding Guide: FFmpeg Trac's great guide to encoding to mp3. Especially note the VBR mapping table marked 'LAME Bitrate Overview'.


wrong video resolution with AMD HD7560D and ubuntu 16.04

Try specifying the boot resolution in

  /etc/default/grub

under GRUB_GFXMODE=1280x1024. Remember to sudo update-grub to get the settings fixed to the boot process.

I found this to be the only thing that helped with my AMD-A10-APU system. For the time being the drivers that are installed by default work fine for me, though the performance may be different for you.


Install Ubuntu 20.04 on Razer Blade 15 2020 with NVIDIA® GeForce RTX™ 2070 with Max-Q (8 GB GDDR6 VRAM)

On the Blade 15 2020 base model there are issues. After putting the machine on suspend and waking up it starts to go into suspend mode all the time until a reboot. This happens no matter if you use the intel/nvidia or hybrid GPU mode.


How to Add Music to iPod nano 7th Generation

I found this today:  https://help.ubuntu.com/stable/ubuntu-help/music-player-newipod.html.en

copied from above url:

    My new iPod won’t work
    If you have a new iPod that has never been connected to a computer before, it won’t be recognized properly when you connect it to a Linux computer. This is because iPods need to be set up and updated using the iTunes software, which only runs on Windows and Mac OS.

To set up your iPod, install iTunes on a Windows or Mac computer and plug it in. You will be led through a few steps to set it up. If asked for the Volume Format, choose MS-DOS (FAT), Windows or similar. The other format (HFS/Mac) does not work as well with Linux.

Once you have finished setup, the iPod should work normally when you plug it into a Linux computer.


apt-get update only updates your repos.

apt-get dist-upgrade updates your packages with smart conflict resolution, but will not update your distro to 13.04.

apt-get autoremove will remove any packages that are not needed by the system anymore, such as dependencies which are no longer required.

So in short the commands will update your system with the latest packages for your distro (Ubuntu 12.04) and clean up and remove any unnecessary packages.


This is usually called alias and not shortcut.

to do that:

alias CD='cd ..'

Now you can use the command CD instead of cd ..

But you have to note this will be just dynamic and you'll l ose all aliases when you close terminal and start again. To make it permanent you have to add it to your .bashrc.

Run the command

gedit .bashrc

Add the above line (alias declaration) then save and close and source the .bashrc using

source .bashrc

And now the alias CD is permanent .

You can list all aliases you use in your system(ubuntu come with some default aliases such as ls, egrep...), you can just type the command alias and you can list all aliases in the system


This behaviour is currently not possible with a default GNOME installation, see this bug report for details: https://bugzilla.gnome.org/show_bug.cgi?id=773645

As a workaround someone (sun_wang is his username) created this extention that you can use: https://extensions.gnome.org/extension/1414/unblank/

Make sure that the version you choose is compatible with the version of GNOME you are running. To check which version is running, 'Activities' and press 'About'. For more information, see here: https://help.gnome.org/users/gnome-help/stable/gnome-version.html.en


Restart the machine, hold SHIFT while it boots to access the grub menu. Select your working ubuntu grub entry and hit E for edit. Press End to move to the end of the line and add the following to the end of it: reboot=acpi Press Ctr+x to boot with the modified line. (this will only apply this one time)

If that >doesn't work<, continue reading here, else go to next bold title:

Since that didn't work, Restart the machine, hold SHIFT while it boots to access the grub menu. Select your working ubuntu grub entry and hit E for edit. Press End to move to the end of the line and add the following to the end of it: reboot=force Press Ctr+x to boot with the modified line. (this will only apply this one time)

Permanently add working entry:

Now that you found what works for you, reboot=acpi or reboot=force, you can permanently add it to your grub menu. Open /etc/default/grub in your favorite text editor (I use vi at the terminal, so sudo vi /etc/default/grub) and look for GRUB_CMDLINE_LINUX="". Simply add your working entry inside the quotes and save the file. Make sure you use sudo to edit it, as the file permissions, by default, only allow root to write to that file.

Finally, you need to update grub from the file you just changed, so do sudo update-grub afterwards.

EXTRA:

Ought to help you eliminate that extra grub entry you don't need: http://linuxnorth.wordpress.com/2011/03/09/grub2-revisited/


So you deleted the the partitions of ubuntu os. But still have entry in the boot menu. No Problem,You can use EasyBCD to remove the boot option. It have free non-commercial license for personal use. The instructions to use the software are also available on the site.

http://neosmart.net/dl.php?id=1


Where is the information about custom launchers in Unity panel?

There is a unity documentation project, which does claim to have written some info. They don't seem to have done a good job of presenting this documentation to users though. Don't have time to search at the moment...


Need help troubleshooting ubuntu apache internet connectivity

There are 2 Issues you have reported from what I could understand and this is NOT related to Apache settings.

Network Connectivity
Clipboard Sharing

The clipboard sharing can be enabled/disabled in the Vbox after starting it.
By > devices->Shared clipboard ->bidirectional or one way if you prefer.

The network connectivity can be enabled by two ways, if you select NAT, be sure to configure it using the networking applet in the right conner.

The alternative is to use the networking settings in Vbox to "Bridged Mode".
And after starting the instance, go to the network settings and use DHCP if your router/switch can assign additional IPs or else you can try assigning them yourselves.

Let me know, if this solved your issue.


TL;DR: Unless you have tried everything below and now you get a black screen hitting this particular fixed bug, your problem should be solved by now. If you now get:

ERROR:gpu_video_decode_accelerator.cc(208)] Not implemented reached in void content::GpuVideoDecodeAccelerator::Initialize(media::VideoCodecProfile, IPC::Message\*) HW video decode acceleration not available.

after trying everything below, then you should try starting Chrome/ium with --disable-gpu-sandbox or --blacklist-accelerated-compositing. If problems persists, revert all changes and report a bug detailing what is your problem, what have you tried, and all the data possible: about:gpu, about:version, the drivers you are using, kernel version, etc. For the ones that still want to test their luck, use the switch mentioned earlier, does that are having issues with AMD cards, the "Forcing Chrome/ium to use HWA" section works for you. Those using Nvidia privatives drivers or the xorg-ppa-edge, should test with Firefox and see if the issue happens there too.

Nvidia permissions problems

  NVIDIA: could not open the device file /dev/nvidia0 (Operation not permitted).

This means that you are not part of the video group. This is solved as easy as you could be:

sudo adduser Hal video

Then restart your session and you are there.

Source: http://forums.gentoo.org/viewtopic-p-7232328.html?sid=900a2d59cdb52e1a5f530598dfa1be24#7232328

Forcing Chrome/ium to use HWA

You should check your about:gpu section in Chrome/ium. In older PC's HW Acceleration is disabled by default and you only can enable it by overriding the settings in the about:flags.

Open the about:flags in your address bar
Look for Override software redendering list
Click "Enable"
Restart Chrome/ium

You can also start chrome using chrome --ignore-gpu-blacklist but having to do so each time is not ideal.


Making my 32-bit program code compile on 64-bit Ubuntu (looking for safe path)

It is very strange that whatever program you are trying to compile ships a 32 bit binary library instead of its source code, but apparently this library can be found here, and if you compile that you should get a 64 bit libgll that you should be able to use to compile this program for 64 bit.


Installing libopnempi-dev on WSL with Ubuntu 20.04 failing

The issue was solved after I uninstalled my Ubuntu from the WSL and reinstalled it from the Microsoft Store. I suspect this was being caused due to the fact that I updated to 20.04 from inside the WSL environment.


Jacob Vlijm's python script was very useful. I am sharing a shell script to do this if someone may find it useful.

#!/bin/sh
ls -d ~/.gconf/desktop/gnome/keybindings/*/
    if [[ `echo $?` == 2 ]]; then
        shortCutNumber=0
        else
        shortCutNumber=$((`ls -d ~/.gconf/desktop/gnome/keybindings/*/ | tail -c 3 | head -c 1`+1))
    fi
    echo -e '<?xml version="1.0"?>' > %gconf.xml
    echo -e '\t<gconf>' | tee -a %gconf.xml
    echo -e '\t<entry name="action" mtime="`date +%s`" type="string">' | tee -a %gconf.xml
    echo -e '\t\t<stringvalue>gnome-terminal -e '`pwd`/LanChat.sh'</stringvalue>' | tee -a %gconf.xml
    echo -e '\t</entry>' | tee -a %gconf.xml
    echo -e '\t<entry name="name" mtime="`date +%s`" type="string">' | tee -a %gconf.xml
    echo -e '\t\t<stringvalue>QryptoChat</stringvalue>' | tee -a %gconf.xml
    echo -e '\t</entry>' | tee -a %gconf.xml
    echo -e '\t<entry name="binding" mtime="`date +%s`" type="string">' | tee -a %gconf.xml
    echo -e '\t\t<stringvalue>&lt;Alt&gt;q</stringvalue>' | tee -a %gconf.xml
    echo -e '\t</entry>' | tee -a %gconf.xml
    echo -e '</gconf>' | tee -a %gconf.xml
    mkdir ~/.gconf/desktop/gnome/keybindings/custom$shortCutNumber
    mv %gconf.xml ~/.gconf/desktop/gnome/keybindings/custom$shortCutNumber/

The script first checks whether there exists any custom shortcuts already. And then creates the %gconf.xml file inside a new custom folder with the necessary settings.


Changing C drive permissions from Ubuntu to Windows?

So can i do it from ubuntu?

No. Permissions on Windows are not changeable from Ubuntu. If you have problems accessing a disc from within Windows you will have to fix this from within Windows.
2 quotes:

Windows now contains some newer components like Junctions, Symbolic Links, and other NTFS system files that can cause major problems if they are mishandled, such as changing the permissions.

and

If you've tried these suggestions and still can't sign in:
If you have Windows 8.1, you'll need to reinstall Windows.

I am glad I am using Linux.


You have to mark eclipse as an executable file first.

chmod +x eclipse
./eclipse


Are there Ubuntu security notices feeds for specific releases

Created a bug report based on @ændrük's comment.

  Ubuntu Security Notice feeds per release

  Following up on bug #71685, it would be great if there were separate web feeds for each release.

As of 2015, the status has changed as Confirmed → Fix Released but the following comment in late-2017 noted that a pop-up menu allows to filter the web page by release, but not the RSS feed.

To this date, the RSS feed has yet to provide separate feeds per release.


VM Ubuntu Server 16.04 no network connection with static IP

Thanks steeldriver! What fixed it was...

Turned off server
changed adapter from NAT to Bridged
Turned Server on
I was able to ping out but could not ping the computer
Changed the IP
Shutdown Server
Turned Server back on

After those steps I was able to ping both ways.


Attribute error:portal_url while testing a method

first I created the test code like below

def test_addServerUrl(self):
    yyyy = xxxx(self.portal.REQUEST, self.portal)

Then i edited my code like below

def test_addServerUrl(self):
        request = self.portal.REQUEST
        yyyy= xxxx(self.portal, request)

Then it worked properly... My attribute error was solved....


Making file size-dependent editor (for the same mimetype)

You need a desktop file, and a wrapper script:

The desktop file

Create a desktop file

nano ~/.local/share/applications/wrapper.desktop

Add the configuration below

[Desktop Entry]
Name=File size dependent editor
Comment=File size dependent editor
Exec=/home/user/bin/wrapper %f
Icon=gedit
Terminal=false
Type=Application
Categories=Editor;
StartupNotify=true
MimeType=text/plain;

Replace user in Exec=/home/user/bin/wrapper %f with your username, the output of

echo $USER

Replace the icon name in Icon=gedit with a name or path of your choice
Use MimeType=text/plain to specify the mime types of files for which the decision is to apply. Separate multiple mime types via ;

Get the mime type via

mimetype your_file

e.g. for a text file

text/plain

If you want to use a editor with a CLI, like nano, than replace false in Terminal=false with true

The wrapper script

Create a new script

mkdir -p ~/bin
nano ~/bin/wrapper

Add the code below

#!/usr/bin/env bash
LARGE_FILE_EDITOR="glogg"
SMALL_FILE_EDITOR="gedit"

MAX_SMALL_FILE_SIZE=1000000

FILESIZE=$(stat -c%s "$1")

if [ "$FILESIZE" -le $MAX_SMALL_FILE_SIZE ]; then
        "$SMALL_FILE_EDITOR" "$1"
else
        "$LARGE_FILE_EDITOR" "$1"
fi
exit 0

Define your editor for large files in LARGE_FILE_EDITOR, e.g. glogg
Define your editor for small files in SMALL_FILE_EDITOR, e.g. gedit
Define the maximum file size for the $SMALL_FILE_EDITOR in MAX_SMALL_FILE_SIZE, e.g. 1000000 for 1MB
Make your wrapper script executable

chmod +x ~/bin/wrapper

Restart Unity/GNOME Shell, for the GNOME Shell e.g. Alt-F2, type r and Enter
Associate one or more file types with the wrapper

Open your file manager and right click on a file for which the decision is to apply
Click Open With Other Application
Click the button View All Applications
Select the entry File size dependent editor

Enjoy ;)


This is what I did in Ubuntu 20.04 to remove undo-deleted-popup.
However as pointed out by @vanadium in the comment, these below steps will remove any application popup, not only the delete dialog popup of nautilus

First in GNOME Tweaks tool check which is the current theme. Mine is Yaru

Check in /usr/share/themes/

Found Yaru (the same theme currently in use, as checked in GNOME Tweaks)

Now inside Yaru, had 2 folders named gtk-3.0 and gtk-3.20

I opened Terminal from both of those folders one by one and ran
sudo gedit gtk.css
added the line
.app-notification { padding: 0; margin: -80px 0 0 0; opacity: 0;}
at the end
Saved file, closed, now refreshed theme in GNOME Tweaks (change to another theme, and again change back to your original theme in use).


Why is my ubuntu trying to fetch aarch64 packages on x86_64 system

"aarch64" is listed as a foreign architecture. This is not an architecture name in ubuntu. Open a terminal and run:

sudo apt-get remove --purge `dpkg --get-selections | grep aarch64 | awk '{print $1}'`
sudo dpkg --remove-architecture aarch64.


Why is the git on my system when I never installed it?

Short answer:

  Why is git on my system?

If you’re sure you didn't install it then a program you installed needs it to work.

  Should I update it?

Well if running sudo apt update updates it, then fine else if you’re trying to update that instance only, better find which program installed it first and be sure a newer version is ok. Check that with apt-cache depends git | less.


Dummy Output in 20.04 - works after reinstall but not after reboot

This has happened to me on my Linux Mint device after the update.
What I found was that it was caused by the alsa-lib package update, in detail the libasound2 libasound2-data libatopology2 dependencies upgrade.
I found the solution here:
https://forums.linuxmint.com/viewtopic.php?t=334345
This should also work on other Debian devices.
TLDR;
for now you can revert back to older version of the package to fix the sound before the bug is patched by alsa-lib devs.
Use command:
sudo apt update && sudo apt install libasound2=1.2.2-2.1 libasound2-data=1.2.2-2.1 libatopology2=1.2.2-2.1


Ubuntu 18.04 "Super+O" can't trigger shortcut event

I ran into this problem (Ubuntu 19.10) and found this page. I was trying to use Super+O for a shortcut but it didn't work. Thanks to Anbu's answer showing gsettings I was able to figure out what was grabbing the key:

(for schema in $(gsettings list-schemas); do gsettings list-recursively $schema; done) | grep '<Super>o'

It showed org.gnome.settings-daemon.plugins.media-keys rotate-video-lock-static ['<Super>o'] so I removed it with

gsettings set org.gnome.settings-daemon.plugins.media-keys rotate-video-lock-static []

I restarted and was able to use the key again. I found lots more unwanted bindings with

(for schema in $(gsettings list-schemas); do gsettings list-recursively $schema; done) | grep '<Super>'

and then removed them with gsettings set …


It seems your device is hard or soft blocked.

I would try rfkill unblock all. If it is not a question of drivers, this should re-enable your wifi.


I lost Thunderbird from the Launcher and can't get it back

Go to Systems Settings -> Details -> select Default Applications from the pane on left side -> click the little black arrow to the right of Mail and select Thunderbird from the dropdown menu to change the default mail application to Thunderbird.

Then search in the Dash for Thunderbird and open Thunderbird. The Thunderbird icon will appear on the Launcher. Right-click the Thunderbird icon on the Launcher and select Lock to Launcher to make the Thunderbird icon appear on the Launcher permanently.


How long does it take to boot from a LiveUSB?

Unless you have a very slow machine -- probably below the specs that will run Windows 10 -- it shouldn't take anything like that long to start, at least to the "try" or "install" choice.  That doesn't seem applicable to a Core i7.

With no error message on your screen, it's likely there's a graphics problem.  If the thumb drive weren't bootable, you'd have gotten an error; almost anything else that could go wrong would also give a (text) error message rather than a blank screen -- but some graphics problems will result in the OS thinking it's working, and Ubuntu Live is sitting there, waiting for you to respond to a prompt you can't see.

To get out of the black screen, you should be able to hit CTL-ALT-DEL several times to prompt a reboot, or if that fails, just use the power button (you're likely to have to hold it for up to five seconds).


Why the Ubuntu 13.10 Beta 1 ISO files are so big?

The page you linked to contains the iso images for the source code as well. The normal distribution comes along only with the compiled binaries, not the source code. What you're looking for is this. And btw the beta for regular ubuntu is still unavailable as of now. What you can get are the daily build images.


How can I encrypt Ubuntu filesystems only?

It is not that easy to do that and you should know exactly what you are doing. Writing a stepwise instruction set here is nearly impossible, but there are good official How-To's:

https://help.ubuntu.com/community/EncryptedFilesystemHowto#So_How_Do_I_Encrypt_My_Home_Directory.3F

Relatively easy will be to encrypt your home folder, if you get a partition freed, then you can move your data to the new "encrypted partition" and after that mount this new partition using the fstab file. Encrypting the wohle ubuntu installation requires much experience and should be done with care.


System won't start after installation of Nvidia drivers

Your problem is very similar to ones I have been experiencing.
After installing NVIDIA driver (either 'current' or 'current updates'- makes no difference)  rebooting will fail to load graphics. NOTE: I also had the same problem during (clean) install, so if you did not, below may not be appropriate for you.
To circumvent this, at the grub menu highlight your normal choice, but press 'SHIFT' + 'e' (on occasion I have had to press 'e' twice). This should allow you to edit the configuration that Ubuntu will load. Use the arrow keys to move down to the line containing the words "quiet splash". Delete "quiet splash" and replace with "nomodeset" and press 'CTRL' and 'X' to save your change and return you to the Grub menu. You then press 'Enter' normally and you should see Ubuntu loading. Good Luck! If this does allow you to boot Ubuntu, then you will either need to repeat the procedure each time you boot or (preferably) make the Grub change permanent. There is already an answer somewhere for this (try How do I set 'nomodeset' after I've already installed Ubuntu?).


There is an extensive PPA here - which is very similar to the lucid bleeding edge ppa (and with the same author) - will uplift maverick to the latest versions of various applications including v1.1.10 of VLC.

However, I would use this PPA with care since it will uplift approx. 69 packages.

I would add the PPA, followed by

sudo apt-get update

sudo apt-get install vlc

This should upgrade vlc to the latest version.

Then I would untick the PPA from software sources and re-run

sudo apt-get update

This will stop any further packages from the PPA being installed.

Note - I cannot vouch for the stability/safety or otherwise of any packages from this PPA.  As for the majority of PPA's - use at your own risk.


Why there is no option to enable silent automatic updates of Ubuntu, apps and PPA?

Because updates can break your system/alter it's behaviour. If you don't have a clue how to edit some text files or about the terminal, you most likely don't know about recovery either. Also there is no need to update something that's not security critical if it works fine.


Keryx - Installing Applications From Hard Drive

Use Gdebi to install applications that are on the hard drive.
To install gdebi, open a terminal via dash and type.

sudo apt-get install gdebi

Now back to keryx, you can just add required repository to your system by typing following in the terminal

sudo add-apt-repository {your ppa repository here}

Then the repository will be available in keryx as well.

To know which PPA you actually need to add,you can visit the homepage or launchpad page of the application. There you will find the PPA repository address.

To use gdebi, right click on any one/multiple .deb package/s and select "open with gdebi".


Why does changing a init.d service start script makes no difference? The /etc/init.d/ script has a stale ExecStart

Changing that file did nothing. I was editing the wrong file. I had to also update

sudo nano /etc/systemd/system/odoo.service

since my system uses systemd not init.d


UFW locks me out of server everytime I run it

I've learned that this is problem with my OpenVZ VPS; you cannot modify kernel files on a non KVM system like OpenVZ.

Your best bet is to forget about UFW entirely and write the iptable rules directly, or try this work around:

http://blog.kylemanna.com/linux/2013/04/26/ufw-vps/


How to change the session language on login in Ubuntu 13.04

You can replace the default unity-greeter with lightdm-gtk-greeter. How you do that is described at

System Settings -> Language Support -> Help -> Alternative language settings


unable to install jdk and jre in ubuntu 14.04

First run these commands in terminal (press Ctrl+Alt+T):

sudo apt-get --fix-broken install
sudo apt-get clean
sudo apt-get autoclean
sudo apt-get autoremove
sudo dpkg --configure -a
sudo apt-get update then following

Changed software and updates to main server
Unmarked all "other software" sources

Reload it and run for software update,it installed tzdata(i think this is the reason)
Run

sudo apt-get install openjdk-7-jdk openjdk-7-jre-headless


My system is broken I guess -- issues with libqt4-test

Looks like multi-arch skew. Apt can see version 4:4.8.1-0ubuntu4.2 for i386 and 4:4.8.1-0ubuntu4.3 for amd64, but it needs the same version for both architectures.

Maybe you updated at a really bad time, when this package had built for amd64 but not i836 yet?

4:4.8.1-0ubuntu4.3 has built for both of them, so so you should be able to do an apt-get update followed by an apt-get -f install.

Solution:
dpkg --force-depends --remove libqt4-test libqt4-test:i386 to remove both of them, then re-install them with apt-get -f install libqt4-test libqt4-test:i386


How to get % cpu and % memory of process during OpenSSL encryption

You can use time command for this purpose too :)

command time -f "\nElapsed: %E \nUser: %U \nSystem: %S \nMemory: %M\n" [your command/script here] 1> /dev/null

with top you can do something like:

top -p [pid of your process] -b > log

e.g:

top -p `pidof openssl` -b > log


USB Disk stuck in read only after dd an ISO

A quick fix (and sort of a hack) to get it out of read only mode, (this will delete the contents of the usb device!!!) is to open "startup disk creator" in ubuntu and choose to erase the device and it will be out of read only mode.

  "that worked. but why? how can I do that in terminal?"

I don't know exactly why but it seems to be python related. I'm doing some digging and will report back with any findings.

How to in terminal:

According to this post you can change the read only attribute using hdparm like so (assuming the device is /dev/sdb):

sudo hdparm -r0 /dev/sdb

Then, remount the device. That may involve simply unplugging and plugging the device back in or you could run the following command to remount the device in read/write mode:

sudo mount -o remount,rw /dev/sdb /media/$USER/8E22-6590


I had the same problem...
I installed version 16.04 LTS over the broken install using a USB install flash drive.
I used the exact password of the previous version in the set-up.
16.04 LTS found the 15.10 version and asked if I would like to upgrade.

I clicked YES!

Success.
Jon.


Logs for the upgrade are found in

/var/log/dist-upgrade

Mine looks like this

-rw------- 1 root root 511516 Jul 19 19:05 apt-clone_system_state.tar.gz
-rw-r--r-- 1 root root 428135 Jul 19 19:28 apt.log
-rw-r----- 1 root adm  636471 Jul 19 19:28 apt-term.log
-rw-r--r-- 1 root root 116390 Jul 19 19:28 history.log
-rw-r--r-- 1 root root   1125 Jul 19 19:05 lspci.txt
-rw-r--r-- 1 root root  64976 Jul 19 19:29 main.log
-rw-r--r-- 1 root root     78 Jul 19 19:29 xorg_fixup.log

Presumably I upgraded this VM on July 19th.


dpkg: error processing package ramme (--install)

You may wish to try the below instead if you've yet to resolve this issue.

Download the appropriate .deb file from Github.com/ramme/releases. in this case if you are on a 64 bit processor you'd download the
 Ramme_3.2.5_amd64.deb else you would install the 32 bit version Ramme_3.2.5_i386.deb
from Github.

Then simply just run the command: $ sudo dpkg -i Ramme_3.2.5_amd64.deb
or $ sudo dpkg -i Ramme_3.2.5_i386.deb respective to what processor you have. Make sure to run this in the directory that the file has been downloaded to, e.g /home/USER/Downloads/


Running chromium with multiple data-dir using desktop files on ubuntu 20.04

The snap Chromium process, running in strict confinement mode, cannot read or write to all subdirectories in your home directory. For example:

it can read the ~/.config/user-dirs.dirs file on launch to locate the user's Download directory;
it can't, though, write to ~/.config/ to create a ~/.config/my-app/ data directory; but
it can write to ~/ to create a ~/my-app/ data directory and its contents.

If you open the WhatsApp .desktop file that you used as an example with gtk-launch in the command line:
$ gtk-launch ~/.local/share/applications/whatsapp.desktop

You should get an error message like this:

Failed to create data directory - Chromium cannot read and write its
data directory: /home/tamar/.config/.whatsapp

To get an app directory that is hidden from view in home you'll need to put it in ~/snap/chromium/common/<appname>. Using your example, the line in the .desktop file would be:
Exec=/snap/bin/chromium --user-data-dir=snap/chromium/common/whatsapp --class=whatsapp --app=https://web.whatsapp.com/
StartupWMClass=whatsapp


Ubuntu Software Center reviews in own language

I'm afraid that might not be possible for now. For me, most reviews I see was written in English, sometimes I wanted the reviews in my language as well, but I can't. This may be a good function to recommend to the developers.


Keyboard shortcuts gone from menus in some programs in Ubuntu 12.04

This is now a documented Ubuntu bug - you can follow its progress here and read about it over here


Can't access my Raring installation after adding a Quantal install

It looks as if grub of Quantal installation is dominating your whole installation ?

You have to find out the partition of Quantal and the partition of Kubuntu.

Then it is your choice with which Linux-Installation you want to boot and login
there with concerning login-display-manager.

Here is an example, where is described how to re-install grub into correct partition :

http://dailyblogged.com/1028/booting-ubuntu-with-the-chameleon-bootloader/

In the end you would only have to know, which distribution you want to deal with as the
distribution to log in with.

Kubuntu is not lost - it is still present there. It looks only as if Kubuntu and Quantal in your machine have used the same MBR.


I logged on saw copy of path directorys, files etc all over my laptop screen

This may solve your issue:

Select all files in your desktop background,
Cut them,
Open a file browser and go to home,
Paste them


Thanks to @MrShunz and @chili555 in the comments. These are the settings that worked for me:

Subnet: 192.168.1.0/24
Address: 192.168.1.101
Gateway: 192.168.1.1
Name servers: 8.8.8.8


How do you recover from a failed upgrade ('apt-get -f install' and 'dpkg --configure -a' fail)?

I managed to rescue the upgrade, although I am not 100% sure what it was that worked. Others might still benefit:

I managed to recover my X session by switching to a command-line terminal (Ctl+Alt+F2) and then back to the X terminal (Ctl+Alt+F7), which then asked me to login again. The system was unstable but worked. I was then able to close a couple of upgrade-related prompts.
It seems that the update manager did not disable PPA's, so I cleaned up /etc/apt/sources.list.d/ (deleted all entries). It was suggested on IRC (#ubuntu) that I should use ppa-purge to clean up the PPA's, but in the end I simply deleted them.
After this, sudo apt-get update and sudo apt-get -f install cleared up most of the remaining issues, but there were still dependency problems with samba.
I managed to fix samba by removing it (sudo apt-get remove samba) and reinstalling it (sudo apt-get install samba).

After this, the system was more-or-less stable. I had to also remove and reinstall unity after a restart, but otherwise it's been working well.


You should try removing the USB disk and then press and hold the power key for like 10 seconds on your laptop to turn it off. You can do this even with the USB drive plugged in. Then make sure you made the bootable drive using some good utility like Rufus and chose GPT for UEFI Systems. (Ofcourse if your hard disk is GPT)


can't write after format ext 4 by gparted

The change of ownership should be made to the mount point (e.g., /data), and not the partition (e.g., /dev/sda1).

For example if /dev/sda1 was mounted on /data, then the command to change the ownership to your username would be something like:

sudo chown username.groupname /data

Where username is your username and groupname is the group you wish to have access.  If only one person uses the computer then this would likely also be the same as username in many distros.


I think the most direct answer to your question is:

compgen -b

which lists all built-in commands

compgen -c

lists all commands (maybe better to use compgen -c | more since it's a long list)

A nice list of core commands can be found here.


How to automatically turn off & block all network activity on lock screen?

This answer was inspired by this answer to How to run a command or script at screen lock/unlock?

For Ubuntu 14.04:

Assuming your using the default network manager, create a script (I put mine in ~/bin and called it netlock.sh)

Here's the content:

#!/bin/bash

dbus-monitor --session "type='signal',interface='com.ubuntu.Upstart0_6'" | \
(
  while true; do
    read X
    if echo $X | grep "desktop-lock" &> /dev/null; then
      nmcli nm enable false;
    elif echo $X | grep "desktop-unlock" &> /dev/null; then
      nmcli nm enable true;
    fi
  done
)

This script will disable networking on lock and re-enable on unlock.

If you want it to run every time at startup see How to run scripts on start up?

If you want it to run everytime you login, see How do I start applications automatically on login?

For Ubuntu 16.04: simply edit the script and change the nmcli nm enable false to nmcli networking off and the nmcli nm enable true to nmcli networking on as required due to changes in nmcli

Of course anything already downloaded and buffered will still play until the buffers run dry so if you want more exact control you'll have to use the pause button on the youtube player.

I can't gaurantee that everything will resume where you left off, as a server can drop inactive connections, but hopefully this is close to what you want.


I have an ASUS MB169B+ that works with Ubuntu 16.04 and 17.10 with VirtualBox VMs and native installs. Getting an acceptable display resolution was not a trivial exercise and the result is not perfect.

Performance in the portrait orientation is disappointing.

It's a nice little monitor. Works very well in Windows and there is some effort put to keeping the official driver up to date with Ubuntu. However I suspect that effort is a labor of love, not a business priority.

The standard driver is the DisplayLink: http://www.displaylink.com/downloads/ubuntu,

The standard driver didn't go well for me so I settled on this driver: https://github.com/AdnanHodzic/displaylink-debian. I had to hack the install script to make it accept the Ubuntu release but installation went quite smoothly after that.

( UPDATE: I just checked github and the developer has updated the script to 17.10 so the situation may have improved.)

If you don't mind a bit of tinkering, and/or can wait for the drivers to improve... well, that's up to you.


compile soft without cmake or how to install cmake without libcurl4

Currently I have no idea how to compile in case of missed cmake, but we can install Dino packages

from OBS for Debian 9 (preferable as it is repository - you will get updates automatically):

cat <<EOF | sudo tee /etc/apt/sources.list.d/network:messaging:xmpp:dino.list
deb http://download.opensuse.org/repositories/network:/messaging:/xmpp:/dino/Debian_9.0/ /
EOF
wget -nv https://download.opensuse.org/repositories/network:messaging:xmpp:dino/Debian_9.0/Release.key -O Release.key
sudo apt-key add - < Release.key
sudo apt-get update
sudo apt-get install dino

and launch it with dino.
from Debian experimental repository:

cd ~/Downloads
wget http://ftp.debian.org/debian/pool/main/d/dino-im/dino-im_0.0.git20180603-1_amd64.deb
wget http://ftp.debian.org/debian/pool/main/d/dino-im/dino-im-common_0.0.git20180603-1_all.deb
sudo apt-get install ./dino-im*.deb

and launch it with dino-im.


Chrome opens files with wrong application

I found out that Chrome uses xdg-open to open files.

I tried to open a file with xdg-open in the commandline. Which opened the same applications as Chrome did. So I viewed the output of xdg-open and found out, that xdg-open called gvfs-open, which was not installed on my system.

After installing it with sudo apt-get install gvfs-bin xdg-open (and Chrome) uses the right applications to open my files.


Simply install the php alternative package
(https://packages.ubuntu.com/bionic/php)

sudo apt install php

And you will get new symbolic links

~$ ll /usr/bin/php7.2
-rwxr-xr-x 1 root root 4.7M Apr 18 16:12 /usr/bin/php7.2*

~$ ll /usr/bin/php
lrwxrwxrwx 1 root root 21 Mar  7 17:05 /usr/bin/php -> /etc/alternatives/php*

~$ ll /etc/alternatives/php
lrwxrwxrwx 1 root root 15 Mar  7 17:05 /etc/alternatives/php -> /usr/bin/php7.2*

~$ php -v
PHP 7.2.17-0ubuntu0.18.04.1 (cli) (built: Apr 18 2019 14:12:38) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.17-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies

~$ php7.2 -v
PHP 7.2.17-0ubuntu0.18.04.1 (cli) (built: Apr 18 2019 14:12:38) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.2.17-0ubuntu0.18.04.1, Copyright (c) 1999-2018, by Zend Technologies


OpenJDK 11 error when running apt update

I was also facing the same issue. Fixed the issue by following steps;

Went to Software & Updates.
Navigate to "Other Software" Tab.
Unchecked the entry "http://ppa.launchpad.net/openjdk-r/ppa/ubuntu bionic main"

Pressed the Close button.

After that, I ran following commands.

sudo apt-get upgrade
sudo apt-get update

Done.


Can I change gEdit editor preferences according to the identified programming language?

Not that I could see, I think you have to move up the IDE - editor to get to where you are wanting to go.

Geany might do this...

http://www.geany.org/Main/About


How to change frequency range for intel_pspace performance govenor

The processor can back off the CPU frequencies by itself, even in performance mode.
In performance mode, with HWP enabled, you should not be able to detect any performance degradation. Note also that adjusting various minimums would not have any effect on performance mode.
Now, if the desire is really to always get an exact CPU reported frequency then here are some methods:
first you have to deal with maximum CPU frequency as a function of active cores. Turbostat will list this information for you, if you do not ask it to be quiet. Example 1 (i7-2600K):
$ sudo turbostat
...
cpu5: MSR_TURBO_RATIO_LIMIT: 0x23242526
35 * 100.0 = 3500.0 MHz max turbo 4 active cores
36 * 100.0 = 3600.0 MHz max turbo 3 active cores
37 * 100.0 = 3700.0 MHz max turbo 2 active cores
38 * 100.0 = 3800.0 MHz max turbo 1 active cores

So even if I set the minimum CPU frequency to 3.8 GHz, the processor itself will override that as a function of active cores. Therefore I would have to set the maximum CPU frequency to 3.5 GHz to avoid this issue.
Example 2 (i5-9600K):
cpu5: MSR_TURBO_RATIO_LIMIT: 0x2b2b2e2e2e2e2e2e
43 * 100.0 = 4300.0 MHz max turbo 8 active cores << I only have 6 cores
43 * 100.0 = 4300.0 MHz max turbo 7 active cores << I only have 6 cores
46 * 100.0 = 4600.0 MHz max turbo 6 active cores
46 * 100.0 = 4600.0 MHz max turbo 5 active cores
46 * 100.0 = 4600.0 MHz max turbo 4 active cores
46 * 100.0 = 4600.0 MHz max turbo 3 active cores
46 * 100.0 = 4600.0 MHz max turbo 2 active cores
46 * 100.0 = 4600.0 MHz max turbo 1 active cores

Observe that I have it set not to do CPU frequency reduction as a function of active cores.
Disclaimer: do not do this unless you know for certain that your system is capable of dealing with the heat, and current requirements. Also requires an unlocked processor.
Now, even so, the CPU frequency might not hold at 4.6 GHz in performance mode:
$ sudo turbostat --Summary --quiet --show Busy%,Bzy_MHz,IRQ,PkgWatt,PkgTmp --interval 10
Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt
0.14    4579    650     32      2.10  <<<
0.40    4600    507     32      2.27
0.09    4600    270     31      2.01
0.13    4600    322     32      2.10
0.02    4600    205     31      1.99
0.11    4600    229     32      2.04
0.10    4600    269     32      2.02
0.08    4600    300     32      2.00
0.04    4598    443     32      2.01
0.05    4600    215     32      1.98
0.02    4586    210     32      1.95 <<
0.05    4594    233     32      1.97 <<
0.01    4600    246     32      1.95

This can be eliminated by disabling idle states entirely, at the cost of a lot of power:
$ echo 1 | sudo tee /sys/devices/system/cpu/cpu*/cpuidle/state*/disable

.
$ sudo turbostat --Summary --quiet --show Busy%,Bzy_MHz,IRQ,PkgWatt,PkgTmp --interval 10
Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt
100.26  4600    60109   47      52.88  <<< not 100% busy, but 100% idle state 0
100.26  4600    60113   48      53.01  <<< if no idle states enabled the kernel will use 0.
100.26  4600    60107   48      53.01
100.26  4600    60183   48      53.01

O.K. but there is also another method. it turns out that Idle State 2 is a problem with HWP, so just disable it instead:
doug@s18:~/idle$ echo 1 | sudo tee /sys/devices/system/cpu/cpu*/cpuidle/state*/disable
1
doug@s18:~/idle$ sudo ~/c/msr-decoder^C
doug@s18:~/idle$ echo 0 | sudo tee /sys/devices/system/cpu/cpu*/cpuidle/state*/disable
0
doug@s18:~/idle$ echo 1 | sudo tee /sys/devices/system/cpu/cpu*/cpuidle/state2/disable
1
doug@s18:~/idle$ grep . /sys/devices/system/cpu/cpu3/cpuidle/state*/disable
/sys/devices/system/cpu/cpu3/cpuidle/state0/disable:0
/sys/devices/system/cpu/cpu3/cpuidle/state1/disable:0
/sys/devices/system/cpu/cpu3/cpuidle/state2/disable:1
/sys/devices/system/cpu/cpu3/cpuidle/state3/disable:0
/sys/devices/system/cpu/cpu3/cpuidle/state4/disable:0
/sys/devices/system/cpu/cpu3/cpuidle/state5/disable:0
/sys/devices/system/cpu/cpu3/cpuidle/state6/disable:0
/sys/devices/system/cpu/cpu3/cpuidle/state7/disable:0
/sys/devices/system/cpu/cpu3/cpuidle/state8/disable:0

.
$ sudo turbostat --Summary --quiet --show Busy%,Bzy_MHz,IRQ,PkgWatt,PkgTmp --interval 10
Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt
0.02    4600    332     35      1.96
0.03    4600    209     35      1.94
0.09    4600    290     35      2.00
0.17    4600    377     35      2.07
0.03    4600    205     34      1.94
0.05    4600    192     35      1.95
0.15    4600    274     35      2.04
0.04    4600    208     35      1.96
0.11    4600    279     35      2.02
0.06    4600    219     34      1.97
0.13    4600    251     34      2.03
0.03    4600    173     34      1.94
0.11    4600    343     34      2.02
0.02    4600    205     33      1.94
0.03    4600    180     34      1.94
0.04    4600    183     34      1.95
0.12    4600    250     34      2.03
0.08    4600    236     33      1.99
0.02    4600    225     34      1.94
0.02    4600    165     34      1.93
0.01    4600    173     33      1.93
0.01    4600    170     33      1.93
0.02    4600    200     33      1.95
0.02    4600    199     33      1.94
0.02    4600    218     33      1.94
0.01    4600    161     33      1.93
0.01    4600    170     33      1.94
0.01    4600    187     33      1.94
0.02    4600    218     33      1.95
0.02    4600    176     33      1.94
0.01    4600    212     32      1.94

For completeness, do the i7-2600K, with no HWP.
$ grep . /sys/devices/system/cpu/cpu3/cpufreq/*
/sys/devices/system/cpu/cpu3/cpufreq/affected_cpus:3
/sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_max_freq:3800000
/sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_min_freq:1600000
/sys/devices/system/cpu/cpu3/cpufreq/cpuinfo_transition_latency:20000
/sys/devices/system/cpu/cpu3/cpufreq/related_cpus:3
/sys/devices/system/cpu/cpu3/cpufreq/scaling_available_governors:ondemand performance schedutil
/sys/devices/system/cpu/cpu3/cpufreq/scaling_cur_freq:1605486
/sys/devices/system/cpu/cpu3/cpufreq/scaling_driver:intel_cpufreq
/sys/devices/system/cpu/cpu3/cpufreq/scaling_governor:ondemand
/sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq:3800000
/sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq:1600000
/sys/devices/system/cpu/cpu3/cpufreq/scaling_setspeed:<unsupported>
doug@s15:~/diag$ grep . /sys/devices/system/cpu/cpu3/cpufreq/*^C
doug@s15:~/diag$ echo performance | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
performance
doug@s15:~/diag$ echo 3500000 | sudo tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq
3500000
doug@s15:~/diag$ sudo turbostat --Summary --quiet --show Busy%,Bzy_MHz,IRQ,PkgWatt,PkgTmp --interval 10
Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt
0.02    1806    453     28      3.75
0.02    1889    340     28      3.73
0.01    1896    268     31      3.72
0.02    1771    437     28      3.73

Hey, why is the CPU frequency not stable? Well, for non HWP processors, only the disable all idle states method works. A bit of a response boost can be obtained via setting energy performance bias (only used in non HWP mode):
$ cat /sys/devices/system/cpu/cpu3/power/energy_perf_bias
6
doug@s15:~/diag$ echo 0 | sudo tee /sys/devices/system/cpu/cpu3/power/energy_perf_bias
0
$ echo 1 | sudo tee /sys/devices/system/cpu/cpu*/cpuidle/state*/disable

.
$ sudo turbostat --Summary --quiet --show Busy%,Bzy_MHz,IRQ,PkgWatt,PkgTmp --interval 10
Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt
100.00  3500    20114   52      49.06
100.00  3500    20146   54      49.49
100.00  3500    20096   58      49.87
100.00  3500    20086   59      50.17
100.00  3500    22609   61      50.50
100.00  3500    20110   62      51.02
100.00  3500    20105   63      51.53
100.00  3500    20081   65      51.78
100.00  3500    20059   66      52.02
100.00  3500    20090   67      52.23
100.00  3500    20717   68      52.37
100.00  3500    20066   68      52.48
100.00  3500    20074   68      52.58
100.00  3500    20222   71      52.78
100.00  3500    20109   70      52.83
100.00  3500    20075   70      52.81
100.00  3500    21040   70      52.92
100.00  3500    20066   70      52.95


I tried to uninstall eclipse indigo to update to juno on 11.10 lubuntu. Now computer won't boot

It was incredibly long winded so I made it into a blog post

I managed to save my files because I keep a Unetbootin lubuntu on my usb key so I booted from that and backed up my files.

I tried to install alongside my old installation but something had corrupted. I do not know what -presumably messing about with something in the admin area (not sure what opt and usr really are to be honest)

I am currently having another try at getting the android SDK installed and it looks to be going well with Juno so far but it's early days, yet!

Because the bash prompt is there then startxshould work. In a terminal type:

    startx


How to solve jitter (or stutter) playback via Chrome flash plugin?

Update July 19th 2012:

      As of today, this happened once again, and I solved it with the same method, so this could apply to any version. It's not clear (at least for me) if this is a bug related to Chrome updates or something else. If someone could clarify this, I would be grateful. On the other hand, if you go down to this road, take it as a temporary solution.

The solution:

Here's what I did.

On Google Chrome entered chrome://plugins/ and look where the flash plugin was. I saw that there were 3 different plugins installed.

On the right side of the window I pressed the "+" sign on "Details".

I disabled (by clicking on "disable") each one of them, one at a time, and finally, after some tests, the one that worked for me was the one that was called /usr/lib/flashplugin-installer/libflashplayer.so (the "original" flash plugin, and not the integrated chrome version).

I'm no expert, but I think there are some problems related to the integrated version, so untill a new version is released, I'll stick to the "original" plugin.

Hope it works for you!


How do I run bash command with "while" loop in desktop entry without having to create a ".sh" file?

Try
uxterm -e "bash -c 'while : ; do xdotool getmouselocation ;   sleep 0.3 ; done'"

The secret is to replace the line breaks by the ; command separator.


Upgrading ubuntu 16.04 LTS to 18.04, no upgrade notice!

The upgrade notification for 16.04 has been delayed due to a bug in the upgrading process, see this mail on the ubuntu-release mailing list.

A fix for this problem is currently tested and if everything's going well you should get a upgrade notification next week.


This

DOCS_PATH=${HOME}/docs
export TEXMFHOME="${HOME}/.texmf:${DOCS_PATH}/texmf"

adds ${HOME} twice to TEXMFHOME.  Are you sure it should not be

export TEXMFHOME="${HOME}/.texmf/texmf"


"Failed to fetch... Temporary failure resolving..." when trying to install

The screen-shot you shared shows 'Failed to Fetch'. This generally happens because of either you have not updated the sources list using:
sudo apt update

or, try accessing one of the URL from terminal, copy and paste it in a browser and hit enter, to make sure you're connected to Internet and you're able to access that server.

Please update your question if issue persists. So we can update the answer.


/usr/sbin/update-info-dir: 4: /etc/environment: Syntax error: Unterminated quoted string

You should edit your /etc/environment with text editor and add last quote (") to it.
For example with Nano:
sudo nano /etc/environment

change
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/java/jre1.8.0_171/bin"
JAVA_HOME="/usr/java/jre1.8.0_171

to
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/usr/java/jre1.8.0_171/bin"
JAVA_HOME="/usr/java/jre1.8.0_171"

Press Ctrl+O to save, then Ctrl+X to quit.


To install do this.  just press Ctrl+Alt+T on your keyboard to open Terminal. When it opens, run the command(s) below:

sudo add-apt-repository ppa:colingille/freshlight
sudo apt-get update
sudo apt-get install winusb

It has been tested, and it works OK.  See image below

Before 13.10 was added to the PPA, a work around is to do the following:

sudo add-apt-repository ppa:colingille/freshlight
sudo nano /etc/apt/sources.list.d/colingille-freshlight-saucy.list
(change saucy to raring)
sudo apt-get update
sudo apt-get install winusb


Shift Delete not working in ubuntu 20.04

Delete Files Permanently
When Files is open, go to the top of the screen and click "Files", Then click "Preferences", next click "Behaviour".
Under the "Trash" heading, click the box in front of "Show action to permanently delete files and folders"
Now when you are using Files you can right click the object you want to delete and select "Delete Permanently" from the list. (You still have an option to "Move to Trash" when you prefer).
No need to Shift Delete to get rid of stuff forever but that should also work.


Files an folders that has names starting with "." are hidden. They are normally not displayed. To see them there is a command in menu.


After updates my scanner stopped working over WiFi. How to diagnose?

After many hours of googling & trying different suggestions, I gave up troubleshooting & uninstalled everything I could find to do with printers & scanners.  Reinstalling seems to have cured the problem.


Evolution keeps it's passwords in gnome-keyring

Applications > Accessories > Passwords and Encryption Keys

From here, goto the passwords tab, find the correct password entry, double click on it, expand the password section, then click "show password" and change your password here.

Enter the old password (the one you've been prompted for when you start Evolution), but leave the new password fields blank.
It will prompt you with: Store Passwords Unencrypted?. Click on Use Unsafe Storage.

Log-out / Log-in


How it works

The script below measures the size of an area, between two locations of the mouse pointer.

It works as followes:

Place the mouse pointer in the first position (without clicking)

Press the key combination of your choice (see further below)
Place the mouse in the second position (again without clicking)

Press your key combination again. A notification will tell you the exact size (px) of the area.

Options

You can choose (by uncommenting one of the lines) how you'd like to be notified; either by a notification:

Or a Zenity info window:

(The examples are from different areas)

How to use

The script uses xdotool:

sudo apt-get install xdotool

Copy the script below into an empty file, uncomment either one of the lines:

command = ['notify-send', 'Area size', str(w)+' x '+str(h)]

(to be notified by the notify-send option)

or:

command = ['zenity', '--info', '--title', 'Area Size', '--text', str(w) + ' x ' + str(h)]

for the Zenity option.
Save the script in ~/bin (you will probably have to create the directory) as measure_area (no extension) and make it executable.
Add a key combination of your choice to run the script: Choose: System Settings > "Keyboard" > "Shortcuts" > "Custom Shortcuts". Click the "+" and add the command:

measure_area

Notes

You will have to log out / in first
It does not make a difference what you take as first/second position; the script measures absolute values.

The script

#!/usr/bin/env python3
import subprocess
import os
import math

home = os.environ["HOME"]
area = home+"/"+".measure_area.txt"

def get_pos():
    pos_data = subprocess.check_output(["xdotool", "getmouselocation"]).decode("utf-8")
    return [m[2:] for m in pos_data.split()[:2]]

def confirm():
    get = subprocess.check_output(["xrandr", "--verbose"]).decode("utf-8").split()
    for s in [get[i-1] for i in range(len(get)) if get[i] == "connected"]:
        br_data = float(get[get.index("Brightness:")+1])
        brightness = lambda br: ["xrandr", "--output", s, "--brightness", br]
        flash = ["sleep", "0.1"]
        for cmd in [brightness(str(br_data-0.1)), flash, brightness(str(br_data))]:
            subprocess.call(cmd)

if not os.path.exists(area):
    with open(area, "wt") as measure:
        measure.write(str(get_pos()))
    confirm()
else:
    second = get_pos()
    with open(area) as first_m:
        try:
            first = eval(first_m.read())
            w = int(math.fabs(int(second[0]) - int(first[0])))
            h = int(math.fabs(int(second[1]) - int(first[1])))
            #--- uncomment either one of the lines below:
            # command = ['notify-send', 'Area size', str(w)+' x '+str(h)]
            command = ['zenity', '--info', '--title', 'Area Size', '--text', str(w) + ' x ' + str(h)]
            #---
            confirm()
        except SyntaxError:
            text = "Please try again, there was an error in the data"
            command = ['zenity', '--info', '--title', 'Please try again', '--text', text]
        subprocess.Popen(command)
    os.remove(area)

Explanation

When the script is called the first time, it gets the current mouse position with the xdotool command:

xdotool getmouselocation

It then saves the position into an (invisible) file .measure_area.txt, waiting for the second call.
On the second call, it reads the file, removes it and compares the stored x/y coordinates to the latest ones, and calculates the size of the area between them.

Edit

Updated the script with a number of improvements:

Optimized subprocess.Popen()/subprocess.check_output() commands (thanks to @muru, @Trengot)
Added a repair procedure in case something went wrong with the first-data file (e.g. if user first tried to run the script without having xdotool installed)
Added a small confirming screen dim-flash when the key combination is pressed for the first coordinates. It seems a bit more user-friendly to give the user some kind of confirmation of the action.


No Internet connection on Ubuntu Xenial 16.04

Turns out the error was a lack of DNS server. I guess the router DNS has somehow failed (maybe temporarily ?)


Moving to ssd: do a fresh install; or is "dd" of old hdd "good enough"?

If the two drives have the same size, cloning the source drive to the target drive using dd will have the exact same impact a full write of the target disk would have.

Before even starting to consider whether this is a problem or not, if you need everything you have already on the old drive and this is "full enough", there shouldn't even be more questioning: dd will save you lots of time without wearing off the target drive much more than how a clean installation would have done.

That being said, a full write of the target disk done once is not significant. Not even a second one and a third one would be.

A MLC commercial SSD is going to surive between 2000-3000 full writes. Not to speak about SLC SSDs.

What is relevant instead is how you will use the new drive over time. If the SSD is going to be subjected to a great number of Program/Erase cycles (e.g. creation / deletion / creation of files), its lifespan is going to decrease drastically.

So to sum up, I'd blindly go for the dd solution and rather pay attenction on how to not decrease its lifespan by making a clever use of it over time.


What is the file path for the Ubuntu Software Centre executable?

There is handy tool called whereis:

  % whereis software-center

  software-center: /usr/bin/software-center
  /usr/bin/X11/software-center /usr/share/software-center
  /usr/share/man/man1/software-center.1.gz


in ubuntu 11.10 IDE like dreamweaver for PHP with design mode

Edit 2: From the stuff I just read through, maybe CKEditor is your best bet at the moment; It is available under the GPL as well as a commercial license, written in javascript -- there are special versions to integrate it as editor/ide in drupal joomla and java-webapplications. http://ckeditor.com/

Edit: I did dig a bit deeper; KompoZer and it's ancestor Nvu are rather old; (One of) The author(s) has a new project: bluegriffon -- but I don't know if it supports php.

Maybe KompoZer is to your liking: http://kompozer.net/; there is a PPA: https://launchpad.net/~giuseppe-iuculano/+archive/ppa

It uses gecko to render.

I never used it, so I can't endorse it; i just found it -- and it's free and open source.


Is there any way I can completely hide docks while working on a maximized window

If you mean fullscreen windows (like media players, games, etc.) then I'm afraid there is no way for it to work like in Windows. From what I have read there is no way to programatically check if a fullscreen app is running or not. (Thus it's also impossible to have your IM status go to occupied when you start a fullscreen application)

The only solution there would be to have your dock always stay in background. But then you may need to move a window away from its place to see the dock.

Another idea is to start fullscreen apps like games in another X-Display. That way your dock or libnotify messages won't pop up and get in your way.
Additionally you could pause your game and switch back to your dektop to chat or whatever...this can be tricky usually because most games forbid to just Alt+Tab out of it.

You can do that by going to another terminal i.e. Ctrl+Alt+F2 for the second.
And then login and type xinit -- myapp :1 where "myapp" should be replaced by the program you'd like to start. The program starts now in another x instance on display 1 (displays start at :0). The instance will be killed automatically when your program terminates. To get back to your Desktop press Ctrl+Alt+F7


From the comments...

Although memtest seems to run OK, all indications are that you have an intermittent memory problem with Bank 7: c01fbb4000010093.

It may be a RAM memory module failure, or a RAM memory module seating failure, or a defective memory slot on your motherboard.

If your memory slots are identified with bank numbers on the logic board, mark the memory module in bank 7 with a black magic marker pen. Assuming that all of your memory modules are the same brand/make/model, rotate ALL of the memory modules ONLY ONE SLOT over, such that RAM memory module bank 7 ends up in bank 6. Make sure that you use proper ESD grounding techniques when handling RAM modules. Rerun memtest, noting any failures.

If memtest runs OK, then reboot the system, and if it runs fine, you've solved the problem. If it fails with a bank 6 error (or anything other than bank 7), you've identified the defective memory module.

Memory modules should be installed/removed in pairs. One module is normally on memory channel A, and the other on memory channel B. This is for memory interleaving purposes. If you wish to fully identify/eliminate a specific RAM module, remove it, and its interleaving mate, reboot the system, and retest.


How do I upgrade the BIOS or use "force_addr= 0xaddr"?

After you have fully booted into your VM open a terminal and type sudo su to become root (you will be prompted for your password) then type the following:

# to check the module is loaded
lsmod | grep intel_rapl

If it is loaded blacklist it in /etc/modprobe.d/blacklist.conf by adding it to the end of the file: the next line will do that

echo "blacklist intel_rapl" >> /etc/modprobe.d/blacklist.conf

After that only thing left to do is update the initramfs by:

update-initramfs -u -k all

After that you can become a normal user again by typing exit then close the terminal and reboot the VM.

The solution I needed myself a couple of times already and I found it here and adopted it to your problem.


Ralink rt3290 wifi driver is not working in Ubuntu 14.04

Download the file from here and follow the following steps:

Extract the rt3290sta-2.6.0.0 directory into /usr/src.
Run sudo dkms install -m rt3290sta -v 2.6.0.0 --force.
Reboot.

And you should be good :)

Source


How to set unity as default after installing ubuntu-gnome-desktop in Ubuntu 16.04?

Add the following line to /etc/lightdm/lightdm.conf file ( if it doesn't exist - create it. File must be owned by root )

[SeatDefaults]
user-session=unity

That will make unity default for all users, but remember what mikewhatever said: if you choose a specific session once, login screen will remember it.


Why can't I connect to my wireless network at work?

I have been seeing this happen lately.  Unfortunately the exact cause is unknown, however it seems as though there may be some issues with 802.11n compatibility.  This worked for me (type these in a terminal):

# put down eth0 so it doesn't interfere
sudo ifconfig eth0 down

# disable n
sudo modprobe -r iwlwifi
sudo modprobe iwlwifi 11n_disable=1

Hopefully that helps.  If it does, you'll have to type those in a terminal each time you reboot.  I made it into a bash script that I just run when I first log in.  You may wish to do the same.

EDIT:

Since you're using a Broadcom card, you may try adding pof's PPA and installing his fixed driver.  I have never done this before myself, so I can't vouge for it's efficacy.  However it may solve your problem.

sudo add-apt-repository ppa:poliva/pof
sudo apt-get update
sudo apt-get purge bcmwl-kernel-source
sudo apt-get install broadcom-sta-dkms

You can read more about this fix here.


What is the difference between traceroute from traceroute and inetutils-traceroute

There are several implementations of traceroute. From Dmitry Butskoy's traceroute package homepage:

  It is well-known application, appeared long time ago. Since 2000, its
  initial implementation is not developed, and does not follow the
  modern network needs. There was already some attempts to continue or
  re-write it, or to create similar application with additional
  features, but mostly such works either provides things partially or
  have considerably different interface.

  This code was written from the scratch, using some ideas of Olaf
  Kirch's traceroute, the original implementation of Van Jacobson and
  some current BSD's ones. It is fully compatible with the original
  traceroute from
  Van Jacobson, wide used before for years.

The inetutils-traceroute implementation is from the GNU Network Utilities project, which includes several networking tools.

  The individual utilities were originally derived from the 4.4BSDLite2
  distribution, although some of them have more or less been rewritten.

The traceroute implementation from here is somewhat minimal compared to Dmitry's. There are few new options compared to the original 4.4BSDLite2 implementation.

You'd usually use the more full featured implementation by Dmitry.


sys_write doesn't print message to the terminal

I would suggest adding newlines to the output string, so it stands out. Please, try the following version:

.data
message: .ascii "\nASSEMBLY OUTPUT\n\n"
msglen = . - message

.text
.globl _start

_start:
movq $1, %rdi
movq $1, %rax
movq $msglen, %rdx
movq $message, %rsi
syscall
movq $60, %rax
movq $0, %rdi
syscall


Disable auto-login on 16.04 when connecting via serial console?

@Pablo Bianchi's comment was close... It turns out the file I needed to edit was:

/lib/systemd/system/serial-getty@.service

Specifically change this line:

ExecStart=-/sbin/agetty --autologin root --keep-baud 115200,38400,9600 %I $TERM

to:

ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM

Hurrah for grepping blindly and arriving at a solution!


How can I add options to a custom made command?

Sample file: multi_arg.sh
echo $1 #Echo out the first argument

echo $2 #Echo out the second argument

echo $3 #Echo out the 3 argument

Test Run:
$ sh multi_arg.sh a b c
a
b
c

Another test run (with -c e.g)
$ sh ABC.sh -a -b -c
-a
-b
-c

Related:
https://unix.stackexchange.com/questions/3773/how-to-pass-parameters-to-an-alias


How to check if clipboard contents have changed from a script, other than polling?

You can access the Gtk Clipboard by a gtk script wrapper such as Pygtk for Python. It has functions for waiting for different kinds of clipboard input while keeping the main event loop going. Please see the Pygtk reference or this blogpost for example code.


https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-linux-2017 so far only mentions 16.04.

The mssql-server package from the repo there works fine in Ubuntus up to 17.10, but after 18.04 it no longer installs due to outdated dependencies.

But we can still install and run it :-) First we add the repo:

$ wget -qO- https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
$ echo 'deb [arch=amd64] https://packages.microsoft.com/ubuntu/16.04/mssql-server-2017 xenial main' | sudo tee -a /etc/apt/sources.list.d/mssql-server.list

Then we install the dependencies:

$ sudo apt install openssl1.0 libcurl4 libjemalloc2 libc++1 libsss-nss-idmap0 libc++abi1
$ # Mark them as dependencies so they're autoremoved if you remove mssql-server:
$ sudo apt-mark auto openssl1.0 libcurl4 libjemalloc2 libc++1 libsss-nss-idmap0 libc++abi1

Then we fix the dependency list in the .deb to specify openssl1.0 instead of openssl:

$ mkdir tmp && cd tmp
$ sudo apt download mssql-server
$ ar x mssql-server_14.0.3025.34-3_amd64.deb
$ emacs -Q control.tar.gz

In Emacs:

click the file control in the file listing
edit the line starting with "Depends" to say openssl1.0 instead of openssl (note: it's mentioned two places in the same line),
edit the line starting with "Depends" to say libjemalloc2 instead of libjemalloc1,
then click Save and then the X to the left of Save,
then also click Save in the file listing,
then exit (File→Quit).

Then we repack the archive under a new name and install it:

$ # Note: order of arguments matters here:
$ ar rcs mssql-server_14.0.3025.34-3fixed_amd64.deb debian-binary control.tar.gz data.tar.xz
$ sudo dpkg -i mssql-server_14.0.3025.34-3fixed_amd64.deb

Now just continue from step 4 (mssql-conf setup) of https://docs.microsoft.com/en-us/sql/linux/quickstart-install-connect-ubuntu?view=sql-server-linux-2017 and you should be able to test your connection with e.g. sqsh or tsql.

EDIT: I've got my current script for doing this on Ubuntu 19.10 here: https://gist.github.com/unhammer/6bff7adabb98e581508c042dc1fb9914


L2TP VPN connected but no traffic / not working

I had lots of rules in iptables related to docker (I use docker a lot), so decided to uninstall docker completely. After the purge I rebooted and then connected the VPN and it worked fine.
So, it worked without any changes to systemd-resolved - i.e. the OS was configured as it would be out of the box
Somewhere along the line of using docker it starts to interfere with my VPN by the changes it makes to the iptables!
Uninstalling docker solved my problem... I am going to reinstall docker and will probably hit the same issue again eventually!
How to completely uninstall docker
###Edit
I think this is the best solution and has worked for me
https://www.lullabot.com/articles/fixing-docker-and-vpn-ip-address-conflicts
In case the article gets taken down the solution in a nutshell is create a daemon.json as follows
    $ vi /etc/docker/daemon.json
    {
      "default-address-pools" : [
        {
          "base" : "172.240.0.0/16",
          "size" : 24
        }
      ]
    }


How to load Ubuntu Server automatically in Grub

Edit /etc/grub.d/00_header and change line 236 (this line is in the
  make_timeout () function) to:

set timeout=0

  For timeout=-1, there will be no countdown and thus the menu will display.
  For timeout=0, menu will not display even for a failed startup.
  For timeout>=1, menu will display for the specified number of seconds.

  Run sudo update-grub after the change have been made. Special thanks
  to McCunha on Ubuntu Forums for the above tip.

  The above change, however, still causes GRUB2 to boot into text
  graphics mode. Thus, an additional change is required. Edit
  /etc/grub.d/10_linux and change line 188 to:

set linux_gfx_mode=keep

  Once again, run sudo update-grub after the change has been made.

Source: Last Boot Failed or Boot into Recovery Mode


How can I run an application with a GUI as admin from a non-admin user session?

Terminology
In this answer:

normaluser is a normal user who is not an administrator and cannot run commands as root with sudo.
admin is an administrator who can run commands as root with sudo. (Of course, any graphical commands should use a graphical frontend like gksu/gksudo, and not sudo directly.)
anyapplication is the name of the graphical application normaluser wants to run as root. normaluser knows admin's password and has (presumably) been told s/he may use it for this purpose.

The Problem
The cause of your problem, and the reason most of the other answers so far don't work (with the exception of Marty Fried's excellent answer), is:

gksu can be configured to use either sudo or su as its backend. The default behavior of gksu in Ubuntu is to act as a frontend for sudo, not for su. That is to say that, by default, gksu and gksudo behave exactly the same. See the manpage.
normaluser is not an administrator and thus cannot run commands as root with sudo. sudo prompts for the password of the user running it, not the password of the user they want to become. Not being able to use your password to perform actions as people who aren't you is what it means to not be an administrator.
normaluser, provided it is not a Guest account,  can run commands as another user with su, putting in the other user's password. But gksu acts as a frontend for sudo, not su.
normaluser cannot directly run any command as root, because normaluser cannot use sudo, and nobody can become root with su because there is no root password.

The Solution
The solution requires writing a command that performs two authentication steps:

normaluser must become admin to run a graphical command. To do this, normaluser must run gksu with the -w flag to make it run in su-mode instead of the default sudo-mode, and the -u flag to run the command as admin instead of root.
The command run as admin must invoke gksu without the -w flag to use sudo to become root.

Here's the command (yes, I have tested it ;-)):
gksu -w -u admin gksu anyapplication
You will be prompted for a password twice:

First, you must enter admin's password, to let normaluser run a command as admin with the su backend.
Second, you must enter admin's password, to let admin run a command as root with the sudo backend.

That's right. You enter admin's password twice.
Miscellaneous notes:

If you wish, you can replace the second gksu with gksudo to make it less confusing. In Ubuntu, they are equivalent. (You can also replace the first gksu with gksudo, but that would be extremely counterintuitive and confusing.)
-w is the short form of --su-mode.
-S is the short form of --sudo-mode but neither has to be used because sudo-mode is the default.
You may want to test this with some pretty harmless command first, to make sure it does what you want. (It will, but there's no need for you to trust me on that.) For example:  gksu -w -u admin gksu xclock
xclock is a nice simple clock-window application.


12.04 - How to update ALSA driver to 1.0.25

A solution will be to use the ppa ppa:ubuntu-audio-dev/ppa.
It description says

  This PPA will be used to provide testing versions of packages for
  supported Ubuntu releases.

It contains ALSA 1.0.25 driver package for precise(12.04).
N.B: I haven't tested it, so please be careful.


How to boot into Windows after installing grub?

I have had similar issues before. the solution was to grab a Windows install CD, and to boot to it.

choose your language and press next.

click "repair your computer"

follow the on screen instructions and it will try to locate issues and repair them.

I have had similar issues when setting up dual boot, or expanding my win7 partition. good luck!


google-chrome-stable didnt work,  After install gnome-keyring it perfectly worked for me running as google-chrome-stable or google-chrome


Blank screen after kernel auto-update in Ubuntu 15.10 (from 4.2.0-41.48 to -42.49)

Could be something to do with proprietary drivers; I encountered a similar problem on 16.04 after choosing to use nVidia's proprietary drivers instead of X.Org Server, couldn't login anymore. If you are using proprietary drivers, consider falling back to X.Org, so far I haven't encountered a better solution.

$ sudo apt-get purge nvidia*

This should work - if you were using proprietary drivers that is


What will be effect of removing sh file in Ubuntu?

The command to fix this is cd /bin && sudo ln -s dash /bin/sh


Depends on your webserver I am going to assume apache2 and will assume that you have

If you have php7 enabled in apache it should look something like

ls /etc/apache2/mods-enabled/ | grep php
php7.0.conf
php7.0.load

If you see php5 in there try

ls /etc/apache2/mods-availible/ | grep php

If php7.0 is an availible mod you should be able to

sudo a2dismod php5
sudo a2enmod php7.0
sudo service apache2 restart


Change system language for Gramps in .desktop file

I installed Gramp and tried it here, and this should really work:

Exec=/bin/bash -c "LANGUAGE=en_GB gramps"

LANGUAGE= takes precedence over LANG=

Note

Make sure you run the application from the local .desktop file: After editing the local one, make sure you log out / in before running it again.


Grub update can't detect hybernating Windows partition

Use your windows 8 disc and do Automatic Repair. This will solve your windows problem. Then use ubuntu's boot repair disc to solve dual boot problem.

http://www.techrepublic.com/blog/windows-and-office/how-the-windows-8-automatic-repair-feature-works/


What program will overwrite /etc/network/interface on boot?

Found the answer: casper will wipe network configuration unless explicitly set ip=frommedia in kernel commandline.

Source: https://answers.launchpad.net/systemback/+question/261587


Try this:

sudo apt-get install linux-headers-generic
sudo apt-get install --reinstall bcmwl-kernel-source
sudo modprobe wl


Move separate /home partition to the default configuration /home folder

Go from a separate /home partition in the HDD to the default configuration where /home is a folder in /, which is in the SSD
We will do this from a Live USB running Ubuntu 18.04 so that we can work with the /home partition and mount it as /internal_home.
Step 1: Boot from a Live USB Ubuntu
Select the Try Ubuntu without Installing option as we want to run Ubuntu from the USB, not the internal SSD.
Step 2: Find the uuid of the /home and / Partitions
Open a terminal by pressing Ctrl+Alt+T and enter:
sudo blkid > myUUIDs.txt

Keep the terminal open and go to Files (also known as Nautilus) and find the file myUUIDs.txt and open it by double clicking so that you can easily copy and paste the UUIDs of your internal drives' /home and / partitions. You will need them later.
Step 3: Mount the /home and / Partitions
As this is just temporary, it does not matter what the mount points are. You can use Nautilus to click and mount them. However, the autogenerated mountpoints are hard to type. So we will use command line to create 2 mountpoints and mount the two partitions there.
First, make some temporary folders as mount points
sudo mkdir /internal_root
sudo mkdir /internal_home

Second, mount the two internal partitions
I assume:

1234-UUID-OF-SYSTEM-PARTITION is your internal / (root) partition
and
1234-UUID-OF-HOME-PARTITION is your current home partition.

Copy and paste the correct UUIDs into the terminal from Step 2 above before using.
sudo mount --uuid 1234-UUID-OF-SYSTEM-PARTITION /internal_root
sudo mount --uuid 1234-UUID-OF-HOME-PARTITION   /internal_home

Step 4: Copy the home folder from its own partition to SSD under /
Use the following command to copy everything in the old /home partition to the new /home folder. Note, you don't need to create the folder as it was created as a mountpoint for the partition.
sudo rsync -aXS --exclude='/*/.gvfs' /internal_home/. /internal_root/home/.

Step 5: Create a new mountpoint for the old home
We need a new pountpoint for the old home so that we can use it to store data I will call it oldhome. Use the following command:
sudo mkdir //internal_root/oldhome

Note: I don't recommend mounting the old home under /media. This folder is usually reserved for the system to autmetically mount partitions temporarily.
An alternate would be to create the oldhome folder under the existing /mnt folder with the command:
sudo mkdir //internal_root/mnt/oldhome

Step 6: Edit /etc/fstab to mount the oldhome automatically when Ubuntu starts
Use the following command to open /etc/fstab in gedit with administrative privilages.
sudo -H gedit /internal_root/etc/fstab

Look for the line like line with the UUID of your home partition. See Step 2 for the UUID. Change it to look like this:
UUID=1234-UUID-OF-HOME-PARTITION  /oldhome ext4 defaults 0 2

where 1234-UUID-OF-HOME-PARTITION is the UUID number of the old /home partition as found on Step 2. Note, in this file we don't include the /internal_root/ prefix as when we created the oldhome folder.
Save the file and exit gedit.
Step 7: Restart the computer and boot to the internal SSD
If all goes well your /home is not in the default location in the SSD.
To access the /oldhome partition with Nautilus you will need to go to Other Locations on the left margin and click on the Computer icon and navigate to oldhome.
Hope this helps


Ubuntu Mouse Cursor Invisible During Install

Okay I found a solution, I just had to unplug my extra displays and then reboot. After I did this both problems were immediately fixed.


Wireless problem in Hp ab-029TX with ubuntu 14.04 Realtek

You can install this driver offline.

Download these files and copy them to your Home folder in Ubuntu:

dkms

rtlwifi-new-dkms

linux-firmware

Then run in terminal:

sudo dpkg -i *.deb


HELP! need admin password or how to reset!

the admin password is the password of your user. if your user is administrator, you can enter your password and do the update. if your system has only one user, that user is admin.


How can I remove a string from the beginning of each line of text?

Read man bash, especially the part about "Parameter Expansion" and do something like:

a="/a/b/c"
echo "$a"
b="${a%/*}"
echo "$b"
c="${b%/*}"
echo "$c"


Thanks to @Alex's comment. It made me delve into the Guake preferences in which, the Default interpreter was set as /bin/dash.
I just had to change it to: /bin/bash, now all my bash settings set in my .bashrc file works, along with the reverse-search-history( Ctrl+R ).

Change in Guake Preferences:

Guake now works as intended:


Unable to connect to wifi: password not accepted

There's more to wireless encryption than WPA vs WPA2 vs WEP.  With the first two, there's also encryption protocols, TKIP vs AES.  Try each of those with WPA then with WPA2 and you may have solved your problem, as I learned doing WiFi support for far too long.


How to install the Rubiks Futuro cube suite on Ubuntu 18.04

Install a Ubuntu Trusty for the next steps, or read my second answer to visualize a Trusty in Ubuntu Bionic or Debian Strech with LXC (Linux Container).

Prepare a Workspace. mkdir -p ~/work/rubiks/; cd ~/work/rubiks/
Download the file. wget http://isle.princip.cz/download/futurocube/sdk_suite/rubiks-futuro-cube.SC1.8.tgz
Extract the file. tar xfvz rubiks-futuro-cube.SC1.8.tgz
Go to the folder. cd rubiks-futuro-cube
Read the Documentation. vim INSTALL.txt
Do the steps:

Install dependencies sudo apt install python ipython python-imaging python-serial python-wxgtk2.8
Install 64bit compatibility sudo apt install ia32-libs (from INSTALL.txt, not longer needed)
change the udev rule
Add your user to the dialout group. sudo adduser $USER dialout
Launch the program ./rubiks-futuro-cube


Terminal no longer appears in Geany after installing 14.04

Ok. I have found the answer by installing an older version of libvte. That is most likely due to Geany still using GTK2 rather than GTK3. So the solution of this problem under Ubuntu 14.04 is:

sudo apt-get install libvte9

P.S. This is still the solution under 16.04


"EggSMClient-WARNING **: Failed to connect to the session manager: None of the authentication protocols specified are supported"

Use gksudo for this:

gksudo gedit

That should do the trick.


How to carry my home ubuntu desktop in pendrive

I do something similar, and just use rsync to keep the pendrive up to date or to update one of the computers.  rsync works best because with the right switches it will back everything up without overwriting the same file each time, or overwriting newer files with an older version.

To backup (for example) your Documents directory to the Pendrive first give the pendrive a label (volume name) and make a target directory such as 'Documents' on it.  By giving the pendrive a label it will be easily found under the /media directory.  Next issue the following command:

rsync -av ~/Documents/ /media/yourlabelname/Documents/

This command will backup up everything in your home Documents onto the pendrive.  To reverse the process and update the files on another comptuer, simply reverse the rsync command eg:

rsync -av /media/yourlabelname/Documnets/ ~/Documents/

It's easy enough to put both of these commands into very short bash scripts and execute one each time by typing the name of the bash script.  If the scripts are in ~/bin then they will get included in the executable path.

Note that if the USB drive is formatted FAT then the volume name is normally limited to capitals only, even if you typed the volume name in lowercase when you created it.  Because bash is completely case sensitive you must get the volume name and directory name exactly right or the rsync commands will fail to work.


How do I install the latest OpenOffice.org?

Ubuntu comes with an office suit by default, called Libre Office. If you would still like to install Open Office follow these directions.
Download..
Download Open Office from Openoffice.org (or use this direct link).
Save the file to your Downloads folder.
Install..
I highly recommend that you remove ALL previously installed versions of Open Office before proceeding!
Open a terminal and cd to the downloads folder:
cd Downloads

Now we need to untar the installation folder:
tar -xvzf Apache_OpenOffice_incubating_3.4.1_Linux_x86-64_install-deb_en-GB.tar.gz

Then cd to the folder we just extracted:
cd en-GB/DEBS

And install all the packages:
sudo dpkg -i *.deb

When that has finished cd to the "Desktop Integration" folder:
cd desktop-integration

and install those packages:
sudo dpkg -i *.deb

And you're done!
You can now remove the en-GB folder.


No irq handler error while installing Ubuntu 20.04

After further research, I found a reddit user with the same problem as me. The solution is to boot Ubuntu under safe graphics mode. The error would still occur but it will boot into Ubuntu after a while.


No permission to my Google Drive foldrer

You need to make it your own, try this (change yourusername and yourgroup to match you, id will help):

sudo chown yourusername.yourgroup /path/to/google-drive/directory

Or you can make it writeable by you with:

sudo chmod 777 /path/to/google-drive/directory


How to increase the disk space of Ubuntu 13.04 installed besides Windows 7

You installed ubuntu through wubi.
For resizing the space allocated for ubuntu installed through wubi,you must refer this.

And also refer to   this to know how much of space did wubi takes from the HDD.


How to recover a deleted NTFS partition with data

Well. Testdisk really works. I have documented in the past my previous 500 GB Data loss which was up to 80% recovered via Testdisk.

Take a look at this video in Youtube: Recover deleted partitions using Testdisk in Ubuntu #11.

I couldn't fully recover my data because of I was trying to recover using different tools, (including MS Based tools which I don't recommend because of it resulted in the damage of the data itself. So I strongly suggest you to first run the steps mentioned in the video in order to bring back the partition, after which you will be able to undelete/recover any data loss that could happen during data recovery.

I am following your question closely even if downvoted just in order to provide help. I know this is not a forum and have read the rules but I have experienced this in the past and I know how it feels. Just for information: It took me 2+ weeks to fully recover my data. So please be patient. I am sure we'll find a way to bring your data back.

Good luck!


Is there an application to manage config files in the /etc directory with version control?

The package etckeeper is specifically intended to manage your configuration files (located in the /etc directory) under a version control system(VCS).

What is etckeeper?

  etckeeper is a collection of tools to let /etc be stored in a git, mercurial, darcs, or bzr repository. It hooks into apt (and other package managers) to automatically commit changes made to /etc during package upgrades.

How do I install etckeeper?

To install the package, click on the link provided below to install in Ubuntu Software Center(USC), or run sudo apt-get install etckeeper from the terminal(Ctrl-Alt-t).

etckeeper

How do I change etckeeper from the default VCS(bzr) to use git?

By default, etckeeper uses Bazaar(bzr) for version control management. This can be changed in the configuration file /etc/etckeeper/etckeeper.conf.

First, you will need to have git installed.

sudo apt-get install git
sudo apt-get install git-core

Now, you will need to edit your etckeeper.conf file to change your VCS. Here is what the first five lines of the default configuration should look like:

# The VCS to use.
# VCS="hg"
# VCS="git"
VCS="bzr"
# VCS="darcs"

This is the place in the configuration file to switch from using the default option of using bzr to using a git repository. Open a text editor (i.e. gksu gedit /etc/etc/keeper/etckeeper.conf) and change the file to look like this:

# The VCS to use.
# VCS="hg"
VCS="git"
# VCS="bzr"
# VCS="darcs"

Uncomment the line VCS="git" and comment out the line VCS="bzr"

Now, run sudo etckeeper init to initialize your repository.

As mentioned here:

  This sets up version control for all files in /etc. You don't need to do anything else to manage etckeeper; you only need to interact with it when you want to do a version control operation, such as referring to older files. Files are automatically committed before and after each run of apt and every night (this is configurable).

Additional information on etckeeper:

See Ubuntu etckeeper documentation

also

Using etckeeper with git on Ubuntu


Why nm-tool is no longer available in Ubuntu 15.04?

Please read the 2015-01-27 changelog for network manager. A snippet form all the changes ...

  network-manager (0.9.10.0-1) unstable; urgency=medium

  New upstream release.
  Exclude libtool .la files from list-missing.
  Update symbols files.
  Update Build-Depends as per configure.ac.
  Build and install nmtui, a curses-based interface for easier console
  operation.
  Install new device plugins.
  Stop installing the nm-tool binary which was dropped upstream as it has  been replaced by the much more powerful nmcli tool.

The name of what you want is  nmcli.

Besides that there is a new tool call nmtui:

  network-manager (0.9.10.0-1) unstable; urgency=medium

  New upstream release.
  Exclude libtool .la files from list-missing.
  Update symbols files.
  Update Build-Depends as per configure.ac.
  Build and install nmtui, a curses-based interface for easier console
  operation.

From the manual page for nmtui:

  nmtui — Text User Interface for controlling NetworkManager

nmtui [edit | connect | hostname] [...]
nmtui-edit [connection-id | connection-name]
nmtui-connect [connection-name | connection-uuid | device-name | Wi-Fi-SSID]
nmtui-hostname


Does using system-wide OpenVPN (occasionally) on my workmachine compromise my security or anonymity?

The basic thing you need to understand about VPNs is that it is routing your internet connection through the place your VPN is connected to. Like if I am using a VPN from my office configured to connect to my home connection, my internet connection is being routed through my home. So the information I upload is first sent to my home and then uploaded and vice-versa for downloads. While this information is transferred between my home and office, it is encrypted by the VPN protocol you are using.

Since you have mentioned that you are trying to protect your anonymity online, I am assuming that you are using openVPN to connect to an unknown VPN not owned by you. If this is the case, and if the VPN you are connecting to is keeping logs, then both your anonymity and your banking details are not secure. All someone need to do is access those logs and they can get you IP and you banking details. Keeping the OS on a pendrive is not going to affect this.

If anonymity is your main goal, I would suggest using tor. You do not need to worry about the logs the exit node might be keeping since your connection is bounced about multiple times before it reaches the exit node.

And netbanking through a VPN you do not own is a bad idea as you must have already realised.

You can do what I do. Use a VPN for streaming videos, and tor for everything else. For netbanking, turn everything off and use your regular connection.


Accents in TeamViewer 11 on Ubuntu 16.04

How is the windows 10 setup? Does it also have a Spanish keyboard layout?
If not, can you add it into the layouts?
Under the control panel, you can go to the clock,language,region, and under "advanced" you can change language bar hot keys, to swap keyboards.

If none of this works, there may be another (more difficult) method. Ascii- hold "alt", and type in the ascii code on the number pad for a character, then release alt.(only works on number pad). That may be another work around.
You can find some ascii code in tables at asciitable.com