Can I make sudo time out during hibernation?

Run the command using the -k option:

sudo -k pm-hibernate

Short version: -k means sudo will prompt for the password again next time.

From man sudo:

-k [command]
When used alone, the -k (kill) option to sudo invalidates the user's cached credentials. The next time sudo is run a password will be required. This option does not require a password and was added to allow a user to revoke sudo permissions from a .logout file. Not all security policies support credential caching.

When used in conjunction with a command or an option that may require a password, the -k option will cause sudo to ignore the user's cached credentials. As a result, sudo will prompt for a password (if one is required by the security policy) and will not update the user's cached credentials.


How can I accept virtual box license agreement in Ubuntu(16.04) terminal?

This you can do by pressing tab once which should then highlight the Ok then press return. You might have to scroll down through the whole text to make it work.


Ubuntu 14.04 installed without repositories?

The solution is simple. You have never started sudo apt-get update. Do it now and add the universe repository, which isn't enabled per default, to install docker:

sudo apt-add-repository universe
sudo apt-get update


I found a solution, quiet not as good as iTunes but it worked :P

First install and update mpd:
        sudo apt-get update
        sudo apt-get install mpd

then you need pulseaudio

sudo apt-get install pulseaudio pulseaudio-module-zeroconf
sudo vi /etc/default/pulseaudio
---------------------------
[...]
PULSEAUDIO_SYSTEM_START=1
[...]
DISALLOW_MODULE_LOADING=0

start pulseaudio
    sudo /etc/init.d/pulseaudio start

(if you want to test your settings:

paplay /usr/share/scratch/Media/Sounds/Vocals/Singer1.wav

you may get errors like:
pa_context_connect() failed: Connection refused

sudo vi /etc/environment
---------------------------
PULSE_SERVER=localhost
---------------------------

sudo vi /etc/pulse/daemon.conf
---------------------------
[...]
resample-method = trivial
[...]
default-sample-rate = 48000
---------------------------

sudo vi /etc/pulse/system.pa
---------------------------
[...]
#load-module module-suspend-on-idle
[...]
load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1;192.168.0.0/24
auth-anonymous=1
load-module module-zeroconf-publish

backup you /etc/asound.conf file
and create a new asound.conf
    sudo vi /etc/asound.conf
    ---------------------------
    pcm.pulse {
      type pulse
    }
    ctl.pulse {
      type pulse
    }
    pcm.!default {
      type pulse
    }
    ctl.!default {
      type pulse
    }
    ----------------

sudo vi /etc/libao.conf
----------------
default_driver=pulse
quiet

Install shairport

sudo apt-get install git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils libmodule-build-perl

sudo cpan install Net::SDP

git clone https://github.com/albertz/shairport.git shairport
cd shairport
make
sudo make install
sudo cp shairport.init.sample /etc/init.d/shairport
sudo chmod a+x /etc/init.d/shairport
sudo update-rc.d shairport defaults

configure shareport

sudo vi /etc/init.d/shairport
--------------------------------
[...]
NAME=AirPi
USER=pulse
DAEMON="/usr/local/bin/shairport.pl"
PIDFILE=/var/run/pulse/$NAME.pid
DAEMON_ARGS="-w $PIDFILE -a $NAME"

[ -x $binary ] || exit 0

RETVAL=0

start() {
echo -n "Starting shairport: "
    start-stop-daemon --start --quiet --pidfile "$PIDFILE" \
                      --chuid $USER \
                      --exec "$DAEMON" -b --oknodo -- $DAEMON_ARGS
    log_end_msg $?
}
[...]

start and enjoy :)

sudo /etc/init.d/shairport start

Source (all credits go to them):
http://mpd.wikia.com/wiki/Install
and
http://www.foell.org/justin/raspberry-pulse/#comment-1991

greetings Kaito


Audio and Video lag/not working after suspend

You can test  these   commands :

Alsa suspend/resume again
sudo alsa suspend
sudo alsa resume

More alsa restart

sudo alsa  force-reload

Pulseaudio

sudo killall -9 pulseaudio
This will stop and restart    pulseaudio.
Verify soundcard selection and volume setting in sound parameter

Verify alsamixer setting after suspend:
Run  alsamixer in a maximized terminal,  use F6 to select soundcard (HDMI or internal soundcard): do you see your soundcard faders ? If yes , tweak all  volumes using left/right arrows to scroll thru faders,  up/down to set each fader levels (set all to max for test) , m key to mute/unmute (unmute all)


Accounting Software for Ubuntu other than GnuCash?

Making the foremost of your cash and budgeting it legitimately plays a key part in the financial victory, and the proper individual back computer program can assist you to get there. Not at all like Windows or Mac, Linux is one of the foremost dependable and effective computer working frameworks accessible. It keeps your individual money related data secure by ensuring it against infections, malware, and misfortune of information. I use KMyMoney. You can check this answers to see for yourself. KMyMoney underpins investment accounts and can recover online stock sites. Individual fund reports can be designed in a number of ways, and KMyMoney widgets can be introduced to include advance usefulness, such as a pop-up calculator and date choice calendar.


i have kubuntu and want to install windows 7 in a dual boot

1. open a terminal ( Ctrl+Alt+T)

2. Launch gparted using sudo gparted

3. Click at your root partition and use the right mouse button to open the menu.
Now click at the option move or resize

4. get about 10 to 20 gig free disk space by resizing your partition (if you have got a home partition, resize the home partition.)

5. create your Windows partitions in the free space

6. Apply the changes by clicking at the apply button and close gparted

7. run sudo update-grub

8. restart your machine using sudo shutdown -r now

9. install windows

10. start ubuntu and run sudo update-grub in a new terminal.


Stuttering virtualbox sound with windows 7 guest and UBUNTU host

Having experienced the same Windows guest stutter under an Ubuntu host (12.04) - except in Win 8.1 - I found a solution that mostly conforms with Takkat's answer. My stutter occurred with the Windows guest being allocated 4 out of 4 cores, but the execution capped at 75%, with 4GB RAM, and 256 MG graphics RAM. Switching to 2 out of 4 cores - but removing the execution cap - running at 100%, eliminated 90% of the stuttering. But not all of it.

The final 10% - and the total elimination of stuttering - came when I switched from the default PulseAudio driver in VirtualBox Manager's settings, to the ALSA Audio Driver. Please note, prior to the aforementioned reallocation of CPU's and execution caps, I had also tried this driver change, and it did not remotely eliminate the stutter. The two changes in combination was required.


How to install the following theme on Ubuntu 13.04

Open the archive and place its contents in '~/.themes'

'.themes' is located in your home folder. It's a hidden folder that you can make visible by pressing ctrl H.

If you don't have a '.themes' folder; create it.

With this method you are the only user that can use the theme. If you wish to install system-wide use the other answer.


install usb wifi adapter on ubuntu 14.04

I was unable to use TL-WN812N on ubuntu 14.04 (not vbox). Attempted to download the driver from tp-link website but pt-br tp-link website version have no driver link there. Tried google and found your question.

I could find the driver following the link http://www.tp-link.com/en/download/TL-WN821N.html#Driver you mention but I faced the same makefile issue. But I could fix it: the guy who wrote the Makefile did a great job but the guy who created the driver zip root folder I was not aware of what he was doing. He named the driver folder TL-WN821N(EU)_V5_160315_Linux then when you run:

sudo make
"******************************************"
"NO SKRC,we will use default KSRC"
"******************************************"
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/3.13.0-106-generic/build M=/tmp/TL-WN821N(EU)_V5_160315_Linux/Driver  modules
/bin/sh: 1: Syntax error: "(" unexpected
make: *** [modules] Error 2

Bash gives error because the path name of driver makefile is not escaped. I renamed the folder to tl-wn821n-v5-160315-linux and it worked from building to connecting to internet.

Hope this help.


Use the -C option with tar like this:

$ tar -zcvf desktop.tar.gz -C /home/USER Desktop/

This will change the working directory of tar to /home/USER while running, effectively stripping out the /home/USER prefix of the paths.


Ubuntu Server 18.04 hide/disable all boot messages (kiosk mode)

Now that you have fixed the Kernel boot logs, you have to finalize your kiosk configuration and the login screen will not show anymore!

Configure auto-login, you can do that with getty like I did and explained in my orignal question.

Configure Getty:

    sudo mkdir /etc/systemd/system/getty@tty1.service.d/
    sudo tee -a /etc/systemd/system/getty@tty1.service.d/autologin.conf <<EOF
    [Service]
    ExecStart=
    ExecStart=-/sbin/agetty --autologin YOU_USER_HERE--noclear %I $TERM
    Type=idle
    EOF

Enable Getty:

    sudo systemctl enable getty@tty1.service

You also want to configure XOrg / Chrome to start automatically on login. The solution I used before may not be the best one today. I had to use xserver-xorg-legacy but it probably means that you can use xorg in a better way than login script.


wrong owners on ext4 drive after new installation

Use

sudo getfacl -R /data > facl.txt

to save the file owners on the old system into the file facl.txt (replace /data with the actual path).

Restore the file owners stored in the file facl.txt with

sudo setfacl --restore=facl.txt


Yes, spacing between words and redirections doesn't matter. That's the short answer.

The details lie in the fact that shell ( for simplicity let's just refer to bash only) treates certain characters and groups of characters as "words" and "metacharacters". From bash 4.3 manual:

  metacharacter

  A character that, when unquoted, separates words.  One of the following:

|  & ; ( ) < > space tab

And

  word   A sequence of characters considered as a single unit by the shell.  Also known as a token.

So  when we do:

$ echo "hello world">/dev/null

or

$ echo "hello world" > /dev/null

that's still 3 words ("hello world" can be considered a single shell word because it's quoted), with one > meta character and couple spaces. Shell will see it, and perform redirection first (so it looks for meta characters first), and then runs commands in accordance with its standard behavior.

Order of redirections, however, matters a lot, especially when you're duplicating file descriptors with something like 2>&1.  Say you want to get send both stderr and stdin to same location. Here's a wrong way to do it:

$ stat ./non-existent file 2>&1  > /dev/null
stat: cannot stat './non-existent': No such file or directory
stat: cannot stat 'file': No such file or directory

You're making file descriptor 2 output to same location as 1, which is your terminal, but it was already doing so. That's why stderr shows up.

If you redirect stdout first, and only then change where 2 points - then it'll work:

$ stat ./non-existent file > /dev/null 2>&1


Wifi is connected but internet drops after some time

I would change the channel your wifi is on as there are 10 access points on channel 1
Channel occupancy:

  10   APs on   Frequency:2.412 GHz (Channel 1)
  1   APs on   Frequency:2.427 GHz (Channel 4)
  5   APs on   Frequency:2.437 GHz (Channel 6)
  1   APs on   Frequency:2.447 GHz (Channel 8)
  1   APs on   Frequency:2.457 GHz (Channel 10)
  7   APs on   Frequency:2.462 GHz (Channel 11)

You can see the wifi channels in use from the script results.  I would also change the SSID to No-Service eliminating the space in the name.

There is a another network with the same name, possibly a guest.  I would change this to No-Service2, giving it a unique name and eliminating the space.  Also change the encryption to match as this one has TKIP enabled
Cell 01 - Address:
                    Channel:1
                    Frequency:2.412 GHz (Channel 1)
                    Quality=59/70  Signal level=-51 dBm
                    Encryption key:on
                    ESSID:"No Service"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 18 Mb/s
                              24 Mb/s; 36 Mb/s; 54 Mb/s
                    Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 48 Mb/s
                    Mode:Master
                    Extra:tsf=0000000004b54ad8
                    Extra: Last beacon: 88ms ago
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : CCMP
                        Pairwise Ciphers (1) : CCMP
                        Authentication Suites (1) : PSK
          Cell 02 - Address:
                    Channel:1
                    Frequency:2.412 GHz (Channel 1)
                    Quality=29/70  Signal level=-81 dBm
                    Encryption key:on
                    ESSID:"No Service"
                    Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s; 6 Mb/s
                              9 Mb/s; 12 Mb/s; 18 Mb/s
                    Bit Rates:24 Mb/s; 36 Mb/s; 48 Mb/s; 54 Mb/s
                    Mode:Master
                    Extra:tsf=0000009216a456e8
                    Extra: Last beacon: 88ms ago
                    IE: IEEE 802.11i/WPA2 Version 1
                        Group Cipher : TKIP
                        Pairwise Ciphers (2) : CCMP TKIP
                        Authentication Suites (1) : PSK

The issues I saw in your wireless script was a crowded channel 1 and having 2 access points with the same name and your computer was jumping from one to the other
[  241.663063] wlan0: authenticate with
[  241.663537] wlan0: send auth to  (try 1/3)
[  241.665598] wlan0: authenticated
[  241.665740] wlan0: waiting for beacon from
[  241.927534] wlan0: authenticate with
[  241.934607] wlan0: send auth to  (try 1/3)
[  241.963944] wlan0: authenticated
[  241.968113] wlan0: associate with  (try 1/3)
[  241.986164] wlan0: RX AssocResp from  (capab=0x431 status=0 aid=3)
The 'No Service' [AC1] is the one with the stronger signal in the script results and the preferred encryption.  'No Service' [AC2] has TKIP encryption enabled.

When those changes are done your wifi may benefit by changing the module parameter with echo "options iwlwifi 11n_disable=8" | sudo tee /etc/modprobe.d/iwlwifi.conf

Reboot


If you want to update your graphics drivers, open a terminal console and type

sudo add-apt-repository ppa:ubuntu-x-swat/x-updates
sudo apt-get update
sudo apt-get upgrade

After restarting the computer, your system should be running the current graphics drivers. I hope this helps

Is it safe to install updated Intel drivers from the x-swat PPA?


docker not running despite running on foreground and -it options

Maybe you're looking for docker logs <container> to help tell you why?   Also, I think you're only allowed one CMD line (I'm new to Docker), and containers only last as long as the process they run in CMD.  In your case, it exits after the CMD chmod part.


How to fix ubuntu load screen after install nvidia driver (331,38)

I had this problem a few days ago, removing the xorg.conf created by Nvidia seems to fix the problem. Execute the commands below after pressing CTRL+ALT+F1 on GDM screen or within GNOME.

sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.old
sudo touch /etc/X11/xorg.conf


I suspect some fault (or an entirely missing) systemd service, could you check if you even have systemd by systemctl -v?

Maybe you already have systemd but are not booting with it? In that case, could you go to your GRUB options at startup and boot by selecting your kernel + (systemd)?


From the memtester man page:

memtester's exit code is 0 when everything works properly. Otherwise, it is the logical OR of the following values:

x01
    error allocating or locking memory, or invocation error
x02
    error during stuck address test
x04
    error during one of the other tests

So a 6 is a logical "OR" of a 2 and a 4


How to retrieve screenshots of a package in ubuntu

The screenshot that are displayed in Software Center are provided by screenshots.ubuntu.com/screenshots.debian.net They can be retrieved like so:

http://screenshots.ubuntu.com/thumbnail-with-version/$PACKAGE/$VERSION
http://screenshots.ubuntu.com/screenshot-with-version/$PACKAGE/$VERSION

or:

http://screenshots.ubuntu.com/thumbnail/$PACKAGE
http://screenshots.ubuntu.com/screenshot/$PACKAGE


The utouch package has been renamed to GEIS, in upstream. So to install it, you should look for the geis package.


Enable wifi on my computer - firmware missing

Wireless cards come in a few varieties. If your computer is a laptop, you might well have one installed and not know it, as they are often built in to the unit. A desktop computer with a wireless interface will either have an antenna sticking out somewhere (probably the back panel) or a USB device plugged in to it.

In Ubuntu, many if not most wireless devices will work "out of the box". When you left-click on the Network Manager icon in the upper-right corner of the screen (it looks like a series of signal-strength bars or like an ethernet socket) Network Manager should show you a list of networks. At the top will be "Wired Networks", then a list of the connected networks, then a list of available networks, then "Wireless Networks" and another set of lists. If you don't have a wireless device or it is unavailable for some reason, there will be no "Wireless Networks" section.

If you are unsure as to whether you have a functioning wireless device attached to your computer, you can use the commands "lsusb" and "lspci" to show what devices are connected. If you don't understand the output of the commands feel free to post it here and I will interpret it for you. It's pretty straightforward though!

If your investigation shows that you have a connected wireless device, but Network Manager does not show any "Wireless Networks", then there are further issues. If this happens I'll be happy to walk you through the troubleshooting process.


How to install ACPYPE and fix the error in Ubuntu 14.04?

The ln -s command creates a link in /usr/local/bin/ that points to acpype.py in directory you are in. Changing anything in /usr/local/bin/ requires root privileges. You can execute a command with root privileges by putting sudo in front of it.

So what this means in your case: instead of

ln -s $PWD/acpype.py /usr/local/bin/acpype

type

sudo ln -s $PWD/acpype.py /usr/local/bin/acpype


Have a look at Gnome Catalog (package gnomecatalog)


They are python based.  /usr/bin/landscape-sysinfo opens up a python library:

from landscape.sysinfo.deployment import run

Which is located under:

/usr/lib/python2.7/dist-packages/landscape/sysinfo

But, you will probably have a difficult time "just adding color" here as the package will be updated from time to time wiping out your changes.  But feel free to mess around with it. :)

Note this package is completely open source and housed in the landscape-client source code.  It's installed with the 'landscape-common' package onto your system.

If you just want to modify the message you see printed out, there are a lot of ways to do that, and these are great starting points:

How do I edit the ssh motd?
How set the Message of the Day (MOTD) as Ubuntu Server?
http://www.howtogeek.com/104708/how-to-customize-ubuntus-message-of-the-day/


Use the switch -v [natural sort of (version) numbers within text]

ls -v


This happened for me just now on Ubuntu Mate, and after a bit of searching I found a solution for another distro but which I could adapt to my distro as well.

The "synaptic-pkexec" program is just a script that starts synaptic using "pkexec". "pkexec" launches a dialog to ask for your password, but instead of just reading /etc/sudoers (like sudo) it uses PolicyKit which uses an "authentication agent" that needs to be running in the background.

Apparently, the authentication agent was not running because I had somehow managed to uncheck the PolicyKit Authentication Agent from my list of Startup Applications. (not that a agent/daemon belongs among applications ...)
I checked it in the Startup Applications Preferences, logged out and back in again and now "synaptic-pkexec" and other admin programs work.


When installing Ubuntu installation wizard freezes

This sounds a lot like a failing SSD drive.
So,

What kind of HDD is installed?  if SSD this appears to be a lot like what I've dealt with before.
What are the settings in UEFI/BIOS for hdd access? (i.e. Intel's Speedstor, etc.) and was that changed lately?
How "old" is "old"?  That will give some context to possibilities.   i.e. you may try an older release of Ubuntu/Kubuntu such as from 2016, or a recovery based distro that can check the disk and let you know.  It's been a while since I've used one of these, but distrowatch, has a list. (or used to).


the Software that came with my Camera is for Windows and Mac. What to do?

With Ubuntu, you don't need the software that came with the camera. As you found out most camera manufacturers don't provide a software for Linux. They don't need to, as Ubuntu has the needed software already installed.

Just connect the camera and it should be recognized. If that does not work, or if you prefer, you can also take the SD card out and put it in a card reader.

Either way, Ubuntu has built-in software called Shotwell Photo Manager to recognize and import the pictures into your computer. Then you can use Shotwell to view edit, and share the pictures.

Hope this helps


It's as simple as this:

sudo -i

Update:

Seems like you want to get into root automatically whenever terminal is opened. Well, I'm not going to give you a lesson about security, but instead will provide you a solution:

Get rid of password when doing sudo:

sudo visudo

And add following line (replace username with whatever you need):

username ALL=(ALL) NOPASSWD: ALL

Next, add following at the end of your ~/.bashrc file:

sudo -i


A few days ago I was satisfied with my answer. I also knew that the which command is not used to test whether a command exists. Now I'm not so satisfied with my answer, and I refer to this great response.

With a simple which command:

which foo.sh

Or a type command:

type foo.sh

And you can influence this with the order of the paths in your $PATH or via an absolute path when the script starts, E.G.

/home/user/scripts/foo.sh

Example

If PATH is defined as below

/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games

And you start a script or something else which is in /usr/local/bin and in /usr/bin, the script in /usr/local/bin as  a higher priority.


Grub fails to boot windows 7, no such partiton error

Try to reinstall grub:

sudo grub-install

When using the grub-install command, the boot information is updated and written to the designated drive, missing - but not corrupted or intentionally deleted - files are restored. Specifically the core.img, grubenv, and device.map are updated and missing modules restored. If missing, the grub folder will be recreated.

The grub-install command does not generate a new GRUB 2 menu (grub.cfg). For this you may run also and this command:

sudo update-grub


cannot not get impi after installing 14.4 maas. cannot power on servers

I'd get a bug filed here so the MAAS team can take a look:

https://bugs.launchpad.net/maas

There's been a lot of work done between 14.04 and 12.04 in the IPMI areas of MAAS and some older Dell machines might run into problems with getting their BMCs auto-configured.


3.2.0-29.46-generic-pae kernel boot problem

Open up ubuntu from rescue mode.Open up the terminal

sudo add-apt-repository ppa:yannubuntu/boot-repair && sudo apt-get update

-Press Enter - Then type:

sudo apt-get install -y boot-repair && boot-repair

Then open boot repair. Perform recommended repairs. If that does not fix it then paste the link here for the boot summary.


How to change lines at the Grub2 boot entry

I've found this post which can be helpful in this case:

http://www.howtoforge.com/faq/12_15_en.html


Trying to dual boot ubuntu and Windows 10, but due to a grub problem that I may have caused I can't access Ubuntu

Boot into a live session of Ubuntu from your USB and install Boot-Repair.

https://help.ubuntu.com/community/Boot-Repair

Follow the directions at that link and see if that fixes your issue.


How can I enable brightness control on my iMac 11,3?

1) Download Grub Customizer, first by adding the repository:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer

Then update the repositories and install the package grub-customizer,

sudo apt-get update && sudo apt-get install grub-customizer

2) In the General settings tab, add acpi_backlight=vendor and hit save.

3) Reboot and enjoy brightness control!

NOTE: I've only tested this on the latest release (13.04), can't guarantee this works on any other version.


Go to the Trash folder. If your emails are there, just select the ones you want reverted, and drag it back to your designated folder, e.g., Inbox. Otherwise, your emails should be in Archives, or something similar.


Use Space to switch between options (it should be /dev/sda). Then press Enter.


How to get the Ubuntu look back after installing lubuntu-desktop

You need to remove all these packages:

  sudo apt-get remove abiword abiword-common abiword-plugin-grammar abiword-plugin-mathview ace-of-penguins audacious audacious-plugins chromium-browser chromium-browser-l10n chromium-codecs-ffmpeg elementary-icon-theme esound-common galculator gdebi gdebi-core giblib1 gnome-icon-theme-full gnome-mplayer gnome-system-tools gnome-time-admin gnumeric gnumeric-common gnumeric-doc gpicview gtk2-engines-pixbuf guvcview hardinfo indicator-status-provider-pidgin leafpad libabiword-3.0 libaiksaurus-1.2-0c2a libaiksaurus-1.2-data libaiksaurusgtk-1.2-0c2a libaudclient2 libaudcore1 libaudiofile1 libavcodec53 libavformat53 libavutil51 libbinio1ldbl libcddb2 libcompfaceg1 libcue1 libdca0 libdirectfb-1.2-9 libdiscid0 libdvdnav4 libdvdread4 libenca0 libencode-locale-perl libept1.4.12 libesd0 libexo-1-0 libexo-common libfaad2 libfile-listing-perl libfluidsynth1 libfm-data libfm-gtk-data libfm-gtk3 libfm3 libfont-afm-perl libgdome2-0 libgdome2-cpp-smart0c2a libglade2-0 libgoffice-0.8-8 libgoffice-0.8-8-common libgringotts2 libgsf-1-114 libgsf-1-common libgsm1 libgtkmathview0c2a libhtml-form-perl libhtml-format-perl libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl libhttp-message-perl libhttp-negotiate-perl libid3tag0 libimlib2 libio-socket-ssl-perl libjpeg-progs liblink-grammar4 libloudmouth1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl libmailtools-perl libmcrypt4 libmcs1 libmenu-cache3 libmms0 libmowgli2 libmusicbrainz3-6 libnet-dbus-perl libnet-http-perl libnet-ssleay-perl libobrender29 libobt2 libonig2 liboobs-1-5 libopenal1 libopts25 libots0 libpisock9 libpolkit-gtk-1-0 libpostproc52 libresid-builder0c2a libschroedinger-1.0-0 libsidplay2 libsvga1 libswscale2 libtar0 libtie-ixhash-perl libtimedate-perl libts-0.0-0 libuniconf4.6 liburi-perl libva1 libvdpau1 libvpx1 libwebcam0 libwv-1.2-4 libwvstreams4.6-base libwvstreams4.6-extras libwww-perl libwww-robotrules-perl libxfce4ui-1-0 libxfce4util-bin libxfce4util-common libxfce4util4 libxfcegui4-4 libxfconf-0-2 libxml-parser-perl libxml-twig-perl libxml-xpath-perl libxss1 libxvidcore4 link-grammar-dictionaries-en lm-sensors lubuntu-artwork lubuntu-core lubuntu-default-settings lubuntu-desktop lubuntu-icon-theme lxappearance lxappearance-obconf lxde-common lxde-core lxdm lxinput lxkeymap lxlauncher lxmenu-data lxpanel lxpanel-indicator-applet-plugin lxrandr lxsession lxsession-edit lxshortcut lxtask lxterminal mplayer mtpaint ntp obconf openbox openbox-themes osmo pcmanfm pidgin pidgin-data pidgin-libnotify pidgin-microblog plymouth-theme-lubuntu-logo plymouth-theme-lubuntu-text scrot sylpheed sylpheed-doc sylpheed-i18n sylpheed-plugins synaptic system-tools-backends transmission tsconf ttf-lyx uvcdynctrl uvcdynctrl-data wvdial xfburn xfce-keyboard-shortcuts xfce4-power-manager xfce4-power-manager-data xfconf xfonts-100dpi xpad xscreensaver xscreensaver-data

then reinstall ubuntu-desktop

by

  sudo apt-get install --reinstall ubuntu-desktop


How to forward local port 80 to another machine?

Only root can bind ports numbered under 1024.

The cleanest way is just to use local port 8000:

ssh -R 8000:localhost:8000 otherhost

Alternatively,

sudo ssh -R 8000:localhost:80 me@otherhost

(It's really better not to run this as root for the sake of security - just use another port.)

If you must use root, and you're using ssh private-key authentication, you may need to tell it which identity file to use. For example

sudo ssh -i ~/.ssh/id_dsa -R 8000:localhost:80 me@otherhost


Using ITR utility on Ubuntu or its flavors

New answer
Income Tax Department recommends using Java version 8 Update 51 (See this PDF file).
Step 1: Download openjdk-8-jre using Synaptic Package Manager or command line as below:
sudo apt-get install openjdk-8-jre

Step 2: Install OpenJFX components of v8 series. It can be done through command line:
sudo apt-get install openjfx=8u161-b12-1ubuntu2 libopenjfx-java=8u161-b12-1ubuntu2 libopenjfx-jni=8u161-b12-1ubuntu2

Try running the ITR.sh file (need to make it executable first!). Proceed to Step 3 if error occurs.
Step 3: Ensure that Java's version 8 is being used with OpenJFX. Type in command line:
sudo update-alternatives --config java

You may be greeted with something like:
  Selection    Path                                            Priority   Status

* 0            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      auto mode
  1            /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manual mode
  2            /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode

Press  to keep the current choice[*], or type selection number: 2

Enter 2 to use Java 8 as it is the only one that runs the income tax utility.

Thanks to Geetu Vaswani for his amazing blog post.

Use ITR utility
Find ITR.sh file that comes in the e-filing utility.
Right click on the file ITR.sh --> Go to Properties --> Click Permissions tab --> Make the file executable --> Click Apply then OK.
Click ITR.sh --> Execute the file (preferably in terminal) --> Voila!
Note: You may need to edit ITR.sh file (simply right click and open with default text editor) and add #!/bin/bash at the start of the file. After doing so, ITR.sh file should look like:
#!/bin/bash
java -jar ITR-2_AY201920_PR3.2.jar

Previous answer
Download supported Java version
Income Tax Department recommends using Java version 8 Update 51 (See this PDF file). You need to have account on Oracle website to be able to download older (archived) Java versions. In case you do not have an account on Oracle website or do not want to open one, head over to this index website by CERN and click on jdk-8u51-linux-x64.tar.gz for 64 bit version or jdk-8u66-linux-i586.tar.gz for 32bit version (JDK v8u66 is slightly upper version but shouldn't matter much). This answer takes jdk-8u51-linux-x64.tar.gz as the downloaded file. If you have downloaded 32 bit version just change the file name to jdk-8u66-linux-i586.tar.gz.
Install Java
Method 1 (Quick):
Copy:
#!/bin/bash
sudo mkdir -p /usr/java && sudo tar xvzf jdk-8u51-linux-x64.tar.gz -C /usr/java && JAVA_HOME=/usr/java/jdk1.8.0_51/ && sudo update-alternatives --install /usr/bin/java java ${JAVA_HOME%*/}/bin/java 20000 && sudo update-alternatives --install /usr/bin/javac javac ${JAVA_HOME%*/}/bin/javac 20000

Go to the directory (folder), where you have downloaded jdk-8u51-linux-x64.tar.gz.
Create a file named RUN.sh. Open it with default text editor (like gedit, kwrite) and paste the above copied contents in it. Save the file.
Right click on the file RUN.sh --> Go to Properties --> Click Permissions tab --> Make the file executable --> Click Apply then OK.
Execute the file in terminal (press F4, and type sh ./RUN.sh) --> Type password when prompted (you may not even see asterisks when you type, it is normal)
Restart your computer.
Method 2 (Explained):
Go to the directory, where you have downloaded jdk-8u51-linux-x64.tar.gz, say Downloads, which gives us path of directory: /home/*user*/Downloads.
Open terminal window by pressing F4.
Type following commands one by one:
Create a directory in your file system, in a manner so that it wouldn't interfere with OpenJDK in case it is installed in future: /usr/java
sudo mkdir -p /usr/java

Type password when prompted (you may not even see asterisks when you type, it is normal).
Extract the files you just downloaded in that directory:
sudo tar xvzf jdk-8u51-linux-x64.tar.gz -C /usr/java

Set your JAVA_HOME environment variable:
JAVA_HOME=/usr/java/jdk1.8.0_51/

Set up installed Java (Oracle JDK v8u51) at a higher priority (here 20000), so that in case another JDK (say OpenJDK) is installed in future, Oracle JDK v8u51 continues to be used.
sudo update-alternatives --install /usr/bin/java java ${JAVA_HOME%*/}/bin/java 20000
sudo update-alternatives --install /usr/bin/javac javac ${JAVA_HOME%*/}/bin/javac 20000

Restart your computer.
Use ITR utility
Find ITR.sh file that comes in the e-filing utility.
Right click on the file ITR.sh --> Go to Properties --> Click Permissions tab --> Make the file executable --> Click Apply then OK.
Click ITR.sh --> Execute the file (preferably in terminal) --> Voila!
Note: You may need to edit ITR.sh file (simply right click and open with default text editor) and add #!/bin/bash at the start of the file. After doing so, ITR.sh file should look like:
#!/bin/bash
java -jar ITR-2_AY201920_PR3.2.jar

Hope it helps!


Bad performance in Dota2, AMD drivers fault or Wine fault?

According to wineHQ, Dota 2 was tested successfully on Wine 1.5.24. Tested Ubuntu systems are 12.10 and 13.04 alpha.

It did not work in their test environment. Here is the report.

http://appdb.winehq.org/objectManager.php?sClass=version&iId=24458&iTestingId=77046

Here is an abstract taken from there

Selected Test Results (selected in 'Test Results' table below)
What works
Loading the game, starting game, changing settings, creating parties.

What does not
Playing the game more than 15 minutes results in unrecoverable crash. Restarting the game does not allow continue due to long stuttering.

What was not tested
Finishing a game.

Additional Comments
Reproducible crashes after 15 minutes. Don't play public matchmaking, you won't be able to return to the game if it lasts longer than 15 minutes.

Hence, DOTA 2 is still not fully supported by Wine. :(  Try native games like http://www.heroesofnewerth.com/  which has a Linux version.


How secure is the ubuntuone nightlies repos?

Any nightly repository is likely to come with some risk of breakage (code wise), but as for your data - no one is reading it if you are using the same service as what you would use with the stock Ubuntu One.

The reason you are getting an error in Apt is because you did not add the gpg key for the repository (which I suggest you do, but it's not a huge deal).


Can I install Google Chrome and Chromium together?

Yes

They are different programs. I am currently running both with no issues


Had ubuntu/7 on my system reformated and ubuntu stopped working

If you 'just formatted' your PC, then several different things may have occurred:

If you formatted just the Windows partition, then Ubuntu will be unaffected.
If you re-formatted the whole drive, it may be very difficult to restore the old partitions (to as they were).
If you used a Windows-based tool to re-format the drive, you would likely need a Windows-based tool to try and undo this action.
Any attempt to re-install, re-partition, de-frag, chkdsk /f, etc. will very likely prevent any attempt to recover any overwritten data (or settings).

( You don't need to answer these for us, just yourself. )

Step 1: What do you need to recover (data or settings)?

Step 2: What (if any) backups or copies do you have?

Step 3: Do you need to start some heroic recovery effort?

Step 4: What is the simplest way to simply re-install your PC?

AND REMEMBER: Backup disks, USB storage, and Cloud storage are your friends.


DLNA server with playback progress control

Xbmc/Kodi amongs many other features also provides a DLNA server to stream its content to a DLNA client.

For sound only but not video there is an extremely light-weight DLNA server that can stream the output of any media player on your Ubuntu desktop though creating a selectable sound output device: pulseaudio-dlna:


Running make uninstall may work. It's up to the library's authors to provide that. Most libraries usually have one.

Otherwise, you'll have to manually uninstall it. Running make -n install will show the steps that the software would take to install itself. You can then try to manually reverse those steps.

PS: In the future to avoid this type of problems try to use checkinstall instead of make install whenever possible. It will create and install a .deb file that you can then uninstall using your favorite package manager.


kernel panic: unable to mount root in ubuntu 16.04

The first thing is to perform a file system check on your Ubuntu disk...

boot to the GRUB menu (where you select which OS to start)
choose Advanced Options
choose Recovery mode
choose Root access
at the # prompt, type sudo fsck -f /
repeat the fsck command if there were errors

If you can't do the above, then....

boot to the Ubuntu Live DVD
start gparted and determine which is your Ubuntu partition
open terminal and type sudo fsck -f /dev/sdaX changing the X to the appropriate number of your Ubuntu partition
repeat the fsck if there are errors

Now we use the SMART internal disk monitoring tools to see if it detects a pending hard disk failure...

boot to the Ubuntu Live DVD
start the Disks application from the Unity dash
select the hard disk in the left pane
click on the "hamburger" icon in the top-right of the Disks window
select SMART Data & Tests
view the data, and run the tests

Then try to recover from the failed installs (this only applies if you're coming from step #1)...

type sudo mount -o rw,remount / # to remount root as read/write
type sudo dpkg --configure -a # to fix broken dpkg
type sudo apt-get install -f # to finish upgrades
type reboot


How to setting up Xerox DocuPrint M205 b on Ubuntu 13.10 64bit

I have updated my ubuntu (14.04LTS).

Installed foo2zjs
Configure Postscript-Xerox
Add printer.

The printer is now working.


14.04 to 16.04 upgrade screen goes black after 2-5 minutes

I got a lot of help from Andrea Lazzarotto (thanks, Andrea!), but in the end I found the answer myself. I searched for "No UMS support in radeon module" on google.  It turned up this link:

https://bbs.archlinux.org/viewtopic.php?id=166037

which referred to the grub config.  So I ran the command:

sudo gedit /etc/default/grub

and saw that it referred to my radeon card:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash radeon.modeset=0"

I removed the reference to the modeset, per the post listed above, so it read:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

After editing the grub config, you must run:

sudo update-grub

This saves the config changes in the file itself.  I did this and then rebooted.  This fixed the problem with the black screen/crash, and it also fixed the problem with the dual screens being cloned.


Android Emulator cant start without internet connection

I think I found a way around this after sleepless nights of trials and errors. All I had to do was to turn off WIFI and disable networking, and then the emulator started when I ran it. Don't know if this is a temporary fix, but I have my emulator working perfectly for now. Hope this helps others in similar situation.


Ubuntu 12.04 - Installing PHP with -fastcgi

The developer who has ppa:ondrej/php5 which you have installed Apache2 from, has another ppa:ondrej/apache2 which has built libapache2-mod-fastcgi for  apache2.4.

See https://launchpad.net/~ondrej/+archive/apache2?field.series_filter=precise

Both PPA's has apache2.4, You may download only libapache2-mod-fastcgi package to avoid Apache2 version racing if they are not the same.

But as of 2016 Feb, libapache2-mod-fastcgi in the ppa:ondrej/apache2 only supports trusty 14.04, vivid, 15.04, and wily 15.10. Seems there is no support for precise 12.04.


Converting PDF (generated using pdflatex) to LaTeX

No, that's not possible. Most of the information used to generate the PDF is lost during its creation and only the result is retained (unless you told the TeX processor to attach the source files to the result document).


How to permanently mount a network folder?

From the Mount during login instead of boot section of the wiki link you posted, perhaps try adding this to /etc/fstab:

//servername/sharename  /media/windowsshare  cifs  noauto,credentials=/home/ubuntuusername/.smbpasswd  0  0

And this to your /etc/rc.local file:

mount /media/windowsshare
exit 0


How to change a particular path from the environment variable PATH?

There is a similar post on stackoverflow:  What is the most elegant way to remove a path from the $PATH variable in Bash?. Just have a look.


Tools to diff deb-src packages between Ubuntu and Debian repos

If you intend to build scripts, you may want to investigate launchpadlib.

However, since I don't use launchpadlib directly, I'll give a couple pointers that hopefully illustrate the gist of manually using data provided in Launchpad to generate diffs.

Here're references for using with a web browser or bzr for an example source package, alsa-driver.

Debian unstable (Sid) is at https://code.launchpad.net/~ubuntu-branches/debian/sid/alsa-driver/sid.  The URI you can use with bzr is lp:debian/sid/alsa-driver

Ubuntu 10.10 (Maverick) is at https://code.launchpad.net/~ubuntu-branches/ubuntu/maverick/alsa-driver/maverick.  The URI you can use with bzr is lp:ubuntu/maverick/alsa-driver

Then, you simply bzr diff your branches of lp:debian/sid/alsa-driver and lp:ubuntu/maverick/alsa-driver to obtain what is essentially a diff -uNr $debian_sid $ubuntu_maverick.  I'm fairly certain this approach directly addresses what you seek with "Ubuntu changes from debian mainline", but it may be far easier to accomplish with existing tools involving launchpadlib.

In fact, MOTU often use something similar; you can find an overview at https://wiki.ubuntu.com/DistributedDevelopment/Documentation/Merging.


CMake error: Could NOT find GSL (missing: GSL_INCLUDE_DIR)

You need to install the related development package:
sudo apt-get install libgsl-dev

and then retry CMake.


Python PyBluez loses Bluetooth connection after a while

The answer to this question is the same as the answer to Why is /dev/rfcomm0 giving PySerial problems?, a simple issue of the Bluetooth buffer overflowing on the PC.


Copy, Paste and Rename Inside Browse Dialog

How can i have Copy, Paste and Rename inside Browse Dialog?

You can't.

The software has been designed that way. It's a developers' decision arguably to avoid mistakes and to steer users towards better practices like using a dedicated file manager for such actions.


Stop or disable keyboard/mouse/input grab from shell

There's an answer one might try on StackOverflow: https://stackoverflow.com/questions/23795010
For a full screen application barteks2x suggestion of running a separate x server and swiching to it via Ctrl-Alt-Fn might be useful.
He makes 5 suggestions. The section I found useful, and is done from the shell, is copied here.This is directly copied from barteks2x answer:

You can add a second mouse pointer using xinput:

Run xinput create-master pointer-name. A second mouse pointer should appear on the screen. This creates keyboard/pointer pair, you
don't need to do anything with the second added keyboard. It won't be
attached to any physical device.

Run xinput list to list all your devices
On my laptop it looks like this:

.

 ⎡ Virtual core pointer                      id=2    [master pointer  (3)]
 ⎜   ↳ Virtual core XTEST pointer                id=4    [slave  pointer  (2)]

 ⎜   ↳ ETPS/2 Elantech Touchpad                  id=14   [slave  pointer  (2)]
 ⎜   ↳ A4Tech USB Mouse                          id=11   [slave  pointer  (2)]
 ⎣ Virtual core keyboard                     id=3    [master keyboard (2)]
    ↳ Virtual core XTEST keyboard               id=5    [slave  keyboard (3)]
    ↳ Power Button                              id=6    [slave  keyboard (3)]
    ↳ Video Bus                                 id=7    [slave  keyboard (3)]
    ↳ Video Bus                                 id=8    [slave  keyboard (3)]
    ↳ Power Button                              id=9    [slave  keyboard (3)]
    ↳ Lenovo EasyCamera                         id=10   [slave  keyboard (3)]
    ↳ Ideapad extra buttons                     id=12   [slave  keyboard (3)]
    ↳ AT Translated Set 2 keyboard              id=13   [slave  keyboard (3)]
⎡ new-mouse pointer                         id=15   [master pointer  (16)]
⎜   ↳ new-mouse XTEST pointer                   id=17   [slave  pointer  (15)]
⎣ new-mouse keyboard                        id=16   [master keyboard (15)]
    ↳ new-mouse XTEST keyboard                  id=18   [slave  keyboard (16)]

The newly added mouse pointer (master device) has id=15. I have a touchpad and an external mouse so I can attach one of them to the new
cursor and leave the other attached to the old cursor. If you don't
have 2 physical devices - you can leave the old pointer with no
physical device attached.

Now run xinput reattach slave-device-id master-device-id. For example if I want to attach my touchpad to the new pointer: xinput
reattach 14 15
After this you should be able to control the newly added pointer.

When you no longer want the second mouse pointer use xinput remove-master master-device-id, in my case it would be xinput
remove-master 15

sometimes you may need to reattach the device to the previous master device.
Note: It's better to add the new pointer before you start debugging. I also noticed that some window managers have some issues
with multiple cursors that cause all kinds of unexpected bugs - for
example "typing stops working", or typing works but in the wrong
window. So leaving multiple cursors enabled normally may not be a good
option.


How to automatically open the linux terminal window in a certain position on ubuntu

Put that -geometry ... parameter into the .desktop file, not into your .bashrc. Copy the original terminal .desktop file to a new one where you can do that, and give it a keyboard shortcut.


Start with a 1604 installation with Unity, then upgrade/dist-upgrade it to 1804.


If it's not a subdirectory causing problems, it's possible that there is a large file in / taking up space.   Please run the following to see if there's a likely culprit there:

sudo ls -al /


This should do the trick, but it's not a 100% with all silverlight implementations

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libmoon moonlight-plugin-mozilla moonlight-plugin-core

thanks to samiux


How to disable accessibility in MATE flavour?

This turned out to be a Onboard issue.

The installation of the gnome3 application included an installation of Onboard. This is a front end for accessibility features.

The purge of the application did not remove the installation of Onboard so I had to purge Onboard explicitly. Now the icon is gone, and I no longer have the accessibility dialog popping up when I do pause with my finger on the shift key -- as I am wont to do.


Trouble Pairing Bluetooth Sound Bar with 14.04 LTS

Check pactl list short for module-bluetooth-discover as it is needed for A2DP sound over bluetooth.  Some versions of Blueman are known to remove it during boot.

You can load module-bluetooth-discover with

sudo pactl load-module module-bluetooth-discover

Then pair with the device and A2DP will work

If you want or need HSP/HFP also then you need the firmware

wget https://www.dropbox.com/s/a7xdswqav8nqfr1/BCM20702A1-0a5c-21e8.hcd
sudo cp BCM20702A1-0a5c-21e8.hcd /lib/firmware/brcm/
sudo modprobe -r btusb
sudo modprobe btusb


What is the third-party software on Ubuntu 14.04

This includes many common packaages such as Adobe Flash Player, LAME for mp3 encoding, and Microsoft fonts. Installing these packages will allow many everyday applications to work.

These are not installed by default due to being either closed source or open source with licensing restrictions.

For the general user, you should definitely install them. You can do so after installation from the Software Center ubuntu-restricted-extras . Or from a terminal using the following:

sudo apt-get install ubuntu-restricted-extras


How can I use tr command using more than 2 arguments?

Try

tr '[a-z]' '[m-za-l]'

Ex.

$ echo 'the quick brown fox jumped over the lazy dog' | tr '[a-z]' '[m-za-l]'
ftq cguow ndaiz raj vgybqp ahqd ftq xmlk pas


The best way of learning linux directories and files

The official page is:http://www.pathname.com/fhs/
belive it or not, I know that page look ancient and ghetto, but that is the official page of the standard. The official version is 2.3.

As you may notice, the standard is not enforced, distributions may deviate form the FHS Standard.  It is a tentative guide.   For example: your usb devices most likely mount in /media but in RHEL and SUSE perhaps they mount in /mnt

the OS can put files where ever it likes, the FHS standard is aimed at making things less confusing for users, admins, and developers.


Change DNS to Coudflare 1.1.1.1 on Ubuntu 17.10

You can change it from the cli.

Edit resolv.conf: sudo vi /etc/resolv.conf
Add the new nameserver before any other server: nameserver 1.1.1.1
Save the file. See How to exit the Vim editor.
Reload networking: sudo service networking restart


Canon TS31775 Printer not printing in ubuntu 20.04

Try this in terminal
sudo apt install printer-driver-gutenprint

then add printer.


How can I make Dropbox wait for Truecrypt? (including password input)

You can add a script to delay Dropbox from starting up - the link to a dropbox forum question with the answer is here


It seems that if I uninstall ia32-libs and the packages that depended on it the game will run though there is the issue of no sound currently.


APT tries to configure PostgreSQL each time I try to install a package

Remove/purge postgresql-9.1 and reinstall them:

sudo apt-get --purge autoremove postgresql-9.1 postgresql

If you really use postgresql, or another package depends of it, you can install it again

sudo apt-get install postgresql the-other-program-that-got-removed

BTW, libfluidsynth1 is already installed, you don't need to install it again.


Ubuntu 13.04 and bluez-5.8 configure: error: systemd system unit directory is required

I am using Mint 15 and ran into same problem while installing BlueZ 5.8.  Googling found your exact question. To solve it, had to add --with-systemdsystemunitdir and --with-systemduserunitdir configure options.  Since Mint and Ubuntu have much in common, you may find that it works for you too.  The complete command line is below.  You may want to leave out the --enable-experimental flag so you don't get experimental plugins.

./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --enable-experimental --with-systemdsystemunitdir=/lib/systemd/system --with-systemduserunitdir=/usr/lib/systemd


The meaning of /sys/class/net/eth0/carrier_changes values

From my observations, there are two files that have meaning there in /sys/class/net/eth0/ together.  The first one being carrier and the second being carrier_changes.  These files have nothing to do with your internet taking 2-3 minutes to connect.

From my testing it looks as though when you unplug a cable from your eth0 port, the carrier file shows a 0 and the carrier_changes increases by one.  Plugging the cable back in changed carrier to 1 stating it has connection, and carrier_changes increase by a count of one again.  Example below:

Starting with cable connected:

terrance@terrance-ubuntu:/sys/class/net/eth0$ cat carrier_changes
2
terrance@terrance-ubuntu:/sys/class/net/eth0$ cat carrier
1

Removed cable:

terrance@terrance-ubuntu:/sys/class/net/eth0$ cat carrier
0
terrance@terrance-ubuntu:/sys/class/net/eth0$ cat carrier_changes
3

Reconnected cable:

terrance@terrance-ubuntu:/sys/class/net/eth0$ cat carrier
1
terrance@terrance-ubuntu:/sys/class/net/eth0$ cat carrier_changes
4

So, as it looks, carrier_changes keeps track of how many times the cable is removed and connected with the system up or a possible network change has been performed.

Other possible reasons or solutions to why you might have slow connecting times:

Cable / connectors on cable might be bad. Try another cable to router.

Another thing you can possibly look at is how long it takes for your eth0 to actually get an IP address.  Maybe perform a watch command on ifconfig eg: watch -n 5 'ifconfig eth0'

Maybe look at how long your router has DHCP leases set for.  Maybe you're low on IP addresses in your scope on your router and it is waiting until another is free.

Maybe try a power reset on your system by removing all power from the system then pressing the power button a few times to drain all remaining power from the system.  Then plug it back in and power it on.

Hope this helps!


Is it possible to connect remote system using mac-address?

From commlineFu:

connect via ssh using mac address
Instead of looking for the right ip address, just pick whatever address you like and set a static ip mapping.

sudo arp -s 192.168.1.200  00:35:cf:56:b2:2g temp && ssh root@192.168.1.200

Another command:

ssh root@`for ((i=1; i<=255; i++));do arp -a 192.168.1.$i; done | grep 00:35:cf:56:b2:2g | awk '{print $2}' | sed -e 's/(//' -e 's/)//'`

then all you have to change the MAC and choose any IP you wish to use and change root to a valid user

Note: Those commands is just a hack an in really they are using the IP itself not the MAC.

Example using second command:

My LAN IP range is 10.1.1.* .The MAC of server want to connect to is 00:15:17:5f:XX:XX . The user on the host machine is called maythux

So the command will be:

ssh maythux@`for ((i=1; i<=20; i++));do arp -a 10.1.1.$i; done | grep 00:15:17:5f:XX:XX | awk '{print $2}' | sed -e 's/(//' -e 's/)//'`

Note i make for loop to 20 just for timing and i already know ip is less than 20, in case you dont range so keep it to 255.

And boom I'm prompted for password of user maythux in the host pc

TIP:

Instead you can normally use SSH with using IP, if you don't know the IP of some systems you can get it from the MAC, take a look for my question List all MAC addresses and their associated IP addresses in my local network (LAN) , you'll find many answers how to get an IP knowing its MAC


Grub terminal after cloning Ubuntu 16.04 from internal SSD to external HDD

Disclaimer: I've taken the steps out of this manual to move Ubuntu to a f2fs partition.

First off I have a question:
Did you run the dd from the active system or did you use a live booted system to clone your current installation?

I'd suggest the following steps:

create the partitions you need on the new target drive
copy your installation from an external booted live system with rsync to the new location
bind a few folders and chroot into your new tatget copy
update /etc/fstab for the new location
install and update grub

1. Copy to new target
Boot from an Ubuntu installation disk and have a look with synaptics on your target drive and create your partitions if necessary.

Afterwards, open a bash, enter root shell and do:

cd /media
mkdir -p ubuntu ubuntu/oldRoot ubuntu/newRoot
cd ubuntu

Now check what your partitions are. For the example I choose the following:

/dev/sda1 - old Root
/dev/sdb1 - new Root

Mount them:

mount /dev/sda1 ./oldRoot
mount /dev/sda2 ./newRoot

2. Copy to new Location

rsync -avWHAX --progress ./oldRoot/* ./newRoot/

3. Chroot into new location

mount -o bind /dev ./newRoot/dev
mount -o bind /sys ./newRoot/sys
mount -o bind /proc ./newRoot/proc

chroot ./newRoot

4. Update fstab for new Location
Check the new UUID for your partition and replace the old one in /etc/fstab with it.

5. Install and update grub

I guess you have your SSD as first boot device atm. You have a choice here how to do it, read them below.
I'll show you the second way:

grub-install /dev/sdb
update-grub

exit
umount ./*

Now you should have your Ubuntu bootable from the new Location.

Grub Options:

Do the grub install onto the ssd, verify your system boots fine from the new location, install Windows on the ssd (which most likely will remobe grub again) and rerun point 3-5 of my list.
That way you'd have the same boot order.
Do the grub install onto the HDD where your Ubuntu will live and do a update-grub after Windows is installed on the SSD. That way you'd have to change the boot order to the HDD, but it would make your system being able to function, even if remobe one of the disks. For Windows only you'd just have to change the boot order again and your Ubuntu is able to boot without the SSD.

side note to dd

dd is a low level tool, that just copys over the blocks like they are laying around. That means your target device must be at least as big as your source device. If you have a big partition, that's barely filled, you still would copy all the empty space from the source over.
Using rsync for this task copied the files present to the other side and gives you the freedom of changing your partiton layout if you thought in the past there's something you'd like to change, that's the chance^^.


maybe old post but.

I have the same problem with ubuntu servers, but no problem with debian servers, the only difference I found was

ubuntu

[ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete

debian

[ -x /usr/lib/php5/maxlifetime ] && [ -d /var/lib/php5 ] && find /var/lib/php5/ -depth -mindepth 1 -maxdepth 1 -type f -ignore_readdir_race -cmin +$(/usr/lib/php5/maxlifetime) ! -execdir fuser -s {} 2>/dev/null \; -delete

So try adding the -ignore_readdir_race to the cron line and I think it will work,


Open from commandline

I don't know what was causing this problem on the OP's machine, but after chatting with him, a solution that worked for him was to run skypeforlinux from the command line.


How do I stop XFCE4 from respawing programms running at logout on login?

What i tried is remove everything from ~/.cache/sessions

try:

  rm -rf ~/.cache/sessions


Just right click on the K-Start button (the application launcher), and click 'Edit Applications'.  This will bring up KDE Menu Editor and you can change the path of an application there.

Look at the picture in the link above to see how I modified Thunderbird.  I want to use a certain version of Thunderbird so I keep it in /mnt/data/programs/thunderbird/thunderbird/ - the executable is thunderbird.  You can see that I added that to 'Command'.

Now when I save the menu item, I can drag it from the applications menu to the desktop or to my task bar and it will work as wanted.  Or, if I've already created the taskbar icon, the command will be updated there automatically.


Ubuntu 19.10 some drm content not streaming

Not exactly an answer, but I can't post a comment...

I emailed ITV about this problem and received this reply:

  Thank you for your email.

  I'm afraid that Linux hasn't ever been fully supported on our website.

  We are however looking into an issue where DRM content is causing a error message to appear on our website.

  If you are getting a message to update your browser, this will probably be resolved for you once they have fixed the issue with DRM content.

  If I can be of further assistance, please do get back in touch.

So I guess we wait and see, but doesn't sound hopeful. It's not clear to me who "they" are (as in "...once they have fixed..."); ITV or browser authors? Nor if this is definitely related to the problem - I have not been prompted to update my browser.


Disabled 3rd party software on installation

Answer copied from comments:

Just do a:

sudo apt-get install ubuntu-restricted-extras

Make sure Canonical partners are enabled before running this!


Cannot upgrade kernel 3.16 from 14.04 to 14.04.2

This happens due to Intel Linux Graphics Installer.

I solved downloading the proper package here

sudo dpkg -i libgbm1_10.1.0-4ubuntu5_amd64.deb

and then, reissuing

sudo apt-get install --install-recommends linux-generic-lts-utopic xserver-xorg-lts-utopic libgl1-mesa-glx-lts-utopic libegl1-mesa-drivers-lts-utopic

the Ubuntu update will work.

Maybe you will have to run the intel-linux-graphics-installer after the reboot...


Is the size of my /var/lib/dpkg/info too big?

/var/lib/dpkg/info contains files that relate to packages - including the list of files (as full path names) provided by each package, the MD5sums of each of these files, and the executable scripts that would be run before and after installation or removal (preinst, postinst, prerm, postrm). Of course the system contains many, many packages and each one has multiple files here.

The more packages you install, the bigger this directory will get.

This directory is really important to the system. You should never delete anything from it, and if you do, you can expect bad bad bad things to occur.

size of my /var/lib/dpkg/info on a recently installed system:

74200 files, 41.8 MB

Conclusion: 80 MB is a normal size for this directory. Leave it alone :)

See Chapter 2 of the Debian Reference for detailed information.


How to dual boot OSX and Ubuntu without having to delete and reinstall Ubuntu in a Dell laptop?

Actually, a solution there is. I made a similar question on this site here:
Set Ubuntu partition back to active and boot with Chameleon

The difference is that I've done a triple boot, not dual, which is harder on just a HDD. This is what you have to do.

Prepare your OS X DVD (prepared with Unibeast or something like which works on PCs, a DVD is always preferable than a USB for further bootloaders issues)
On Ubuntu, make a partition to your drive of the space you want OS X to be and format it as FAT32 (it will be changed after, but in this way the installer finds it)
Boot your OS X DVD and install it on the partition (formatted as Journaled, but you can find these things in guides)
After you installed all the drivers, install the bootloader which will replace the GRUB (I used Enoch)
If you are not able to see Ubuntu at start of PC in the list of OSes, run Ubuntu Live CD, install BootRepair and set back Ubuntu as active partition, then set the partition of Mac OSX to run as first.
If everything goes well, you will be able to dual boot at start. (Remember that you can custom your bootloader preferences from an app, for example it at defaults runs OSX in 2 seconds if you don't press F8 key, while I chose to show immediately the OS list.

This thing is easier for you than how much it was for me, since Windows, Ubuntu and OS X use 3 different bootloaders and I installed them on the same HDD.

EDIT Notes:
Always keep these 2 things post-installation, you may always need them.
- An external OSX bootloader, if you have troubles with Enoch or Chameleon on HDD, you can always boot with DVD until you solve your issues (like I did)
- A Ubuntu Live CD for using BootRepair to solve issues you do or change partition priority to run.


Your screenshot shows what you're asking.
With ls, a directory is printed (in blue) as directory. With ls -F it's printed as directory/
Symlinks will be printed as symlink@ with ls -F.
Colors - as can be seen in your screenshot - has largely replaced -F for many people, as they indicate the same thing, in a more convinient form.


How can I easily control CPU speed on Ubuntu?

One of the best ways to do this is to install indicator-cpufreq if you wish to do the limit frequently [since this app starts on login]:

sudo apt install indicator-cpufreq

While if you do limits not so often, you can install cpufrequtils

sudo apt install cpufrequtils

These are the safe ways too, in the sense that you do not have to do edits inside the system.


Launchpad uses notification emails and Atom feeds to help you stay on top of the bugs that interest you.

  There are three ways to get bug notifications by email:

  subscribe to a bug
  subscribe to a milestone, project, package or distribution
  take a role that results in bug mail:

  bug reporter
  assignee
  commenter
  project or package bug supervisor.

  from Launchpad's Bug Subscriptions help.

First you will need to log in to  Launchpad. If you don't already have a user account, you will need to create one. The Launchpad documentation has instructions on how to set up a user account using OpenID.

After you've created your OpenID account, sing in to Launchpad:

Next you have to find your Bug. To do this, first find the product that the bug is associated with. Launchpad provides projecte management for many more projects other than Ubuntu.

When you've found the correct projects, visit it's Bug Tracker by clicking Bugs in the top navigation bar.

And find the bug you're interested in. Use the search function, and have a good look through all of the results. Sometimes, a bug's title can be a bit confusing. So make sure you've got the right one(s).

When you've found the correct bug, open it up and read it. You will get an indication as to the status of the bug.

You can see the importance of this bug is undecided. But it has been confirmed to be a real bug. You also get an indication which package in Ubuntu the bug is related to. Sometimes, there are more than one.
Now that you've found the correct bug, you may have also been brought here with a link from someone, you can subscribe to it:

Lauchpad will automatically notify you whenever there are changes to the Bug:

You can unsubscribe in the same way.

Launchpad's documentation has much more information on:

User accounts and OpenID
How to use the Bug Tracker
Bug subscription
What a bugs status means:

  · New
   · Incomplete: the bug report is
  incomplete and needs more information
  before it can be triaged. Bugs in this
  state are considered for expiry.
   · Invalid: the report describes the
  software's normal behaviour, or is
  unsuitable for any other reason.
  · Confirmed: a member of the community
  other than the original reporter
  believes that this report describes a
  genuine bug in enough detail that a
  developer could start work on a fix.
  · In Progress: a developer has taken
  responsibility to fix the bug and has
  begun work.
  · Fix Committed: a developer has
  committed his/her fix to the project's
  codebase.
  · Fix Released: a new version of the
  software, featuring the bug fix, has
  been released.

If you experience the bug yourself, that is if you can reproduce the problem on your computer, make sure to let Launchpad know:

This alone will not subscribe you to the bug. But it will let the Bug Tracker, and the developers, know that you are affected. The number of people affected is an indication as to how important this bug is.

You can also subscribe to a bugs Atom Feed, using your favourite feed reader.

Get the Bug's ID from the URL of the page

and add it to your feed reader:

http://feeds.launchpad.net/bugs/<number>/bug.atom


Does your hdd have SMART (self-monitoring-something - it predicts when your disk is going to be trash before it happens)? If yes, you could search for any tool that is able to read out these values (Windows: SIW, hwInfo, Defraggler - Ubuntu: ?), as your problem sounds to me like a hardware problem. Think of backing up important files, which is never a fault. If it really is a hardware problem (hdd going to die soon), you should avoid unnecessary spin-up/-downs, so keep it running as long as possible or keep it off, but avoid many restarts.


why cant i install xubuntu using wubi installer?

Since 12.10, Xubuntu was removed from Wubi by the request of the Xubuntu project lead. It's no longer possible to install Xubuntu, except with an elaborate workaround.

You can still use Xubuntu with 12.04.1 wubi.exe but that also requires a workaround to install due to a bug: only possible with wubi.exe 12.04.1 and xubuntu desktop iso 12.04.1 in the same folder.

bcbc- http://ubuntuforums.org/showthread.php?t=1961647


Basically, if you didn't perform any bank payments on the computer you've downloaded these on between visiting these dodgy web sites and posting this question you're safe...

What to do if you did perform bank payments:

Contact the anti-fraud department of your bank immediately!
Keep the date/time you started the conversation with your bank in a secure place (Not your computer!  A paper agenda would be perfect)
From this point in time, you're protected according to EU rules and regulations (verify your statutory rights if you're outside of the EU)
Clear your cache

Nothing more to do!


Purge and reinstall Linux 3.19.0-31 (on 14.04 LTS)

The kernel version 3.19.0-31 isn't available in Trusty (perhaps in the proposed repository).
The package linux-generic-lts-vivid installs  the current kernel version 3.19.0.30.17.

Therefore remove the packages for 3.19.0-31.

sudo apt-get purge linux-headers-3.19.0-31 linux-headers-3.19.0-31-generic linux-image-3.19.0-31-generic linux-image-extra-3.19.0-31-generic

More isn't necessary, because linux-generic-lts-vivid is already installed on your system with the kernel version 3.19.0.30.17.


how to access and change tcp configuration

It's the same. You can read/set most TCP/IP parameters with the ifconfig command. You can find out about which parameters by reading man ifconfig. You have to use sudo (or some other way of becoming root) to set. Also, I've found that the changed parameters take effect ONLY as the interface transitions from DOWN to UP (via ifconfig). There's also the iwconfig command for wireless parameters man iwconfig

Good luck with your assignment.


Caching CentOS packages on Ubuntu using apt-cacher-ng

It's been working ok for me using the latest apt-cacher-ng on 12.04 from the backports (sudo apt-get install apt-cacher-ng/precise-backports).  Otherwise you need to edit the VfilePattern in acng.cnf to add some of the centos/rhel patterns.
See this for more info: https://bugs.launchpad.net/ubuntu/+source/apt-cacher-ng/+bug/1006844


APT way to get Adobe Flash Player latest version for Linux not working

First

Make sure you have the Universe repository enabled (in Software Sources, accessible from Software Center -> Edit -> Software Sources, or sudo add-apt-repository universe or see How do I enable the "Universe" repository? ).

1a. And just in case the adobe-flashplugin package is missing, you may not have the "Canonical Parter" repo activated in Software & Updates / Software Sources, see Ubuntu's help page for 14.04 trusty or 16.04 xenial.
Update package index files (run sudo apt-get update ).

Mozilla, Firefox - NPAPI (Extended Support Release)

Note that the about Adobe Flash Player page says the "Linux - Mozilla, Firefox - NPAPI (Extended Support Release)" version is apparently not being updated past 11.2.x for Linux (& Solaris).

In this case, it looks like yours only launching the Software Center, and maybe doing a strange search that doesn't get any results.

I'd run apt-cache in a terminal, and search for adobe-flashplugin or flashplugin-installer (or just flashplugin).

I've got adobe-flashplugin installed, but there's several "adobe flashplugin" packages available, trying to install a different one wants to remove this one first. I think adobe-flashplugin is the version you'd want, apparently from these Q's What's the difference between flashplugin-installer and adobe-flashplugin? and flashplugin-installer vs. flashplugin-nonfree vs. adobe-flashplugin the difference is:

flashplugin-installer - extracts the 32-bit Flash player, and installs a 32-bit compatibility layer for 64-bit systems.
adobe-flashplugin 32-bit or 64-bit version, depending on your system

This search should find all that're available (and also the pepperflash plugin mentined below):

apt-cache search flashplugin

Then you should be able to install with this:

sudo apt-get install adobe-flashplugin

(Or if you wanted the other one, sudo apt-get install flashplugin-installer)

Chrome (embedded), Chromium-based browsers - PPAPI

If you're using the Chrome/Chromium browser, it uses it's own Pepper flash player that is currently the same version for Windows & Mac & Linux. Chrome has it already embedded, while Chromium requires a package install.
(FYI, The Difference between Google Chrome and Chromium on Linux)

The Chromium packages are in the Ubuntu universe repo as chromium-browser and pepperflashplugin-nonfree so can be installed with these commands:

sudo apt-get install chromium-browser
sudo apt-get install pepperflashplugin-nonfree

or both at once:

sudo apt-get install chromium-browser pepperflashplugin-nonfree

And after they're installed the pepperflashplayer has it's own update script:

Check the versions installed and available "upstream":

sudo update-pepperflashplugin-nonfree --status

Install the lastest version available:

`sudo update-pepperflashplugin-nonfree --install

Use the Pepper Flash plugin with Mozilla/Firefox

FYI: I just saw an article on WebUpd8.org about a Firefox plugin available on the WebUpd8 PPA that should let you use the newer Pepper flash player. Here's a link & clip:

  Fresh Player Plugin Sees New Release (Pepper Flash Wrapper For Firefox)

  Date: Wednesday, January 14, 2015
  As you probably know, the latest Adobe Flash Player is available on Linux only via Google Chrome (it's bundled with it) while other browsers such as Firefox are stuck with an old 11.2 version.

  The Adobe Flash Player plugin that's bundled with Google Chrome is in the form of a PPAPI (or Pepper Plugin API) plugin and Mozilla isn't interested in adding support for it. Because of this, Rinat Ibragimov has developed Fresh Player Plugin, a wrapper that allows Linux users to use Pepper Flash from Google Chrome in Firefox and other NPAPI-compatible browsers.

  Note that according to its GitHub page, Fresh Player Plugin "mostly works, but some essential APIs are still to be implemented", so it may not work with some websites.

Here are the pasted instructions for adding the WebUpd8 PPA & the Fresh Player Plugin:

  Install Fresh Player Plugin in Ubuntu (via PPA), by using the following commands:

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

  You can also download the deb from HERE but installing it without adding the PPA means you won't get updates!
  Fresh Player Plugin is just a wrapper for libpepflashplayer.so so it needs this file which is bundled with Google Chrome. The easiest way to get this file is to simply install Google Chrome Stable - download it from here, then install it. That's it!

  There are other ways of getting libpepflashplayer.so but I won't post installation instructions for all of them here. Instead, I'll just list them below:

  if you're using Google Chrome Unstable, create a symbolic link from /opt/google/chrome-unstable/PepperFlash to /opt/google/chrome/ or add a freshwrapper.conf file and add the /opt/google/chrome-unstable/PepperFlash/libpepflashplayer.so path there - see step 3;
  you can install Pepper Flash using 2 other ways: via the installer available in the official Ubuntu 14.04 repositories and via the Pepper Flash PPA which is also available for older Ubuntu versions - once installed, then you'll need to create a symbolic link for Pepper Flash to /opt/google/chrome/PepperFlash/libpepflashplayer.so or see step 3 for how to change the path to it.


running a 64bit executable on a 64 ubuntu lucid

Try installing the Linux Standard Base (lsb) package.

sudo apt-get install lsb


Pressing Super key always shows shortcut keys

I finally found out the solution. The problem was I turned ON "Sticky keys" switcher, so I simply turned it OFF and everything works great now.

  Artem

For reference, the Sticky Keys option is in the Typing tab of Universal Access in System Settings.


How can I programmatically call Ubuntu's on screen keyboard in gtk/python?

Calling the onboard keyboard on focus of a field
You can call any command on focus in/out by using:
field.connect('focus-in-event', self.focus_in)

or:
field.connect('focus-out-event', self.focus_out)

where focus_in() and focus_out() are your functions, called on focus in or out.
An example
#!/usr/bin/env python3
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
import signal
import subprocess

class CallKeyboardTest:

    def __init__(self):

        # window definition
        window = Gtk.Window(title="Test 123")
        window.connect('destroy', Gtk.main_quit)
        # maingrid
        maingrid = Gtk.Grid()
        maingrid.set_border_width(12)
        window.add(maingrid)
        # two different fields, one is calling the keyboard, the other isn't
        testfield = Gtk.Entry()
        testfield.connect('focus-in-event', self.focus_in)
        testfield.connect('focus-out-event', self.focus_out)
        otherfield = Gtk.Entry()
        maingrid.attach(testfield, 0, 0, 1, 1)
        maingrid.attach(otherfield, 0, 1, 1, 1)
        window.show_all()
        Gtk.main()

    def focus_out(self, entry, event):
        subprocess.Popen(["pkill", "onboard"])

    def focus_in(self, entry, event):
        subprocess.Popen("onboard")

    def stop_prefs(self, *args):
        Gtk.main_quit()

if __name__ == "__main__":
    CallKeyboardTest()

On the example above, the on screen keyboard will be called if the field "testfield" gets focussed, on focus out (or focussing on the "otherfield"), the on screen keyboard will disappear.
Call the keyboard on focus

Close the keyboard on focus out

Note
The onboard keyboard has a number of option, like layout, position, log-learning, size etc. See man onboard


Each plugin has a .desktop file in /usr/share/kde/services.  If you delete the .desktop file, then the plugin will no longer show up in krunner.

Additionally, the functionality of a plugin is provided by a library (.so) file in /usr/lib/kde4/, so you could also remove that.  You should know, however, that one library may provide functionality to more than one plugin.

For example, if you want to get rid of the YouTube plugin you could delete

/usr/share/kde4/services/plasma-runner-youtube.desktop

And since no other plugin uses the library krunner_youtube, you could also delete

/usr/lib/kde4/krunner_youtube.so

It's probably safer and easier to just leave it in place, though.

To reinstall a removed service, just reinstall the plasma-runners-addons package.

Having said all this, I think the preferred method of not having plugins is just to disable them.


Just use melt and instead of giving it a video file use an image file that you either join to the video at the begining or end (remember to give it an out= time in frames to define the time length of the image) or that you blend with a filter.

A lot of examples and uses of other commands too:

Command-line video editing in Linux (cut, join and preview)

  To utilize images (say, .png) in a video edit composition:

melt \
video.avi in=30 out=79 \
test.png in=0 out=15 \
video.avi in=30 out=79 \
-blank 15

  Note that for test.png, in= parameter doesn't need to be 0 - however,
  the image will be displayed for out-in time; in this case, it would be
  easiest to simply leave the in=0 parameter out altogether.

The youtube playlist that you mention in your comment is really good and simple to understand. It gives good examples of the commands and also of how to write simple scripts in Bash to iterate the use of filters and mixes over multiple files. Worth watching!

Here it explains how to add to your video text using gstreamer:

  gst-launch filesrc location="<Filepath>" ! textoverlay text="Title : Hello" valign=top halign=left ! xvimagesink


Assigning a shortcut to send keyboard input, in Plasma 5.18 - never works,

There's a systemic bug there.
I have 2 workarounds, using xdotool

install xdotool (apt install xdotool).
Create a custom shortcut with the script as action (New > Global Shortcut > Command/URL; Trigger: (your key combo)

Workaround #1 - sleep
Add a sleep command before calling xdotool:
sleep 0.6
xdotool type "¯\\_(ツ)_/¯"

Woraround #2
Release the shortcut keys before calling xdotool:
xdotool keyup Super+n
xdotool type "¯\\_(ツ)_/¯"

notes:

in my case, the script can be called by multiple shortcut keys. So I call xdotool keyup multiple time, for each key-combo.

use double quotes. Don't ask me why. Not required for a single key.

Escape the single backslash, i.e.  "¯\\_(ツ)_/¯"

The reason for the workarounds, is that the key combo is using the meta key. If the meta key is pressed while the unicode code is sent to the current app, then Plasma is sending garbage to the current app / to the window management. With a small delay, it doesn't happen.

xdotool sends it to the currently active window by default.

This is obviously an ugly and fragile hack, NOT a rock solid feature.

There are numerous KDE bugs around this feature, one of them is about reusing old shortcuts. If it doesn't work immediately, I recommend logout / restart.


How should one set the grub-pc package's "install_devices" debconf setting?

sudo dpkg-reconfigure grub-pc is the officially-supported way, and it still works fine for me.  Are you on a non-BIOS system or something?  Perhaps sudo DEBCONF_DEBUG=developer dpkg-reconfigure grub-pc might be illuminating.


The best way seems to be the tagging file system tagsistant.

From the homepage:

  Tagsistant is a tag-based filesystem for Linux that turns directories
  into tags and search your files for you.

  Mount Tagsistant

  Just tell Tagsistant the name of the directory you want to use, for
  example myfiles/ in your home. This directory is now a special place
  with custom rules that help you manage your files.

$ tagsistant ~/myfiles
$

  Create your tags

  Think to directories under tags/ as white stickers you write something
  on top of. Create as many tags as you need, ready to mark your files.

$ mkdir ~/myfiles/tags/startrek
$ mkdir ~/myfiles/tags/starwars
$ mkdir ~/myfiles/tags/scifi

  Tag your files

  After creating a tag in tags/, it will be available in store/. Copy
  your files inside it: that's how you tag files. The @ marks the end of
  the tag list and it's required.

$ cp first_contact.avi ~/myfiles/store/startrek/@
$ cp the_return_of_the_jedi.avi ~/myfiles/store/starwars/@

  Find your files by tags

  Compose your search query by choosing as many tags you desire. You can
  even combine the results of more than one query by placing a +/ in
  between, like in startrek/+/starwars/ which merges the files tagged
  startrek with the files tagged starwars.

$ ls ~/myfiles/store/startrek/@
first_contact.avi
$ ls ~/myfiles/store/startrek/+/starwars/@
first_contact.avi
the_return_of_the_jedi.avi

  Activate relations between tags

$ mkdir ~/myfiles/relations/scifi/includes/startrek
$ ls ~/myfiles/store/scifi/@
first_contact.avi                # 1 file...
$ mkdir ~/myfiles/relations/scifi/includes/starwars
$ ls ~/myfiles/store/scifi/@
first_contact.avi
the_return_of_the_jedi.avi       # 2 files!

  Tagsistant understands several relations:

includes: If A includes B, any file tagged as B can be automatically found inside A.
excludes: If A excludes B, any file tagged as B can't be found inside A even if it's tagged as A.
is_equivalent: If A is equivalent to B, then all the files in A are available in B and vice versa.

  And there's even more!

  Tag entire directories

$ cp -R ~/Photos/London ~/myfiles/store/photos/@
$ ls -l ~/myfiles/store/photos/@/
London
$ ls -l ~/myfiles/store/photos/@/London/
-rw-------  1 tx0 tx0 2.3M Sep 28  2009 bridge.jpg
-rw-------  1 tx0 tx0 3.0M Aug 30  2011 trafalgar_square.jpg
[ ... more files here ... ]

  With Tagsistant you can tag entire directories. The directory itself
  will be tagged, not the files inside, saving space in the tag db.

  Use triple tags

$ ls ~/myfiles/store/document:/author/eq/Tx0/@
$ ls ~/myfiles/store/document:/title/inc/Strategic/@
$ ls ~/myfiles/store/pictures:/aperture/gt/5.6/@
$ ls ~/myfiles/store/time:/hour/lt/3/@

  Triple tags are advanced tags formed by a namespace (terminated by a
  colon) which identifies the domain of interest of the tag, a key which
  qualifies the tag, an operator (eq for equality, gt for greater than,
  lt for less than and inc for includes), and finally a value which
  quantifies the tag.

This seems to me the most consistent and elegant approach for file tagging on Linux. It's around for more than 10 years, so it's a mature solution as well, without the risk of disappearing soon.


Hows to set Skype shortcut for opening existing instance?

A user, jackwizard, over at the Skype forums found a workaround. His script is mirrored at github, and copied here for your convenience.

Copy it into a file called skype-single-instance
Make it executable. chmod +x skype-single-instance
Test it. pkill -9 skype, then ./skype-single-instance, then ./skype-single-instance
Make it available system-wide. sudo cp skype-single-instance /usr/bin/
Change your shortcuts to use it instead of the normal skype command.

.

#!/usr/bin/env python
import dbus
import sys
import os

try:
    # Try and set skype window to normal
    remote_bus = dbus.SessionBus()
    out_connection = remote_bus.get_object('com.Skype.API', '/com/Skype')
    out_connection.Invoke('NAME mySkypeController')
    out_connection.Invoke('PROTOCOL 5')
    #out_connection.Invoke('SET WINDOWSTATE MAXIMIZED')
    out_connection.Invoke('SET WINDOWSTATE NORMAL')
    out_connection.Invoke('FOCUS')
except:
    os.system("skype")
    sys.exit()


What does the Evolution "Flagged" column represent?

It's basically just a marker for your own reference, so you remember to come back to it later. You can read more about this and other features of evolution in the User Guide.

Evolution User Guide: Web

Evolution User Guide: PDF

These are both up to date for the latest version (2.3).


Laptop Asus G1S NO sound from built-in speakers

Try checking your drivers. Open up the dashboard and search for, "Additional Drivers" afterwards launch it. From there, see if you can find your sound cards drivers. If not, than open up your Ubuntu Software Center and search for, "Gnome ALSA Sound Mixer" it's the best tool to tweak and mess with your sound settings. Hope this solves your problem, if it doesn't, seek addtional support at http://ubuntuforums.org/


No, you do not need an additional, separate, /boot partition. /boot will reside on / on sda and that is fine.


Why does apt-add-repository adds PPAs to sources.list.d directory, but repositories links to sources.list file

AFAIK, (one could check APT's history), the original way was to let PPAs get added to /etc/apt/sources.list. But, as time went on, and the number of possible additional PPAs expanded beyond expectation, it became clear that modifying /etc/apt/sources.list wasn't the best choice. The /etc/apt/sources.list.d/ method was added (maintaining backward compatibility by looking at /etc/apt/sources.list, too). Many packages do it (look at echo /etc/*.d /etc/*/*.d, read man run-parts, although it doesn't apply to PPAs)


Black screen and cursor only when I log in in 13.10

I think it's aproblem related to your graphics. There must be some problem during installion of ubuntu.

First try deleting the /etc/X11/xorg.conf and restart your system.

Or you can try reinstall of below listed packages:
On startup press:

Ctrl + Alt + F1

Then:

apt-get install --reinstall xorg-xserver*
apt-get install --reinstall gdm
apt-get install --reinstall unity

Same thing happened with me and tried to look for the solution once succeeded but later ended up with a re-install. If you're installing through usb then it is very important to use the correct software to make usb bootable. I have faced this so telling you. I think if you decide to re-install ubuntu then use "unetbootin".


Help with install on a non working windows compter

Check some pages

http://www.michaelstevenstech.com/bios_manufacturer.htm
http://pcsupport.about.com/od/fixtheproblem/a/biosaccess_mb.htm
$SEARCH_ENGINE search for bios keys or similar

and check the different key combinations (a lot more than ESC and F2 (although there're the most popular)). If you don't know your mainboard manufacturer and/or type, try some of them. Either get into the BIOS menu or into the boot device menu and choose USB, if there're multiple entries try all of them. The entry succeeded if the Ubuntu live session boots, if failed if the old system boots.


sudo halt will halt the machine, and on some hardware also power it down.  sudo halt -p will power off the system.


/var/log/secure not present in 14.04 ,is there any alternative?

This type of log events is usually found in /var/log/auth.log in Debian and its derivatives including Ubuntu.


I have had an headache trying to install Cuda 6.0 on Ubuntu 14.04. After looking out for solutions I have come to the conclusion that cuda6 does not run on Ubuntu 14.04. The version available for Ubuntu 14.04 is lagging behind NVIDIA CUDA toolkit 6.

You could try:
Installing and testing CUDA in Ubuntu 14.04

I installed Cuda 5.5 on Ubuntu 14.04 and it works fine. I have the nvidia 331 driver installed.

I reckon you installed Cuda 5.5 on Ubuntu 14.04. It seems to work better than Cuda6.


Is it possible to install Ubuntu onto a DVD?

You can not install ubuntu in a dvd like a USB storage device. But there is an alternative. You can make a live dvd from your harddisk ubuntu installation. Unlike USB, you can not store files after working in the dvd. You have to store files in your hard drive.


I think you add language myanmar  you want in setting language, after you restart computer, and you show ibus and config keyboard you want.


Chromium kept crashing for me on Ubuntu 18.04 on the Dual Authentication page for my account that had DualAuth enabled (and in Gmail generally for my other account). I had just installed Chromium, and rebooting seems to resolved the issue for me.


How to do an offline installation of packages in ubuntu 12.04 by exporting this folder /var/cache/apt/*

You can install local packages using

dpkg -i /path/to/packagename.deb

but you should take care of dependencies yourself, by installing all packages in correct order.


LCD brightness step on T520 with Ubuntu 11.10

One way to change the brightness to individual settings is to use your console. So open a terminal (e.g. gnome-terminal) and:

Find where your system saves brightness settings: sudo find /sys /proc -name brightness. Usually they can be found in /proc/acpi/video/*/*/brightness, where * is some directory which depends on your graphics card. On my system I find the brightness settings at /sys/devices/virtual/backlight/acpi_video0/brightness.
If the find command produces no output, check if the video kernel module was loaded: lsmod | grep video should output something like video                  18612  0.
Now check what is contained in the files the find command found: cat $DIR, where $DIR is the directory from find output. Sometimes you will only find a number and sometimes some numbers (levels) and the actual setting.
Change brightness setting: echo $somenumber | sudo tee $DIR, where $somenumber is an integer and $DIR the directory from the output of find.
When the command was successful executed, you will notice a changed brightness.


Change name of multiple files/folders under a directory

Method

Change directory to the top of the directory tree, that you want to treat (change names of directories and files).

cd top-of-target-directory-tree

Then run the following commands, dry run to check and then do it, if the check looks good,

find . -depth -execdir rename -n 's/Apple/Orange/;s/apple/orange/' "{}" \;

find . -depth -execdir rename 's/Apple/Orange/;s/apple/orange/' "{}" \;

Test example

$ find
.
./Apple3
./Apple3/Apple4
./Apple3/apple4.1
./Apple3/Apple4/apple5
./apple1
./apple2
$ find -type d
.
./Apple3
./Apple3/Apple4

$ find -type f
./Apple3/apple4.1
./Apple3/Apple4/apple5
./apple1
./apple2

Dry run

$ find . -depth -execdir rename -n 's/Apple/Orange/;s/apple/orange/' "{}" \;
rename(./apple4.1, ./orange4.1)
rename(./apple5, ./orange5)
rename(./Apple4, ./Orange4)
rename(./Apple3, ./Orange3)
rename(./apple1, ./orange1)
rename(./apple2, ./orange2)

Do it

$ find . -depth -execdir rename 's/Apple/Orange/;s/apple/orange/' "{}" \;

Check it

$ find
.
./orange1
./Orange3
./Orange3/Orange4
./Orange3/Orange4/orange5
./Orange3/orange4.1
./orange2


Zero-out drive on Linux is done via:
dd if=/dev/zero of=/dev/sdX

where sdX is the device of the drive to delete.
If you're not aware on how to do this, press Ctrl+Alt+T from Ubuntu, and type following:
sudo dd if=/dev/zero of=/dev/sdb

In example above, sdb is the second connected drive.
NB! This will erase your drive completely. Use at your own risk.

EDIT 1:
Optionally, you might want to add status=progress to show progress status:
sudo dd if=/dev/zero of=/dev/sdb status=progress

EDIT 2:
As per comments below, setting the buffer size might significantly speed up the process:
sudo dd if=/dev/zero of=/dev/sdb bs=16M

Please note, however, with a buffer dd will not wait until operation is complete, so afterwards you might need to execute sync command, which synchronizes data on disk with memory.
sudo dd if=/dev/zero of=/dev/sdb bs=16M && sync

What's the purpose of sync? Simple: in case if your storage is slow and power off happens right after dd while disk data is not synchronized, some of the data might be lost. It might be not so relevant for this particular case about zeroing out the drive on PC, but for things like embedded systems with slow flash memories this needs to be considered.


It's a documentation bug in the man page, the behavior is documented in /usr/share/doc/less/README.Debian).

In Debian and its derivatives (like Ubuntu) programs must use editor as standard editor if neither $VISUIAL nor $EDITOR is set, see the Debian policy manual.


pgrep

You can use pgrep with -a switch:

pgrep -a find

it will give you a full command line as well as the process ID:

10838 find / -iname png
10839 find / -iname jpg

then you can decide if it's the one you want to kill or not:

kill 10838

will kill the png one.

pkill

you can also use pkill like this:

pkill -x "find / -iname png"

-x means: Only match processes whose names.

Find child process:

use tree to find your desired process, let's say your script name is "script.sh" you can use pgrep -f script to find it, then pass the output to pstree to get a list of it's child and kill the find process which is the child of your script.

$ pstree -p $(pgrep -f script)
bash(10915)───find(10916)
$ kill 10916


Is there a secure web-shell for my server?

A rather freakish friend of once mine told me about Ajaxterm. WebShell is based on Ajaxterm so I supposed that would be fine, too. The Ubuntu wiki also says shellinabox could be, what you want. I have no experience whatsoever with them.


How to resolve the dependency of `highline`

This is because rhc and commander requires different versions of highline.
Try this:

sudo gem install highline --version 1.7.1
sudo gem install highline --version 1.6.1


How is being the root user different from being the super user?

It's the same, see comment by edwin. Note, however, that the Ubuntu (and generic Unix) superuser is determined by its numeric id, rather than the username. The superuser is the one with a UID of "0". Conceivably you could have a user named "noob" with an UID of 0, this would constitute a superuser but wouldn't namely be root. This is however very convoluted, for all practical purposes they are the same thing.

  If it is different anyways, is there a way to use the shell as the
  root?

You can start a session as root, using the -i option to sudo (for opening an *i*nteractive session):

sudo -i

You will be asked for your user's password, to confirm your identity (same as when you run sudo elsewhere). Then you'll be left in a root (or superuser) shell.

  Is there a root password for that?

By default the root user has no password assigned in Ubuntu, you can assign one if you like but it's better to use a normal user and sudo -i if needed. It's even better to just use sudo for specific commands, rather than use a session.

  Is it different from the super user password?

Only if you have another user with id 0.


IEEE8021X wpa_supplicant WIRED interface 16.10

OK I figured it out!

I dropped the /etc/rc.local business and now in addition to the wpa_supplicant.conf I now have the following in my /etc/network/interfaces.

auto enp0s31f6
iface enp0s31f6 inet dhcp
     pre-up wpa_supplicant  -c /etc/wpa_supplicant/wpa_supplicant.conf -Dwired -ienp0s31f6 &
     pre-up sleep 4
     post-down pkill wpa_supplicant

This works on reboot and also with ifup/ifdown. Yay!

Also if one wishes to be more secure you can do the following to generate a NTPasswordHash that you can use instead of plaintext password.

echo -n your_password | iconv -t utf16le | openssl md4

You will then place that in the password field for your network in wpa_supplicant.conf as follows:

password=hash:6602f435f01b9173889a8d3b9bdcfd0b

NOTE: You must omit the quotes or else it will try to send the actual string (with hash:) and fail.


Unity bar changing colour without request

You can try to set the launcher color to custom using the unity-tweak-tool.

Edit:
Installation: sudo apt-get install unity-tweak-tool
Open it, then under Unity -> Launcher -> Appearance you can set the color to Custom.


Speakers go to 100% volume instead of being muted when plugging in headphones

While looking for information to extend my question I surprisingly stumbled upon a solution/workaround, although I don't understand what exactly is going on. Maybe this is useful to someone. Maybe someone can provide an explanation on what is going on.
Observation
In alsamixer I have four SPDIF channels and all of them were unmuted (OO)

I found that while no headphones are plugged in, S/PDIF and S/PDIF 16 (outer channels) must be turned on for sound to be outputted. The other two (2nd and 3rd) have no effect.
When I plugged in headphones only S/PDIF 16 had any effect on sound of the speakers.
Solution
Although the inner SPDIF channels have no effect on sound no matter whether headphones are plugged in or not, they do seem to change something that makes the sound switch work.
While the headphones are not plugged in, mute the inner channels S/PDIF Default and S/PDIF 1 by using cursor keys ← and → to select the appropriate channel and then m to mute, like so:

Now when you plug-in headphones the speakers are muted.
To make this persistent between reboots, run as root
# alsactl store