Apt already maintains an 'available archive of installed packages'. It's located at
 /var/cache/apt/archives.

Debs are not removed from the archive upon uninstall; they remain in the archive to make reinstall trivial for you. Older versions remain, too. Apt automatically uses cached debs instead of new downloads when possible.

Here's an example: The first time I install the hello package, apt downloads the package and all the dependencies and stores those debs in the local archive. Then apt tells dpkg to install the packages in the correct order. When I then uninstall the hello package, the deb remains in the archive. Finally, the second time I install the hello package, apt sees that the current version of the package is already in the archive, and uses that instead of downloading.

Just don't run apt clean, which will delete the entire archive (only the archive; it does not install or uninstall anything). apt autoclean will remove only older versions of debs from the archive, leaving the current versions in place. Consider backing up your archive periodically.


An alternative way to run a command if a screen is connected or disconnected

An alternative solution would be to run a tiny background script. Running the script below in the background, I could not measure any increase in processor load whatsoever.

It is an easy an convenient way to run a script, or any other command, whenever a second screen is connected or disconnected.

The example script

Simply checks every five seconds how many times the string " connected " occurs in the output of the command xrandr (mind the space after "connected" to prevent false matches with "disconnected"). Each occurrence represents a connected screen.
If the number of occurrences changes, either a screen was connected or disconnected. The change is "noticed" by the script and can be connected to a command, you can set in the head section of the script.

The script

#!/usr/bin/env python3
import subprocess
import time

#--- set both commands (connect / disconnect) below
connect_command = "gedit"
disconnect_command = ""
#---

def get(cmd): return subprocess.check_output(cmd).decode("utf-8")
# - to count the occurrenc of " connected "
def count_screens(xr): return xr.count(" connected ")
# - to run the connect / disconnect command(s)
def run_command(cmd): subprocess.Popen(["/bin/bash", "-c", cmd])

# first count
xr1 = None

while True:
    time.sleep(5)
    # second count
    xr2 = count_screens(get(["xrandr"]))
    # check if there is a change in the screen state
    if xr2 != xr1:
        print("change")
        if xr2 == 2:

            # command to run if connected (two screens)
            run_command(connect_command)
        elif xr2 == 1:
            # command to run if disconnected (one screen)
            # uncomment run_command(disconnect_command) to enable, then also comment out pass
            pass
            # run_command(disconnect_command)
    # set the second count as initial state for the next loop
    xr1 = xr2

How to use

Copy the script into an empty file, save it as connect_screen.py
In the head section, set the command to run on connect ( I set "gedit" as an example, mind the quotes). Also it is possible to set a command on disconnect, likewise. Else leave disconnect_command = "" as it is.

If you do use a disconnect- command, also uncomment the line:

run_command(disconnect_command)

and comment out the line:

pass

As indicated in the script
Test-run the script from a terminal, connect your screen and see if all works fine.
If all works fine, add it to your startup applications: Dash > Startup Applications > Add the command:

/bin/bash -c "sleep 15&&python3 /path/to/connect_screen.py"

The sleep 15 is to make the desktop start up completely before the script starts to run. Just to make sure.

EDIT

How to run the script on start up in a "smart" way.

The break of sleep 15 should work in general, but since the start up time differs per system, It might take some experimenting to find the right break time. With a small addition, the script becomes "smart", and waits for the xrandr command to be successful before it starts the actual script. If you use the version below, you only need to add the command:

python3 /path/to/connect_screen.py

to your Startup Applications. Further usage is exactly the same as the version above.

The script

#!/usr/bin/env python3
import subprocess
import time

#--- set both commands (connect / disconnect) below
connect_command = "gedit"
disconnect_command = ""
#---

while True:
    time.sleep(5)
    try:
        subprocess.Popen(["xrandr"])
    except:
        pass
    else:
        break

# function to get the output of xrandr
def get(cmd): return subprocess.check_output(cmd).decode("utf-8")
# - to count the occurrenc of " connected "
def count_screens(xr): return xr.count(" connected ")
# - to run the connect / disconnect command(s)
def run_command(cmd): subprocess.Popen(["/bin/bash", "-c", cmd])

# first count
xr1 = None

while True:
    time.sleep(5)
    # second count
    xr2 = count_screens(get(["xrandr"]))
    # check if there is a change in the screen state
    if xr2 != xr1:
        if xr2 == 2:
            # command to run if connected (two screens)
            run_command(connect_command)
        elif xr2 == 1:
            # command to run if disconnected (one screen)
            # uncomment run_command(disconnect_command) to enable, then also comment out pass
            pass
            # run_command(disconnect_command)
    # set the second count as initial state for the next loop
    xr1 = xr2


What are the advantages and disadvantages of using WICD?

You could probably sum this up as:

  Advantages:

  It replaces Network Manager

  Disadvantages:

  It replaces Network Manager

They both aim to do the same job and they're roughly a drop-in replacement for each other. Some people prefer WICD because of its ncurses command line UI and others prefer to stick with NM because of its default status in most distributions and it does seem to be well maintained and improved.

The only times I've ever seen somebody switch from NM is when NM can't or won't do something they need. If you don't need WICD, I wouldn't suggest changing over.


Bluetooth Headphones Establish Connection But Isn't Listed in Audio Devices

If you're using blueman (and it sounds like you do), try utopic's version. Your issue is discussed in #1283003.


Why I am unable to update Ubuntu anymore using the Update Manager?

It seems that you need to update your sources, because the Update Manager is trying to fetch an older version of that flashplugin (it's trying to fetch 11.2.202.291, when 11.2.202.297 is the one found at security.ubuntu.com right now). Try following the below steps:

Close your Update Manager, and open it up again. You should see something like this:

.

If you do, wait for it to finish, then try updating. It should work. If not, follow the below.
Open a terminal by Ctrl+Alt+T.
Type sudo apt-get clean and Enter. Enter your password when prompted.
Type sudo apt-get update and Enter. Enter your password if prompted.
Once it's done, open up your Update Manager, and try to update again. If not:
In that terminal, type sudo apt-get upgrade and Enter. This command is the equivalent of what Update Manager does, except now you look geek-ier.


You can use a tool called Ubuntu-tweak, to install you will need to add the official ppa:

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

In the tweaks tab, in the Desktop section, there is a Unity button, this opens a module that has a "Launcher opacity" option.


USB Boot graphics corrupted on Macbook. UEFI mode?

When you see the little pictures at the bottom like a man and a keyboard, press F6 and then using the arrow keys and enter, check Nomodeset. Then, continue to boot. Once you install, you can enable nomodeset by at the grub menu, pressing e and adding nomdeset to the long line that usually has quiet splash in it. Then, use Alt_F2 to run gksudo gedit /etc/default/grub. Add nomodeset to the line that starts with GRUB_CMDLINE_LINUX(but make sure it is inside the quotes), save, and open a terminal. Run sudo update-grub.

Sorry about lack of screenshots.


It turns out that the situation can be resolved by changing:

member_attribute = CharField(db_column="member")

to:

member_attribute = ListField(db_column="member")

And by this all the member values in Accounts entry are fetched.


how to restrict time used for using computer in Ubuntu

Since you're an experienced user, I suggest you use pam_time:

  The pam_time PAM module does not authenticate the user, but instead it
  restricts access to a system and or specific applications at various
  times of the day and on specific days or over various terminal lines.
  This module can be configured to deny access to (individual) users
  based on their name, the time of day, the day of week, the service
  they are applying for and their terminal from which they are making
  their request.


The configuration on machine A was missing Samba. Once installed everything worked.

apt-get install samba


Windows don't boot after Ubuntu installation in VMware on a physical disk

Try using EasyUEFI in Windows. It's a GUI tool for managing EFI boot loaders, and it should enable you to set Windows as the default boot option.

If you wanted to do the same thing in Ubuntu, you'd use the efibootmgr program: Type sudo efibootmgr to see the options, then use the -o option to set the boot order as desired.


How to run Ubuntu without GUI in Virtual Box?

The easiest way is to install Ubuntu Server inside VirtualBox, it cames with no GUI by default, just command line.

If you change your mind and need a GUI, try Lubuntu,it uses LXDE a quite light GUI.


How to lock and unlock keyboard in Ubuntu ?

xtrlock might be what you're looking for. It disables the keyboard until you type your password. It does also disable the mouse, but you might be able to change that in the config. Install it by running sudo apt-get install xtrlock.


New GRUB after installing Linux Mint. How do I go back to my previous GRUB configuration?

I'm answering my own question if anyone else needs some help with a similar issue.

1) I booted into Puppy Linux using a liveCD - my favorite 'rescue' distro, probably.

2) I copied the menu.lst file from the root of sda1 to another folder.

3) I ran the GRUB installer again.

4) I deleted the newly created menu.lst and copied back my previous version - adding the entry for Linux Mint manually

5) Rebooted, and I had my old GRUB back


tail stops displaying in case of a log rotation

The Gnu coreutils version of tail has the --follow[={name|descriptor}] parameter, which allows you to follow the file name rather than the descriptor. It continues to tail files even after they rotate or truncate. From the help output:

  With --follow (-f), tail defaults to following the file descriptor, which
  means that even if a tail'ed file is renamed, tail will continue to track
  its end.  This default behavior is not desirable when you really want to
  track the actual name of the file, not the file descriptor (e.g., log
  rotation).  Use --follow=name in that case.  That causes tail to track the
  named file in a way that accommodates renaming, removal and creation.

I'm on Fedora, but I believe that you can install the Gnu coreutils on Ubuntu with the following command:

sudo apt-get install coreutils


See this:
Installing Ubuntu on external hard disk

And this:
How to install Ubuntu on portable external Hard Drive?

If set up properly, it should work.


How to install flash player in Ubuntu 16.04 LTS

I suppose that this is what you are refering to:
     sudo apt-get install flashplugin-installer

Way to go

Open Terminal (Ctrl+Alt+T)
Type that code piece of code.

(You might need to restart both system or browser.)


Dual Installation of Windows with Ubuntu on UEFI DUET system

First, it's not clear if the Ubuntu-installed GRUB is the BIOS-mode version or the EFI-mode version. If the former, you should be able to reconfigure it to launch DUET as well as Ubuntu, which should restore everything else to bootability. To do this, you'll need to edit /etc/grub.d/40_custom to add a boot entry for DUET. Alternatively, you could restore SYSLINUX and then later get your Ubuntu installation booting in EFI mode by replacing the BIOS-mode GRUB with another EFI-mode boot loader. If Ubuntu installed an EFI-mode GRUB, you'll need to either reconfigure GRUB to detect and boot your other OSes or supplement or replace it with something else. My EFI Boot Loaders for Linux Web page describes some of your options.

You can tell which version of GRUB you've installed by checking whether you've installed the grub-pc or grub-efi package in Ubuntu; the former is the BIOS-mode package and the latter is an EFI-mode meta-package (it actually installs an architecture-specific package).

If you find that you're using the EFI-mode GRUB, then installing rEFInd should be pretty easy -- you'll just need to install it using the instructions on the rEFInd Web site. Under DUET, you're likely to have to name it EFI/BOOT/bootx64.efi on the ESP, since DUET seems to forget the changes created by efibootmgr, in my experience. FWIW, my own BIOS-based laptop is booting Windows 7, Fedora 17, and Mint via DUET and rEFInd. (That said, I maintain rEFInd and I'm the author of the Web page on DUET you referenced, so I'm not exactly a novice at this game.)


Yes, that is the default action.

This can be overridden by Firefox, but out of the box the gconf setting
/desktop/gnome/url-handlers/apt/command is used. By default that command is apturl "%s".

You can change that by using either using the graphical tool gconf-editor or from the command line:

gconftool --set --type=string /desktop/gnome/url-handlers/apt/command 'software-center "%s"'

This will make Software Center handle apt URLs.


Wrong start and expire date in credentials cache after kerberos auth

I identified the issue.
Seems that something was wrong with my computer account stored in Active Directory. In my case strangely it was missing. Added it with net ads join now everything works like expected. Thanks for your support!


Bad return status for module build on kernel: 3.2.0-56-generic-pae

Try this:

sudo apt-get purge alsa-hda-dkms

then install the program again.


VirtualBox showing blank black screen when I try to run Ubuntu

Virtualisation needs to be enabled in BIOS.
Hyper-V must be un-checked under: Control Panel > Programs > Turn Windows Features on or off.
You may also need to edit the following registry key (should be set to 0): HKLM|SYSTEM|CurrentControlSet|Control|DeviceGuard|EnableVirtualizationBasedSecurity|Enabled
PC will need a reboot for above changes to take effect.


Where are the LXC container configuration files located?

I guess you are talking about the 'old' LXC containers. In case you are running Ubuntu 16.04 or Ubuntu 16.10, everything is located in the /var/lib/lxd folder, also the commands changed.

To get a list of the available commands, execute lxc help --all and for deeper information lxc manpage. Here you can find additional useful information about the "newer" LXD system containers in Ubuntu :

Linux Containers - LXD
LXD doc / configuration
The LXD 2.0 Story series


Ubuntu inside/alongside windows 7 not taking my deleted partition(After selecting install ubuntu inside windows, my system restarts back)

You need to install Windows prior to installing Ubuntu.  Windows uses MBR (Master Boot Record), and Linux uses Grub as the OS loader.  Linux is flexible, and will install with Windows alongside it, but if you try to install Windows after having installed Ubuntu, you're out of luck.  Well, not entirely, but there's a lot of mucking around to do.

Just make sure you have enough space.  I wouldn't recommend installing Windows 7 on any partition less than 100GB, from my experience.  Because, you want to allow for updates, and whatever software you use, such as games and other stuff.  I've installed Win7 on 80GB partitions, and after installing a couple of games, I started running out of space.  You don't want to get too close to your partition's end, because that's when you start to experience lag on your OS.  Although Win7 does a better job than FAT32 at keeping your filesystem neat and defragged, you'll still run into trouble when trying to find swap space.  So do yourself a favor ... Take any backups that you can, and start over.  If you can afford to, get another hard drive.

Once you've backed up, boot from your Windows DVD.  Format the hard drive, and create one partition for Windows, and the rest of the drive, leave it blank.  This way, when you decide to install Ubuntu, it too can create it's own partition.  I'd recommend at least 80GB for Ubuntu ... but take that figure with a grain of salt.  I use a bunch of stuff, so I need the space.  Realistically, you can run Ubuntu with 8GB and be OK, but that's keeping all your other software elsewhere.  Perhaps a NAS or Samba share.

If you need further detail on how to do this, follow this link.

Best of luck!  Just remember, the figures I gave above are to be taken with caution.  If you know you don't need that much, then go ahead and by all means make them smaller.  If you need to keep those larger, feel free to make them larger, as I don't know how you'll use your's.  I like to estimate and allow for expansion, but if you know how much space your final set-up will take up, then use your discretion.


How to get Ubuntu to ask for my password at login screen again?

Well I found what was wrong. As I made clear, I had a password. Terminal asked for a password when I attempted a sudo command. Automatic login was already off, but Ubuntu just didn't ask for password even if it prompted for choosing the user at login screen. I could just click on my username and it will log me in without a password.

I was placed in "no login password" group. I did this command:

sudo gpasswd -d myusername nopasswdlogin

And I was removed from this group. Now my account asks for password...


Ubuntu 16.04 unable to boot with GTX 1080

I had this problem with my 1080 and just solved it yesterday. You'll need to install using integrated graphics, install nvidia drivers, then switch back to the 1080.

First, make the live USB for Ubuntu. Go into your BIOS settings, and enable both iGPU and the GPU. Plug in your monitor to the HDMI port on the motherboard, and install Ubuntu as normal. After installation, boot Ubuntu and install the nvidia-367 drivers. Once that's done, you can plug your motherboard back into the the GPU and use Ubuntu.

Here's the PPA you need for nvidia-367: https://launchpad.net/~graphics-drivers/+archive/ubuntu/ppa

One problem I haven't solved is that the monitor turns off while Ubuntu is loading. It turns back on at the login screen. Not sure why :/


Ubuntu server 16.04 no wireless internet connection

I suspect that you have set wpa-psk in /etc/network/interfaces to the passphrase for your wireless network. That will not work.

Let's say the SSID for my router is MYROUTER, and I set the WPA/WPA2 passphrase on my router to MySecretPassphrase. At first glance, you would think that /etc/network/interfaces should look like this:

wpa-ssid MYROUTER
wpa-psk MySecretPassphrase

Wrong. I made this mistake a few months ago, and it took me a while to figure why it was not working. In short, wpa-psk should be set to the 256-bit pre-shared key for this SSID. Do not set wpa-psk to the passphrase.

How do you that? By using the wpa_passphrase command (if it isn't installed, you can install it with sudo apt install wpasupplicant). From the man page:

  wpa_passphrase  pre-computes  PSK  entries  for  network
  configuration blocks of a wpa_supplicant.conf file. An ASCII
  passphrase and SSID  are used to generate a 256-bit PSK.

Let's give it a try:

~$ wpa_passphrase MYROUTER MySecretPassphrase

Output:

network={
    ssid="MYROUTER"
    #psk="MySecretPassphrase"
    psk=93763b13c803b7269956cb9bf584c75eb0fd0e99c51ecf49598a4016a29aa3f1
}

Assuming the wireless adapter is labeled wlan0, the /etc/network/interfaces file for the example above should look like this:

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet dhcp
wpa-ssid MYROUTER
wpa-psk 93763b13c803b7269956cb9bf584c75eb0fd0e99c51ecf49598a4016a29aa3f1

Instead of typing this long string or using copy/paste, you can do this to append the relevant lines to /etc/network/interfaces:

~$ wpa_passphrase MYROUTER MySecretPassphrase | grep -vE "{|#|}" | tr -d '\t' | sudo tee -a /etc/network/interfaces

Then edit /etc/network/interfaces to make sure everything looks right.

Finally, either reboot or restart the networking service:

~$ sudo service networking restart


How to delete logs automatically after a certain time and restart the process that fills up the log file?

With logrotate you can configure how big a log file may get or after how much time:

the log files are rotated (log.n becoming log.n+1, and the last log file being deleted)
the current log file is truncated without disturbing the writing process.

Take a look at man 8 logrotate.


Installing/Setting themes information very confusing

I believe there probably is a web page making it simple but I cannot find the one where I learned how. To install a theme in Ubuntu:

Download selected theme
Extract the theme to the .themes folder in your home folder /home/(username)/.themes
(If you do not have the folder create it, and remember that putting a . in front of a folder will make it a hidden folder. So to show it on any revisiting of the folder press Ctrl + H to show hidden folders.)
Then install a tweaking tool such as MyUnity which is installable from the Ubuntu software center.
Then open MyUnity and navigate to the themes tab and all your themes located in the .thmes folder will be listed and you can freely choose them.

Both window themes and icon themes can be found there but to install an icon theme create a .icons folder within your home folder as you did for the themes folder.


If the window is hard-coded to have a minimum size bigger than your screen, then probably there's no easy way to make it smaller.

However, you can access the 'Next' button by moving the window upwards. To do that press and hold Alt, then click anywhere inside the window and drag upwards.

If Alt doean't work, try Super (usually the key with Windows logo).


Try to run

sudo nautilus

In a terminal. This will launch nautilus (your file explorer) as root and then you should be able to change the permissions as you want but be careful!


installing Oracle Database 10g XE Server in Ubuntu 11.04, "E: Unable to locate package oracle-xe"

Here is the step by step guide for Installing Oracle Database Express Edition 11g Release 2 on Ubuntu 12.10

Step 1. Managing Swap partition. Oracle Database Express Edition 11gR2 may require up to a 2GB (2095100 KB) swap partition, Enter the following command in terminal to verify your swap space:

cat /proc/meminfo | grep -i swap

If you don’t have enough swap space, you can increase available swap space by the following guide to create and enable swap partiton, in this case I’ll create 1 GB swap file and loaded at startup, located in the /home directory

Login as root:

sudo -i

Create swap file on /home directory with following commands:

dd if=/dev/zero of=/home/swapfile bs=1024 count=1048576
mkswap /home/swapfile
swapon /home/swapfile
swapon -a

Create a backup of the original “fstab” file and add the new swap file:

cp /etc/fstab /etc/fstab.backup_`date +%N`
echo '/home/swapfile swap swap defaults 0 0' >> /etc/fstab

Logout from root and verify the new swap space:

exit
swapon -s

Step 2. Install additional software thats require Oracle 11g Express Edition

sudo apt-get install alien libaio1

Step 3. Download Oracle Database Express Edition 11gR2 via Oracle Official website, it require registration before downloading.

Step 4. unzip the downloaded file, then convert the Oracle Database Express Edition 11gR2 package installer to debian package

unzip oracle-xe-11.2.0.1.0.x86_64.rpm.zip
cd Disk1/
sudo alien --to-deb --scripts oracle-xe-11.2.0-1.0.x86_64.rpm

Step 5. Configure Awk and Chkconfig, The following needs to be set for compatibility:

sudo ln -s /usr/bin/awk /bin/awk
sudo mkdir /var/lock/subsys

Ubuntu uses different tools to manage services and system startup scripts. The “chkconfig” tool required by the Oracle installer is not available in Ubuntu. The following will create a file to simulate the “chkconfig” tool.

Login as root:

sudo -i

Copy and paste the following Script directly into the terminal to create a file chkconfig:

cat > /sbin/chkconfig <<-EOF
#!/bin/bash
# Oracle 11gR2 XE installer chkconfig, Only run once.
echo "Simulating /sbin/chkconfig..."
if [[ ! `tail -n1 /etc/init.d/oracle-xe | grep INIT` ]]; then
cat >> /etc/init.d/oracle-xe <<-EOM
#
### BEGIN INIT INFO
# Provides: OracleXE
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Oracle 11g Express Edition
### END INIT INFO
EOM
fi
update-rc.d oracle-xe defaults 80 01
EOF

Logout form root:

exit

Set the file /sbin/chkconfig executable :

sudo chmod 755 /sbin/chkconfig

Step 6. Install Oracle Database Express Edition 11gR2 with the following commands:

cd ~/Downloads/Disk1
sudo dpkg -i oracle-xe-11.2.0-1.0.x86_64.deb

Run the following configuration script to create (clone) the database. Accept the default answers, including “y” to startup the database automatically, or modify as required.

sudo /etc/init.d/oracle-xe configure

To verify success, the procedure should end showing:

Starting Oracle Net Listener...Done
Configuring database...Done
Starting Oracle Database 11g Express Edition instance...Done
Installation completed successfully.

Step 7. Set a password for the Oracle account:

sudo passwd oracle

Step 8. Post-Installation, In order to use sqlplus and other tools, the Oracle account requires specific environment variables. The following will set these variables automatically at every Oracle login:

Login as the Oracle user:

su - oracle

Copy the default account skeleton files and add the Oracle env script to .profile:

cp /etc/skel/.bash_logout ./
cp /etc/skel/.bashrc ./
cp /etc/skel/.profile ./
echo "" >>./.profile
echo '. /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh' >>./.profile

Step 9. Configure remote login. By default, the Oracle Database XE graphical user interface is only available at the local server, but not remotely. The following will enable remote logins:

Login as the Oracle user, then login as SYSDBA and run the following commands:

su - oracle
sqlplus / as sysdba
SQL> EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
exit


How Do I See All Of The Tags Labelled 'Bounty' Launchpad-wide?

Just search for all bugs in all projects, and then narrow the search with the bounty tag. Shortened URL to trim the fat from advanced search comes out as:

https://bugs.launchpad.net/bugs/+bugs?field.tag=bounty


How can I differentiate between two systems at startup menu

Try installing grub-customizer (installation guide below) to your (K)Ubuntu system that contains GRUB. This GUI tool will provide you a nice set of options with that you can configure your GRUB settings, including names and order of the boot options, default system, screen resolution, fonts, background etc...

How to install grub-customizer:

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer

(source: launchpad)

Or do you want/need a solution without installing any tools (only terminal/editor usage)?


Changing the command executed using suspend/standby in 14.04 LTS

While I don' t know much about remapping keys, I suggest a workaround by binding pm-suspend to a keyboard shortcut. Make pm-suspend executable without password by placing something like
%yourusername ALL = NOPASSWD: /usr/sbin/pm-suspend into your /etc/sudoers file and then bind gksu pm-suspend to a shortcut in System Preferences -> keyboard -> Shortcuts -> Custom


Ubuntu 12.04 Gnome Classic and Unity Launcher

By issuing the command unity-2d-shell, you will launch the launcher.

Here is what you have to do, to automatically do this on startup:

Open Startup Applications

Add Startup Program

For autohiding the launcher in 12.04 see this question: Autohide Unity Launcher in Gnome Classic.


Just remove appmenu and appmenu indicator and related packages:

sudo apt-get purge indicator-appmenu appmenu-gtk


Binding Synapse shortcut to key-release instead of key-press

ksuperkey worked well for me. I followed the instructions here:

https://blog.hanschen.org/2012/10/17/open-application-launcher-with-super-key/

Except, I'm on Ubuntu 16.04 + MATE, so what I did was:

a) Removed Alt+F1 as the shortcut for the MATE menu in Preferences --> Hardware --> Keyboard Shortcuts

b) Set Alt+F1 as the Synapse shortcut:

cat ~/.config/synapse/config.json       {
          "ui" : {
            "global" : {
              "ui-type" : "default"
            },
            "shortcuts" : {
              "activate" : "<Alt>F1"
            }
          }
        }

c) Installed and ran ksuperkey

ksuperkey now does the mapping from the release of the Win key (Super key) to Alt+F1, which triggers MATE to launch Synapse. At the same time, other combinations involving Win work fine without invoking Synapse. (In particular, I set up Win + M to minimize all windows and show the Desktop and that's important to me).

Note that ksuperkey is quite flexible and the can map the release of any key to send any key combination, not just Alt+F1 (the default).

d) Added ksuperkey to Startup Applications


This will automatically update your package:

sudo aptitude update
sudo aptitude safe-upgrade
sudo aptitude full-upgrade


One way is to install LDAP and possibly Kerberos. Kerberos will let you control the shared NFS directories with better security. If you add Samba, you can use the roaming profiles on Windows machines too.

You can start looking at Ubuntu Server Help Center for LDAP/Kerberos authentication and for NFS4 with Kerberos. I have this working perfectly since 2007.

Another way is to use Samba4 but afaik it is still in RC release. I never used it but people seems to have it working already. Maybe it is worth to give it a look to see where they are as you are starting a new install.

UPDATE

In your comment you said you are using mysql to authenticate and you want to have roaming home directories so a possible way to do this is to export the home directories from a file server with NFS and mount them on each machine.

I think the way to change the place of the home directoriy (if needed so you can leave the local users on /home and the network users on /nethome for example) is to use a field in MySQL like (if you didn't change nss-mysql conf file):

homedir varchar(32) DEFAULT '/bin/sh' NOT NULL

I never did that with MySQL authentication but it should work like with LDAP.

When you do this, I think it is better to use NFS with Kerberos authentication for many reasons but mainly because with it you can avoid a local root to su to any network user and access the other user home directory.


Under Edit -> Profile preferences is where it should be.

Maybe you didn't notice the checkbox?

Untick the Use the system fixed width font and you can change the size:


systemd-sysv-generator: stat() failed on /etc/init.d/screen-cleanup, ignoring: No such file or directory

I faced the same issue, simply deleting the init file did the trick:

sudo rm /etc/init.d/screen-cleanup

Also see: https://unix.stackexchange.com/questions/429032/initctl-unable-to-connect-to-upstart


Are there any safer Dropbox alternatives?

You should be able to use Two-step verification instead - you then need your mobile phone or another device to sign into Dropbox:

Go to https://www.dropbox.com/account#security, and you can enable it. You can find out more on it here (note the 'advanced' section for Linux users - guess what I'll be trying later... :D ).

Also note that, the best thing would be to have a really secure passwords (you can generate some nice ones with cat /dev/urandom | tr -dc 'a-zA-Z0-9' | head -c 20), as well as using different passwords for different sites, especially with the same email.

And perhaps also check from where Dropbox has been/is being accessed under the the Dropbox Security tab:

You also may want to enable these Email Alert options under Dropbox's Profile Preferences:


Video quality goes bad when add video to kdenlive?

If you're talking about the "project monitor" in Kdenlive (which is the box to the top right in which you see your video), that's not the quality you get when you finally render (finish and export) your video. The preview looks bad but the output should be as fine as the recorded video.


Does installing things into /usr instead of /usr/local break things when upgrading to new version of Ubuntu?

Installing software from source and using /usr as prefix can break things, as you might overwrite libraries or binaries that are shipped with your distribution. These libraries and/or binaries often are dependencies for other programs and might prevent them from working correctly.


Add /opt/lampp/lampp start to /etc/rc.local, after the comments and but before the exit 0.


How to apply a command on all fields of one specific column?

With gawk (and likely with nawk - but not, as far as I can tell, with mawk) you should be able to do that using the "command" | getline variable form of getline.

For example, with the following script as a test cmd that takes a single string parameter and outputs its upper-case version

#!/bin/sh

printf '%s' "$1" | sed 's/.*/\U&/'

then with your sample input as file

$ gawk '{"./cmd "$3 | getline $3}1' file
string11 string12 STRING13 string14 string15 string16 string17
string21 string22 STRING23 string24 string25 string26 string27
string31 string32 STRING33 string34 string35 string36 string37
string41 string42 STRING43 string44 string45 string46 string47
string51 string52 STRING53 string54 string55 string56 string57


Change number of workspaces in ubuntu 12.04LTS to just one?

Unity2D

Open a terminal (Ctrl+Alt+t) and type the following command:

gconftool-2 -s -t integer /apps/metacity/general/num_workspaces 1

To restore the default 4 viewports:

gconftool-2 -s -t integer /apps/metacity/general/num_workspaces 4

Unity3D

Open a terminal (Ctrl+Alt+t) and type the following commands:

gconftool -t int -s /apps/compiz-1/general/screen0/options/hsize 1
gconftool -t int -s /apps/compiz-1/general/screen0/options/vsize 1

To restore the default 4 workspaces:

gconftool -t int -s /apps/compiz-1/general/screen0/options/hsize 2
gconftool -t int -s /apps/compiz-1/general/screen0/options/vsize 2


Setting up a dual-boot system from USB? (10.04.3 LTS)

Have you tried using the advanced partition editor option in the installer?


Edit your .desktop file with this :
Fix Exec and add Terminal values

[Desktop Entry]
Version=1.0
Name=Update
Comment=Update & Upgrade
Icon=/usr/share/icons/path/to/your/icon.svg
Exec='/home/user/MyScripts/HouseKeeping.sh'
Terminal=false
Type=Application

Make the .desktop file executable

chmod +x /path/to/file.desktop

Your script .sh should start with the shebang

#!/bin/bash
sudo apt update
# try adding : sudo apt-get -f install
sudo apt upgrade
# try with -y dist-upgrade
sudo apt auto remove
# try replacing it with : sudo apt-get -y autoremove
sudo apt clean


Sound muted when headphones are connected in hp dv4

I have the same issue (also on hp dv4 running 11.10, worked fine on 11.04). I just tried the following and it worked for me.

Go to 'sound settings' and click on 'output'. There you will see 'analog headphones' for the connector (at the bottom). Change that to 'analog speakers' and you will get sound on your headphones.

Strange, but it works.


Geeqie in full screen using external second display connected to laptop

solved, problem was in geeqie settings - all sorted now.

There is an option where you can choose the monitor of where program displays pictures fullscreen.


Looks like there's a space between the two "dots".
Try

cmake .. -DWITH_SERVER=1

within the build dir.


What Firewall, anti DDOS and anti Brute-Force managers exist in Ubuntu

In terms of firewall tools, there are several graphical front ends, depending on your needs.

gufw is a graphical front end for ufw.

And there is also firestarter, which is popular.

Automatic banning can be done with several tools, iptables, denyhosts, and fail2ban.

I suggest you look at fail2ban.

DDOS attacks can not be stopped, you can set some limits with ufw and iptables.

http://blog.bodhizazen.com/linux/prevent-dos-with-iptables/

Those tools should get you started in short order, let us know if you need additional information.


How change locale language setting to english in ubuntu 14.04

Go Language Support -> Regional Formats Tab and then select English(United States) from the drop down menu. Finally, click on Apply System Wide

After that you need to reboot your laptop and hopefully you will able to see as your expectation!


You are facing a "feature", referred to by Dell as "dynamic brightness adjustment". This is actually a power saving feature of Intel graphics chips, but is also marketed that it increases your photo viewing experience. For dark pictures, the backlight intensity will be reduced, and contrast increased so you see more of the detail. Bright pictures will appear very bright in contrast with the dark content.
The battery saving is that for LED screens, displaying dark colors actually costs more power than displaying bright colors. In LED screens, there is a backlight that is continuously on. Dark pixels are created by blocking the light. That is never perfect, so that is why blacks on LED screens are not perfect. Creating dark pixels costs extra power to shield the dark pixels. For dark content, power saving is achieved by decreasing the  backlight (reduces power) and at the same time, darken pixels less (reduces power).
Admittedly, most will find this a hateful feature for daily use. It is, for example, impossible to do photo editing in such conditions.
This is a feature of Intel Graphical chips. You are lucky that it only kicks into action when on battery. On other laptops, it is effective all the time. On some laptops, there is no way (and also for the manufacturer, no possibility) to disable it, on other laptops Windows drivers have become available to disable the feature.
You will have to find out what the possibilities are for your particular machine. It is unlikely you will be able to solve it from within linux. If you are lucky, you can disable it from within Windows after installing drivers from Dell. That will require you to (temporarily) install Windows again.


Why do I get Unity instead of Classic when using NX?

Example for nomachine's NXClient:

Under 'desktop'

select 'unix' in the first drop down menu.
select 'custom' in the second drop down menu
click 'settings' on the right of it.
choose 'Run the following command' and insert:

gnome-session --session=2d-gnome
-or-
gnome-session --session=classic-gnome

and choose the 'New virtual desktop' option.

By default your system should have these 'sessions'

ubuntu
ubuntu-2d
2d-gnome
gnome
classic-gnome

ie, you could use gnome-session --session=ubuntu-2d for a 2d Unity session (no effects)

Session files sit under

/usr/share/gnome-session/sessions/

/usr/share/gnome-session/sessions/2d-gnome.session
/usr/share/gnome-session/sessions/ubuntu-2d.session
/usr/share/gnome-session/sessions/classic-gnome.session
/usr/share/gnome-session/sessions/gnome.session
/usr/share/gnome-session/sessions/ubuntu.session

Note:
'2d-gnome' and 'classic-gnome' look the same, I don't know if they differ anywhere in partituclar.


This is an updated version of my previous answer which was related to Ubuntu 12.04. In 16.04 (Xenial) 3 steps are needed to set DPI correctly instead of 2.

I'll explain on the example of the system with Ubuntu 12.04 with Gnome Classic and a monitor with resolution 1680x1050. My starting settings: xdpyinfo | grep dots reported 96x96 dots , xrdb -query | grep dpi reported Xft.dpi: 96 , grep DPI /var/log/Xorg.0.log reported some weird settings NOUVEAU(0): DPI set to (90, 88).

In 16.04 the outputs of all these 3 commands were consistent and were equal to 96. Though such consensus is better than the disorder of 12.04, the reported value is hardcoded and far from the real DPI value.

Let's calculate optimal DPI for my monitor. Actual size of the screen can be found with the command xrandr | grep -w connected (convert output to centimetres) or with a long ruler by hand. In my case: X = 47.4cm ; Y = 29.6cm. Divide them by 2.54 to get the size in inches: X ~ 18.66in ; Y ~ 11.65in. Lastly divide the actual dots amount (based on your resolution) by the size in inches: X = 1680/18.66 ~ 90dpi ; Y = 1050/11.65 ~ 90dpi. So my real dpi is 90.

Be warned, the manual method of measuring may be more accurate, than the output of the command xrandr | grep -w connected because the newer versions of X server ignore the size reported by EDID and calculate the size using the screen resolution and a hardcoded value of DPI (more info here).
Another method how to find the size of the monitor is to read its EDID directly. Install read-edid package and run the command sudo get-edid | parse-edid | grep DisplaySize in the terminal. Its output will give you the actual size of your monitor in millimetres. If not - use the ruler.

Let's start fixing DPI:

1) In 12.04 run gksudo gedit, open /etc/lightdm/lightdm.conf and add a parameter under [SeatDefaults] section:

xserver-command=X -dpi 90

There's no such file in 16.04 by default, so you must create lightdm.conf manually and put it into /etc/lightdm/lightdm.conf.d/. The contents of this file are the same:

[SeatDefaults]
xserver-command=X -dpi 90

Restart your computer or restart X. Now grep DPI /var/log/Xorg.0.log will  show the desired setting.

2) In my former answer I proposed to create a file in /etc/X11/Xsession.d/ containing string xrandr --dpi 90. This worked in 12.04, but in 16.04 this setting isn't persistent. In newer systems we can add the desired value on session start. Run "Startup Applications", press "Add" button, name it "Fix DPI" and set the command xrandr --dpi 90 in the field. Save the changes and re-login. Now xdpyinfo | grep dots will report 90x90 dots.

If xdpyinfo still shows 96 then add a timeout before running xrandr. Edit the command in "Startup Applications" and change it to:

bash -c "sleep 15; xrandr --dpi 90"

Reference

Step 2 is optional for 12.04 because in older systems Step 1 fixes both Xorg.0.log and xdpyinfo values.

3) In GNOME3 DPI setting is hardcoded to 96 and cannot be changed directly, but the text can be scaled instead. Calculate the desired multiplier: desired_DPI / 96 (in my case 90/96 = 0.9375). Now run the command (or use dconf if you prefer):

gsettings set org.gnome.desktop.interface text-scaling-factor 0.9375

Changes will be applied at once. xrdb -query | grep dpi will report the desired Xft.dpi: 90.

P.S. There is another method to fix DPI setting which is much more difficult and it is described in this guide. I tried it also and the result was the same (at least in 12.04).

Afterword: Only Ubuntu developers can say for certain whether values modified by Steps 1 & 2 really matter in modern Ubuntu or they are silently ignored. Only Step 3 produces the changes which are instantly noticeable. Those users who consider that certain apps may still rely on X server settings are encouraged to perform all 3 steps described above. For the rest Step 3 is sufficient - that's the sole way of customization adopted in modern Ubuntu distros.


CCSM doesn't work when changing launcher visibility or number of workspaces

You are probably running unity 2d which is not powered by compiz (so ccsm settings wount affect your desktop session)

To see if you are running unity 2d check this question


To answer my own question, you need the Universe repository for vpnc:

sudo add-apt-repository universe

then:

sudo apt-get install vpnc


Upgrade from 16.04 LTS to 18.04 LTS is unstable with failures

I was unable to resolve this so I attempted a fresh install of 18.04. On multiple attempts it gave me a failure to install grub on /sda and I was never able to get the grub to install anywhere. So I reinstalled 16.04, updated at the terminal using
sudo update-manager -c

It updated to the latest kernel, restarted, and then I did it again to get the 18.04 upgrade.

This finished successfully. My Belkin wireless USB works. Now I will begin restoring my files and installing the LAMP server to get my site back on line. This has taken be all day and all evening of a Saturday. There's no excuse for this. If it is going to give me a host of failures at the end, why can't it check before it installs to prevent it from installing? Thanks for all who attempted to help.


how to restore default graphic driver configuration

Next time you boot into Ubuntu, switch to a new TTY using ctrl+alt+F2. Log in with your username and password, then attempt to start the X server.

$ sudo startx

If it doesn't work then run this and then reboot:

$ sudo cp /etc/X11/xorg.conf.orig /etc/X11/xorg.conf

If you get an error then run

$ sudo ls -l /etc/X11/xorg.*

and copy the old xorg config file as xorg.conf

If this doesn't fix it then reply with the output you receive to the commands above. And also to:

$ sudo dpkg --list 'linux-image*'

and:

$ glxinfo -i | grep render

If you don't have dedicated graphics then:

$ sudo apt-get install xserver-xorg-video-intel

Then enter

$ sudo vi /etc/X11/xorg.conf

This command will create the file and open it for you. Insert the text below exactly as it appears and click save.

Section "Device" Identifier "Card0" Driver "intel" Option "AccelMethod" "sna" EndSection

If you have AMD graphics then follow this tutorial:
http://wiki.cchtml.com/index.php/Ubuntu_Trusty_Installation_Guide#Removing_Catalyst.2Ffglrx

If you have nvidia then:
http://www.linux.com/community/blogs/133-general-linux/774158-install-uninstall-nvidia-driver-33179-on-ubuntu-linuxmint


Where can I put commands that I want to run for all interactive, non-login shells?

If you open your man bash, you can find somewhere at the line 150:

When an interactive shell that is not a login shell  is  started,  bash
reads  and  executes  commands  from /etc/bash.bashrc and ~/.bashrc, if
these files exist.  This may be inhibited by using the  --norc  option.
The  --rcfile  file option will force bash to read and execute commands
from file instead of /etc/bash.bashrc and ~/.bashrc.

So, you can use with confidence ~/.bashrc (or /etc/bash.bashrc, but I will not advice you to use this system wide file) for your purpose. And yes, in Ubuntu.


disk partition not mount if window 8 or higher install with ubuntu

This has to do with how Windows implements "Hybrid boot", in which it essentially saves all of the kernel memory onto the disk (sort of a half-hibernate...it saves the kernel space memory, but not the user space memory) when you press "Shut Down" through the start menu.

You need to boot back into Windows and shut it down "fully" by running the command 'shutdown /s /t 0', in an Administrator command prompt. That forces Windows to not write the kernel memory data to the disk (the "Windows cache" that Linux is referring to). Additionally, you can make a shortcut to this command on your desktop to make doing full shutdowns easier.

After shutting Windows down fully, boot back into Linux, and all should be well.

See this link for a more detailed explanation of all of this.


Missing Application Entry (Thunar) in Xubuntu-Desktop

The File Manager listing in the Appfinder menu is associated to the exo-preferred-applications settings so it opens whatever the default is set to.

Press Alt+F2 and in the run box type in exo-preferred-applications.

Then click on Launch.

Go to the Utilities Tab then in File Manager choose Thunar.  Then close the application.

Now, every time you open that File Manager it will launch Thunar.

Hope this helps!


Touchpad tapping intermittent on Macbook Air

First, make sure you got the mactel extras: https://launchpad.net/~mactel-support/+archive/ppa (Adding this PPA to your system)

After having those installed, type in the following commands in your terminal (ctrl-alt-t)

synclient FingerHigh=120
synclient FingerLow=45
synclient PalmDetect=1

This makes the touchpad work much better for me :)


Add this ppa to your repository:
    ppa:adilson/experimental

Details: Open a Terminal (Ctrl+Alt+T) and run

sudo add-apt-repository ppa:adilson/experimental

Next run a sudo apt-get update to refresh your list of repositories

Now install:

sudo apt-get install gyachi gyachi-plugins-extra

Enjoy, and thank Mr. Adilson dos Santos Dantas

From:
https://launchpad.net/~adilson/+archive/experimental


Can I manually adjust a particular window's transparency using Metacity composite mode?

I've found the answer, it is "transset" (sudo apt-get install transset, transset and click on the window to make transparent).


Do I need an Ubuntu certification to teach Ubuntu

Anyone can teach about Ubuntu and a certification is not required.

Manuals for 11.10 can be found here. Particularly the Ubuntu desktop help will be useful to you if you want to cover the desktop (the other 2 are about server and installing).


Try it for a week or two. It's different, but there are some real advantages:
1. Great if you have a widescreen laptop. The launcher on the side frees vertical space.
2. The top panel integration with apps is efficient and attractive.
3. I like that it has a unique interface, not so "Windows" in appearance.


How to get terminal to run 24bit true color in ubuntu 16.04?

GNOME Terminal supports true color in 16.04.

Source: https://gist.github.com/XVilka/8346728

Trying out the test code from that gist:


Error Booting Ubuntu / Windows 7 on Laptop

Did you install Ubuntu in UEFI MODE?

If you didnt install ubuntu in UEFI mode, it wont update grub and detect your Windows partition folder, since your ubuntu is in Legacy.

Try changing boot order through BIOS - > UEFI/Legacy and set windows to first
Try enable/disable secure boot


My grub is gone after update to ubuntu 13. I get a grub prompt on boot how do I get back?

I would say your best bet is to try Boot-Repair. It will reinstall Grub for you. From there you can continue to repair your system if the upgrade failed.


PostgreSQL 8.4 to 9 manual upgrade (11.04 to 11.10)

Start by making a backup of your database, worse case scenerio I would hope you could re-install 11.04 and restore postgresql from backup. You may need to re-install postgresql 8.4 first.

Stop postgresql and any services that use it (apache ?)

su - postgres
pg_dumpall >backup_db
exit

Save a copy of backup_db to 2 safe locations, /root and a flash drive.

Now purge 8.4 and install 9.0

apt-get purge postgresql-8.4
apt-get install postgresql-9.0

Now restore your data

su - postgres
psql <backup_db
exit

Restart postgresql and your other services, check your data.

Good luck =)


How do I fix a noisy input device (Internal Mic)? snd_hda_intel - debug included

Not a real answer, but some debug help. I would disable pulseaudio while testing (put autospawn to /etc/pulse/client.conf and pulseaudio -k). Then make test recording using

arecord -f dat -r 44100 -D hw:0,0 test.wav

Play back with aplay. Then play around with the sample rate (-r) and with module options in /etc/modprobe.d/alsa-base.conf (reload using sudo /sbin/alsa force-reload). The options are position_fix, model and enable_msi. I for example got lucky by setting the model to dell (which I don't think I got), position_fix to 2 and enable_msi to 1. No real science behind this.


wubi's error while installin ubuntu 12.10 on windows 7

it is possible md5hash issue, so just delete that file, clean up your windows (if i remember it was something like cleanup disk, or try any program that find i fix errors inside of windows, remove unused and not needed applications from windows, and completely prepare sistem for it) in fact you need to download new ubuntu iso image and look for md5hash to match. then just burn on cd. i beleive that can solve problem, but anyway you need new download.


Adminstrators access to home directories in Ubuntu

Yes, by default config every user can see every home. You can change this setting, if you want. See this guide on help.ubuntu.com

As Eliah Kagan noticed, administrators will still always be able to use their administrative powers to see into anything inside any user's home folder. If you want to avoid that, you have to encrypt your home.


You need to choose your printer from the 'Model' tab in the printer options (System settings/printers). Just click over whatever occupies the space to the right the word 'model', and click on 'select from database'. It'll be under Brother, prolly something like 'MFC-240clpr(cups)'.

By the way, don't worry about the .rpm file, it's usable only for Linux distros using RedHat. Just use both the LPR & cupswrapper .deb's version from here...

http://welcome.solutions.brother.com/bsc/public_s/id/linux/en/download_prn.html#MFC-240C


SCP files from machineB to machineA by logging into machineA

Problem with the ~/.ssh/known_hosts can cause this. You can either remove the file

rm -i ~/.ssh/known_hosts

or you could edit the file and remove the line containing machine B.


The standard location for a script that must run at login is /etc/profile. It will then run for every user (once) when they log in. The user never gets to see the output of the script, it is logged

If it is only for a specific user, it should be added to .profile in their home directory.

With login I mean when you enter your username and password.

Any errors normally show up in ~/.xsession-errors

If it has to run every time you open a terminal window, it should be added to /etc/bash.bashrc or to .bashrc in the user's home directory.

At work, I mount a number of network shares when I log in. This is done in .profile in my home directory (it needs only to be done once).

Every time I open a terminal window I get a fortune cookie. This happens because the last line in .bashrc in my home directory contains fortune.


Lenovo Y50-70 integrated camera not detected (Realtek Semiconductor Co., Ltd. Device 5249)

Finally I found a solution that worked for me. It was a permission problem. I did what "papibe" proposed in post #10 here:

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

  by papibe , November 26th, 2013

  It may be a permissions problem: Code:

ls -l /dev/video0
crw-rw----+ 1 root video 81, 0 Nov 25 19:23 /dev/video0

  Add yourself to the video group: Code:

sudo usermod -a -G video youruser

  replace 'youruser' for your actual username.


UEFI questions after moving to Ubuntu 14.10 finally

You shouldn't have any problems. GRUB has an EFI version, and should set itself as default during the install. What you need to do, however, is boot the installation in EFI mode and not just selecting it in the boot menu. If your BIOS can select to boot from an EFI file, you need to go into the drive and select the grubx64.efi file somewhere under EFI.


How do I write a Bash script for this scenario?

In python

In a one- (long-) liner:

python3 -c 'data = [l.split("_") for l in open("f").read().splitlines()]; [print("service_id: "+d[0]+",", "mac_address: "+d[1]) for d in data]'

where 'f' is the sourcefile, between (double) quotes.

Output:

service_id: TBBN027162G mac_adrres: 38d8-2f08-0c40
service_id: TBBN027605G mac_adrres: 38d8-2f08-1518
service_id: TBBN027941G mac_adrres: 38d8-2f08-0d1c
service_id: TBBN027923G mac_adrres: 38d8-2f08-35e4

Written out in a scriptfile:

#!/usr/bin/env python3
import sys

f = sys.argv[1]

data = [l.split("_") for l in open(f).read().splitlines()]
for d in data:
    print("service_id: "+d[0]+",", "mac_address: "+d[1])

If you prefer the script version, Copy it into an empty file, save it as extract_data.py, run it with the file as an argument:

    python3 /path/to/extract_data.py /path/to/sourcefile

In detail, "zooming out":

open(f).read().splitlines()

reads the file, splits it into lines

[l.split("_") for l in open(f).read().splitlines()]

creates a list of those lines, split in two sections by the delimiter _

for d in data:
    print("service_id: "+d[0]+",", "mac_address: "+d[1])

finally combines the two sections per line with the strings:

service_id:

and

mac_address:

EDIT

Reading multiple (all) files in a directory at once, we need two more lines in the script:

#!/usr/bin/env python3
import sys
import os

dr = sys.argv[1]
# list the directory's files, exclude hidden and backup files:
flist = [dr+"/"+f for f in os.listdir(dr) if not any([f.startswith("."), f.endswith("~")])]
# split the lines into sections:
data = sum([[l.split("_") for l in open(f).read().splitlines()] for f in flist], [])
# generate the print command per (split) line, combine it with the naming strings:
[print("service_id: "+d[0]+",", "mac_adrres: "+d[1]) for d in data]

Although the script skips hidden files and files, ending with ~, it assumes the directory only contains readable and valid files.

Use it exactly as the first script, but now only with the directory as an argument:

python3 /path/to/extract_data.py /path/to/source_directory

Example output:

service_id: TBBN027162A, mac_adrres: 38d8-2f08-0c21
service_id: TBBN027605A, mac_adrres: 38d8-2f08-1534
service_id: TBBN027941A, mac_adrres: 38d8-2f08-0d8v
service_id: TBBN027923A, mac_adrres: 38d8-2f08-35e4
service_id: TBBN027162G, mac_adrres: 38d8-2f08-0c40
service_id: TBBN027605G, mac_adrres: 38d8-2f08-1518
service_id: TBBN027941G, mac_adrres: 38d8-2f08-0d1c
service_id: TBBN027923G, mac_adrres: 38d8-2f08-35e4


Is there a way to encrypt my files without full disk encryption

This site should give you all the information you need. The link was found at upubuntu.com. Here is a direct quote from the site:

  "encrypt or decrypt your files using the Nautilus context menu
  (right-click menu) under Ubuntu"

Add a PGP key so that you can encrypt your files with it, by opening
"Passwords and Keys", click the add button, select "PGP Key", then
click Continue.
Add the seahorse-nautilus plugin with

  sudo apt-get install
      seahorse-nautilus && nautilus -q && nautilus
  Right click to pick any file and then select Encrypt  In a pop-up,
  pick your key, set "Sign message as: Your key" and click OK. Another
  pop-up asks for the passphrase which matches up w/ the PGP key.


via: http://www.psychocats.net/ubuntu/puregnome

sudo apt-get remove akonadi-server akregator amarok amarok-common amarok-utils apport-kde apturl-kde ark bluedevil cdparanoia cdrdao docbook-xsl docbook-xsl-doc-html dolphin dragonplayer gdebi-core gdebi-kde gnupg-agent gnupg2 gtk2-engines-qtcurve gwenview hal hal-info ibus-qt4 icoutils jockey-kde k3b k3b-data kaddressbook kamera kate kcalc kde-config-gtk kde-config-touchpad kde-window-manager kde-zeroconf kdebase-bin kdebase-data kdebase-runtime kdebase-runtime-data kdebase-workspace kdebase-workspace-bin kdebase-workspace-data kdebase-workspace-kgreet-plugins kdegraphics-libs-data kdegraphics-strigi-plugins kdelibs-bin kdelibs5 kdelibs5-data kdelibs5-plugins kdemultimedia-kio-plugins kdepasswd kdepim-groupware kdepim-kresources kdepim-runtime kdepim-strigi-plugins kdepim-wizards kdepimlibs-kio-plugins kdesudo kdm kdoctools kfind khelpcenter4 kinfocenter klipper kmag kmail kmix kmousetool knm-runtime knotes konsole kontact kopete kopete-message-indicator korganizer kpackagekit kppp krdc krfb krosspython ksnapshot ksysguard ksysguardd ksystemlog ktimetracker ktorrent ktorrent-data kubuntu-debug-installer kubuntu-default-settings kubuntu-desktop kubuntu-docs kubuntu-firefox-installer kubuntu-konqueror-shortcuts kubuntu-netbook-default-settings kubuntu-notification-helper kvkbd kwalletmanager language-selector-qt libakonadi-contact4 libakonadi-kabc4 libakonadi-kcal4 libakonadi-kde4 libakonadi-kmime4 libakonadiprivate1 libao-common libao4 libattica0 libaudio2 libbluedevil1 libboost-program-options1.42.0 libcln6 libclucene0ldbl libdbusmenu-qt2 libdebconf-kde0 libdirectfb-1.2-9 libepub0 libflac++6 libgif4 libgpgme++2 libgps19 libhal-storage1 libhal1 libibus-qt1 libilmbase6 libindicate-qt0 libiodbc2 libk3b6 libkabc4 libkatepartinterfaces4 libkblog4 libkcal4 libkcddb4 libkdcraw8 libkde3support4 libkdecorations4 libkdecore5 libkdepim4 libkdesu5 libkdeui5 libkdewebkit5 libkdnssd4 libkephal4 libkexiv2-8 libkfile4 libkholidays4 libkhtml5 libkimap4 libkimproxy4 libkio5 libkipi7 libkjsapi4 libkjsembed4 libkldap4 libkleo4 libkmediaplayer4 libkmime4 libknewstuff2-4 libknewstuff3-4 libknotifyconfig4 libkntlm4 libkonq5 libkonq5-templates libkontactinterface4 libkopete4 libkparts4 libkpgp4 libkpimidentities4 libkpimtextedit4 libkpimutils4 libkpty4 libkresources4 libkrosscore4 libkrossui4 libksba8 libkscreensaver5 libksgrd4 libksieve4 libksignalplotter4 libktexteditor4 libktnef4 libktorrent-l10n libktorrent2 libkunitconversion4 libkutils4 libkwineffects1a libkworkspace4 libkxmlrpcclient4 liblastfm0 libloudmouth1-0 libmailtransport4 libmessagecore4 libmessagelist4 libmicroblog4 libmimelib4 libmng1 libmodplug1 libmpcdec6 libmsn0.3 libmysqlclient16 libnepomuk4 libnepomukquery4a libokularcore1 libopenexr6 libotr2 libpackagekit-glib2-14 libpackagekit-qt-14 libphonon4 libplasma-geolocation-interface4 libplasma3 libplasmaclock4b libplasmagenericshell4 libpolkit-qt-1-0 libpoppler-qt4-3 libprocesscore4a libprocessui4a libqalculate5 libqapt-runtime libqapt1 libqca2 libqca2-plugin-ossl libqgpgme1 libqimageblitz4 libqjson0 libqt4-dbus libqt4-designer libqt4-help libqt4-network libqt4-opengl libqt4-qt3support libqt4-script libqt4-scripttools libqt4-sql libqt4-sql-mysql libqt4-sql-sqlite libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns libqtcore4 libqtgui4 libqtscript4-core libqtscript4-gui libqtscript4-network libqtscript4-sql libqtscript4-uitools libqtscript4-xml libqtwebkit4 libreadline5 libsolid4 libsolidcontrol4a libsolidcontrolifaces4 libsoprano4 libssh-4 libstreamanalyzer0 libstreams0 libsyndication4 libtag-extras1 libtaskmanager4a libtelepathy-qt4-0 libthreadweaver4 libts-0.0-0 libvirtodbc0 libvncserver0 libweather-ion4a libxcb-shape0 libxcb-xv0 libxine1 libxine1-bin libxine1-console libxine1-misc-plugins libxine1-x libzip1 mysql-client-core-5.1 mysql-common mysql-server-core-5.1 network-manager-pptp-kde odbcinst odbcinst1debian2 okular okular-extra-backends openoffice.org-kde openoffice.org-style-oxygen oxygen-cursor-theme oxygen-icon-theme oxygen-icon-theme-complete packagekit packagekit-backend-aptcc phonon phonon-backend-xine pinentry-gtk2 pinentry-qt4 plasma-dataengines-addons plasma-dataengines-workspace plasma-desktop plasma-netbook plasma-scriptengine-javascript plasma-scriptengine-python plasma-widget-facebook plasma-widget-folderview plasma-widget-kimpanel plasma-widget-kimpanel-backend-ibus plasma-widget-kubuntu-feedback plasma-widget-menubar plasma-widget-message-indicator plasma-widget-networkmanagement plasma-widget-quickaccess plasma-widgets-addons plasma-widgets-workspace plymouth-theme-kubuntu-logo plymouth-theme-kubuntu-text polkit-kde-1 printer-applet python-kde4 python-packagekit python-qt4 python-qt4-dbus python-sip qapt-batch quassel quassel-data rekonq shared-desktop-ontologies smartdimmer software-properties-kde soprano-daemon system-config-printer-kde systemsettings tsconf ttf-dejavu ttf-dejavu-extra update-manager-kde usb-creator-kde userconfig virtuoso-minimal virtuoso-opensource-6.1-bin virtuoso-opensource-6.1-common && sudo apt-get install ubuntu-desktop


Wine 1.7.38 doesn't update to latest beta

The Wine packages in the ppa they list only goes to 1.7.38. I am running 1.7.44, which is the latest by using the Wine Staging stuff.

http://www.wine-staging.com/

I followed the instructions from the following link & am running 1.7.44 on 15.04, but I was running it on 14.10 earlier today until my hard drive decided to die :)

https://github.com/wine-compholio/wine-staging/wiki/Installation#-ubuntulinux-mint

$ sudo add-apt-repository ppa:pipelight/stable
$ sudo apt-get update
$ sudo apt-get install --install-recommends wine-staging wine-staging-compat


My Ubuntu Server uses the monitor only for error messages

This may happen if the currently open virtual terminal is not configured well. Check if there is another terminal that is working:

Press CtrlAltF2 or similar combination to switch the terminal. Valid terminals should be numbers 1 to 6 by default, so use keys F1 to F6.


Why does the BADSIG/"Untrusted sources" error recur forever?

I do not regard this problem as solved, and I don't understand why Ubuntu works so well on my machine at home, and so consistently poorly (in this particular respect only) on my machine at my office. However, Y PPA has made it easy to live with the problem, as it will fix the BADSIG issue automatically, in just a few seconds:

http://www.webupd8.org/2012/10/y-ppa-manager-0092-released-with-new.html


Ubuntu 20.04 completely free freeze/hanges minutes after login

i was able to solve this problem by editing with sudo privilege /etc/default/grub
sudo gedit /etc/default/grub

and i change the line
GRUB_CMDLINE_LINUX_DEFAULT

from:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_idle.max_cstate=1"

adding two additional parameters "intel_idle.max_cstate=1"
and like that the freeze problem is solved, i hope this answer help someone.
Thanks for all the suggestions!


gfortran 7.4 upgradation in Ubuntu 18.04

Gfortran-8 for 18.04 is in the repositories. Just install it - sudo apt install gfortran-8.


Yes, Ubuntu supports USB 3.0.

Linux started supporting USB 3.0 in the September 2009 release of the 2.6.31 kernel, and Ubuntu 9.10 Karmic Koala was the first version of Ubuntu to support USB 3.0.

In Ubuntu releases older than Ubuntu 11.04 Natty Narwhal, there is a bug in the XHCI (USB 3.0) kernel module that prevents suspend: Bug #522998.


Can't print in grey scale or fast normal - brother dcp 135-C

from this recent thread https://ubuntuforums.org/showthread.php?t=2354789&highlight=grayscale you need to edit the ppd file that the printer uses; the suggestion is to either have standard or grayscale; or just grayscale setups; the ppd file is usually in usr/share/cups/model and open with gedit or whatever text editor you have installed; if one "changes" the Make & Model settings in the Printer Properties; one can point the CHANGE button to a particular ppd; please post back for more instructions if needed


"Unable to connect to Upstart" error when installing git-all

It's happening because of this bug https://bugs.launchpad.net/ubuntu/+source/runit/+bug/1448164

You need to remove runit and git-daemon-run. That should fix the problem.

sudo apt-get purge runit git-daemon-run

Don't forget to visit the bug report and clicking Yes, this bug affects me.

git-all without error

It seems you can have git-all with daemon support without failing on this error. git-all recommends either git-daemon-run or git-daemon-sysvinit package. apt was choosing git-daemon-run as first choice. But If you explicitly mention the package you want (i.e git-daemon-sysvinit), apt won't try to install git-daemon-run.

All you need to do is

sudo apt-get install git-all git-daemon-sysvinit

Hope that helps.


The most likely cause of this is error is the root SSL certificate for valicert.com is not completely installed on your computer.

Please open the terminal (Ctrl+Alt+T);

sudo apt-get install --reinstall ca-certificates

Logout and login (Restart preferred) and Try UbuntuOne account once more.

You may read this page Why am I getting an "authentication failed" error?


use android tablet as ONLY display on otherwise headless server

I access my headless box over ssh; usually from a laptop, but sometimes from my tablet using ConnectBot.

xrdp or VNC is also an option, but I found little need for it, personally.

fwiw, there are good transmission-remote clients for android, if you're into that.


The only way that I've found to have the changes be persistent across all networks and interfaces (that are using dhcp that is) is to add the following line to /etc/dhcp/dhclient.conf:

supersede domain-name-servers 8.8.8.8,8.8.4.4 # replace with wanted DNS server


I cant install any software, keeps throwing error

We don't know what those error refer to, unless you paste the code to here. Please do that..

However, you mention the error has to do with dependencies, in that case try running apt-get -f install.

  sudo apt-get -f install: The -f option stand for --fix-broken, means apt will attempt to --fixing unmet
  dependencies by satisfy them.

Source

If you prefer GUI, there's also gdebi which install .deb file (and the required dependencies), I've been using this tools for year and never failed me.

sudo apt-get install gdebi


Failed to initialize Pyglet window with an OpenGL >= 3+ context

Found a solution at
https://github.com/nkolot/SPIN/issues/41
Add this line
os.environ['PYOPENGL_PLATFORM'] = 'egl'


History command showing the directory and the date

You CAN write the current working directory in a history file as well, but you have to make an own history file:

Write your .bashrc as follows:

export CUSTOM_HISTFILE="/tmp/bash_history" #path of the new history file
export PROMPT_COMMAND="history -a; history -c; history -r; date | xargs echo -n >>$CUSTOM_HISTFILE; echo -n ' - ' >>$CUSTOM_HISTFILE; pwd | xargs echo -n >>$CUSTOM_HISTFILE; echo -n ' - ' >>$CUSTOM_HISTFILE; tail -n 1 $HISTFILE >>$CUSTOM_HISTFILE; $PROMPT_COMMAND"

It's a bit circumstantial, but it works. An entry could look like this:

Mit Nov 13 13:44:39 CET 2013 - /home/test - ls -la


Can't boot after upgrading from 16.04 to 18.04

Ubuntu 18.04 was not booting to the desktop environment because there was a problem with the Nvidia graphics driver. The computer has two GPUs, an integrated Intel GPU and a discrete Nvidia GTX 1050 graphics card. After changing the custom GPU to Intel in the BIOS/UEFI setup utility, it just worked.

Install proprietary Nvidia GTX 1050 graphics driver
Uninstall the existing proprietary Nvidia graphics driver and reboot before trying to automatically install the proprietary Nvidia graphics driver in Ubuntu 18.04. Don't uninstall the open source Nouveau graphics driver. The proprietary Nvidia graphics driver for the Nvidia GTX 1050 GPU can be installed in Ubuntu 18.04 from the terminal or console with the following commands:
sudo ubuntu-drivers autoinstall
sudo reboot

When installing a proprietary graphics driver, it is not necessary to uninstall the built-in Nouveau open source graphics driver. The two graphics drivers can be installed alongside each other allowing the  open source graphics driver to be used as a fallback alternative in case there is a problem using the proprietary graphics driver.
The ubuntu-drivers autoinstall command installs drivers that are appropriate for automatic installation including their dependencies, and the Nvidia driver will also be updated automatically when an update is available.


Would I get Swap Files if I upgrade from 16.10?

During an upgrade, the system won't change how you currently handle virtual memory. No swapfile will be set up. No swap partition will be created.

If you want to add swap, it's not difficult. Either gparted to make a new partition (you can have as many partitions as you want if you use logical partitions) or follow any of the tutorials on adding swapfiles that are available.


How to create a "shutdown user" or "shutdown account"

A simple way would be to just create a user named shutdown and have a login script for them just be the shutdown command.

On a side note, what would be the use case for this?


Using a bridge br0 while using eth0 and eth0:1

Set the ethX device for your bridge to manual in the /etc/network/interfaces and assgine the bridge port the the ethX device. e.g.:

auto eth0
iface eth0 inet manual

auto br0
iface br0 inet dhcp
    bridge_ports eth0
    bridge_stp off
    bridge_fd 0
    bridge_maxwait 5

Now you can use the br0 device in KVM or virsh.

sudo brctl show
bridge name     bridge id               STP enabled     interfaces
br0             8000.5254003fa659       no              eth0

See https://wiki.debian.org/BridgeNetworkConnections for more details on bridge devices.

As always, you can add multible IP addresses to any device e.g.:

auto br0:1
iface br0:1 inet static
    address 192.168.1.2


How to watch transcoded video from transcode?

.TRF is a file extension used for multiple different purposes. In this case, it's a temporary file generated by Transcode, along with other temporary files .PID, .MLT, and .LOG. http://www.bernaerts-nicolas.fr/linux/74-ubuntu/350-ubuntu-xenial-rotate-stabilize-video-melt-vidstab shows it should have been deleted in the cleanup of those temporary files.


UBUNTU problem with 'Search your computer and online sources' icon

Install Unity Tweak Tool
Start Unity Tweak Tool
Go to 'Unity' -> 'Search'

Background blur: "Off"
Check Only 'Show "Recently Used" applications'

Close Unity Tweak Tool

It solves the problem a little ...


Thinkpad t440p wireless network controller

There is currently no device driver in Linux for this device. Please see here: http://wikidevi.com/wiki/Realtek_RTL8192EE_Reference_Design

  Linux driver probably not, at least, not yet

And the bug report here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1239578
I suggest you register and add to the bug report.

If you have or can find a Windows XP driver, you may be able to get it going with ndiswrapper. ndiswrapper requires XP and will not work with Windows Vista, 7 or 8 driver files.


How Sudhosh User can login staging server without sudosh command?

sudosh · Github provides detailed instructions on how to set up sudosh as a user's default shell:

  Enable sudo logging. Edit /etc/sudoers.d/sudosh:

Defaults log_output
Defaults!/usr/bin/sudoreplay !log_output
Defaults!/sbin/reboot !log_output

  Add this command to /etc/shells:

/usr/bin/sudosh

  Tip: to prevent users from using other shells to
  login, remove those shells from /etc/shells.
  Update the user foobar to use the sudosh shell.

chsh -s /usr/bin/sudosh foobar
echo 'foobar ALL=(foobar) ALL' > /etc/sudoers.d/sudosh-foobar

  NOTE: filenames in sudoers.d cannot contain the . character

An alternative (though much easier to bypass!) is alias, e.g.:

alias raja='sudo -u raja sudosh'
alias ssh_login='sudo ssh xyz@server-ip-address sudosh'


maybe this page is worth a look: https://wiki.ubuntu.com/UbuntuOne/Status#Files
today i had the same problem and there was the explanation: "2011-10-28 Windows and Ubuntu 11.10 users may experience issues with not all files syncing due to a bug we're currently working on fixing."

greetings


Meaning of the free space indication in Deluge

The Free Space statusbar values are calculated from the partition containing the Download to directory, specified in Preferences.


I found a few sites:

http://xfce-look.org/content/show.php/Mac+Os++Style+for+XFCE+%2B+Slingshot+Menu?content=160569&PHPSESSID=39c2054eecf931e3e0fe922e87b4f318

http://xubuntublog.wordpress.com/2008/02/15/design-your-own-desktop-with-xfce-44-part-2/

(For ubuntu):http://langit.wordpress.com/2011/06/04/install-macbuntu-in-ubuntu-11-04/


Argument "perl_version" isn't numeric in numeric ge (>=) at (eval 534) line 1

In comments on @cgross answer it looks like I'm not the only one, whom didn't help upgrading SpamAssassin to 3.4.0

So I'll create my own answer from what I've done.

Download the patches with

wget "http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Conf/Parser.pm?r1=1642207&r2=1642206&pathrev=1642207&view=patch" -O parser.pm.patch
wget "http://svn.apache.org/viewvc/spamassassin/trunk/lib/Mail/SpamAssassin/Conf.pm?r1=1642207&r2=1642206&pathrev=1642207&view=patch" -O conf.pm.patch

Switch to root and patch the files

su
patch /usr/share/perl5/Mail/SpamAssassin/Conf/Parser.pm < parser.pm.patch
patch /usr/share/perl5/Mail/SpamAssassin/Conf.pm < conf.pm.patch


Can i remove Unity and Ubuntu-Desktop and still get release updates/upgrades?

Installing Gnome 3 in Ubuntu 15.10

Video Instruction HERE

Replacing Unity with Gnome 3 Instruction HERE

sudo add-apt-repository ppa:gnome3-team/gnome3

sudo apt-get update

sudo apt-get install ubuntu-gnome-desktop ubuntu-gnome-default-settings

sudo apt-get install gnome-documents gnome-boxes

(When prompted, select GDM as the default display manager.)

sudo apt-get remove ubuntu-settings

sudo apt-get remove unity

sudo apt-get remove overlay-scrollbar*

(Reboot, when logging in check Gnome desktop environment has been selected in the login screen.)

  When removing Unity, 6,5 MB of packages were removed, as expected ubuntu-desktop got removed. Network Manager still there, which is good - serg

  ubuntu-desktop is a meta package, the system will be fine without it -
  uninstalling it simply uninstalls that meta package -Mateo

  So ubuntu-gnome-desktop installed and unity and ubuntu-desktop are out, everything works fine. I suppose the answer is "it's pretty much safe" -Serg

  Thanks to serg
  Thanks to Mateo


Elementary theme missing arrow in Nautilus

Open Nautilus, then go to Edit -> Preferences, choose Tweakstab and check Show like breadcrumbs. Now restart Nautilus (in the Terminal write nautilus -q), next time you open Nautilus everything will be fine.


Ubuntu 14.04 LTS cant recognize ntfs partition

I have got a suggestion but I don't know if it will solve the problem or not.
Try booting into Ubuntu again and see if the disks are showing up. If not, try to see if they are at least visible in the Disk Utility or GParted. If they are, then in the Disk Utility, just click on the SMART data and then Run Self-test. If any errors are reported, they may be preventing the disk from being mounted.
After that, try booting into Windows and just checking the NTFS disks (Right click-> properties-> tools-> check). You may wish to start off with the most vigorous check. Then I suggest you do this:
right click on start (or press win + X)-> Choose Command Prompt (Admin)-> Enter the following:

chkdsk /B D:\

Replace D:\ with the drive letters of the drives. You may have to agree to scan on next restart for some drives.
Some errors in the disk are the most probable cause.


Are hard links equivalent to Windows shortcuts?

No, a hard link is completely different. A soft link is closer to a Windows shortcut (though there are important differences, symbolic links are more similar to windows shortcuts than hard links are). A hard link is a different thing and one you will almost never need.

Briefly, a soft link is created with this command:

ln -s foo bar

If you then run ls -l, you will see:

lrwxrwxrwx 1 terdon terdon 3 Mar 10 15:58 bar -> foo
-rw-r--r-- 2 terdon terdon 0 Mar 10 15:58 foo

The -> means that bar is a link to foo. So, opening bar, with a text editor for example, will actually open the separate file foo. However, deleting bar will just delete the shortcut, it will not affect the file foo.

Hard links, on the other hand, are created with this command:

ln foo bar

If you now run ls -l, there is no indication of any relationship between the files:

-rw-r--r-- 2 terdon terdon 0 Mar 10 15:58 bar
-rw-r--r-- 2 terdon terdon 0 Mar 10 15:58 foo

But—and this is very important—those are actually the same file. Files on Unix file systems are stored using inodes; an inode is basically the way the filesystem maps a file name to a particular location on the physical hard drive. So, hard links are files that point to the same inode as their target. Another way of putting this is that all files are actually hard links pointing to their inodes. Making a hard link to a file just creates a new pointer (file) on the file system that points to the same inode. Each inode can have multiple files pointing to it or one,  or none.

To understand this more clearly, use ls -i which shows the inode associated with a file. Let's create a soft link and a hard link and see what happens:

ln -s foo SoftLinkToFoo
ln foo HardLinkToFoo

Now, check their inodes:

As you can see above, both foo and HardLinkToFoo have the same inode (16648029) while SoftLinkToFoo has a different one (16648036).

What happens if we rename foo with mv foo bar?

The red color indicates a broken soft link, one whose target can no longer be found. This is because soft links point to a file's name, not its inode. Note that despite changing the name, the inode remains the same so the hardlink is fine, it still works.

In summary, hard links are actually two manifestations of the same file; they are pointers to the same section of the disk. Soft links are just shortcuts. To take a real world analogy, hardlinks are like two different phone numbers for the same phone line and soft links are like having two different phone lines in the same house.


With the Kernel 4.13 this issue is fixed for me.

Downloading and Installing for  X64

wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13/linux-headers-4.13.0-041300_4.13.0-041300.201709031731_all.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13/linux-headers-4.13.0-041300-generic_4.13.0-041300.201709031731_amd64.deb
wget http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.13/linux-image-4.13.0-041300-generic_4.13.0-041300.201709031731_amd64.deb

Installing the packages

sudo dpkg -i *.deb

Now just reboot and enjoy using your USB-C to HDMI adapter.

Reference : https://en.cristiantala.cl/fixing-ubuntu-usb-c-to-hdmi-dell-da200/


Adobe Flash Plugin is vulnerable/outdated in 14.04 but there is no update in Firefox

I've done some research at mozilla and adobe and tests with both recent LTS-versions (14.04 and 12.04) and I'm pretty sure it is just a numbering problem of the flash-plugin!

To make a long story short:
If you open in firefox "tools" - "add-ons" - "plugins" respectively look at the mozilla check and you've got version 11,2,202,425 (notice the commas!), you will get this error message.
and if your version is 11.2.202.425 (same version, just with dots at the numbering) everything is fine.

So don't panic, your system is safe! ;-)

But I can understand that this message is annoying and so this would be the easiest way to get rid of it:
open a terminal and insert sudo apt-get update && sudo apt-get install -y flashplugin-installer, type your root-password (no characters will be displayed) and just wait till executed!

I would recommend this solution just in the case you have already installed the latest version but still get the error message because of the differences between the flash-packages!


How does one remove the Grub Star Labs Theme in Ubuntu 18.04

You should first completely remove StarLabs packages using

sudo apt autoremove starlabs


Why no PGAdmin in launcher for standard user?

I was able to open dash and type pgadmin and run the program.

The path to PGAdmin was found like this:

which pgadmin3

And this pointed to the /usr/bin directory.


How can I batch decrypt a series of PDF files?

Nautilus script

Automating this task can be easily achieved through a script:

#!/bin/bash

# AUTHOR:       (c) Glutanimate 2012 (http://askubuntu.com/users/81372/)
# NAME:         PDFdecrypt 0.3
# DESCRIPTION:  A script to batch decrypt PDF files.
# DEPENDENCIES: qpdf zenity libnotify-bin
#               (install via sudo apt-get install qpdf zenity libnotify-bin)
# LICENSE:      GNU GPL v3 (http://www.gnu.org/licenses/gpl.html)
# CHANGELOG:    0.3 - added notifications and basic error checking
#               0.2 - replaced obsolete gdialog with zenity

password=$(zenity --password --title "PDF Password required")

RET=$?

if [[ $RET = 0 ]]; then

  while [ $# -gt 0 ]; do
      ENCRYP=$1
      DECRYP=$(echo "$ENCRYP" | sed 's/\.\w*$/_decrypted.pdf/')
      qpdf --password=$password --decrypt "$ENCRYP" "$DECRYP"
      RET=$?
      if [[ $RET != 0 ]]; then
        ERR=1
      fi
      shift
  done

  if [[ $ERR = 1 ]]
    then
        notify-send -i application-pdf "PDFdecrypt" "All documents processed.There were some errors"
    else
        notify-send -i application-pdf "PDFdecrypt" "All documents decrypted."
  fi

else
  exit
fi

Note: This script depends on qpdf, zenity and libnotify-bin. Install them with the command provided in the script.

Usage

Copy and paste the contents of the text box above into a new empty document (right click in file manager: Create new document --> Empty document) and save it as Decrypt PDFs.

Make it executable by marking it as such (right click on file --> Properties --> Permissions  --> check Allow executing file as program).

If you are running Ubuntu you can easily install this script to the context menu of your file manager by copying it to ~/.gnome2/nautilus-scripts. You will now be able to decrypt PDFs by selecting them, right clicking and heading to Scripts --> Decrypt PDFs. Enjoy!


How to check if all traces of Ubuntu are gone from computer?

Once you check disk management in windows and you do not see any strange non-windows system partitions on your drive then you are good.

And you already said that you did bootrec.exe /fixmbr so then the mbr of your drive no longer contains grub.


Can I use ISO image to install Win 7 in VirtualBox running on Ubuntu 12.04?

You can of course use Windows 7 iso image to install it in the Virtual Box, regardless of using Ubuntu or any other operating system. Ubuntu doesn't impose any restriction to that, as you may have assumed.

Check the iso images first whether they are bootable or even valid. Also make sure you configured the VirtualBox to use the iso file.


Will my motherboard support Ubuntu 14.04?

Latest Ubuntu 14.04 (14.04.4) uses kernel 4.2 which will probably run with skylake processors (intel 6th gen) but maybe need some configuration (probably nomodeset boot option and upgrade to newer kernel as discussed here No version of Ubuntu can be installed with any Skylake 6th generation Intel processor). The best way to be sure is to write an ubuntu usb live image and choose test ubuntu instead of install. So, I recommend that you try a clean ubuntu 16.04 install which has kernel 4.4 (you can also upgrade to kernel 4.5 or 4.6 series as they supposed to have more skylake fixes and improvements, but they may cause instability to your system).

Keep in mind that if you use intel graphics there are not any proprietary skylake drivers for linux yet and opensource drivers are at an early stage yet (maybe when 16.04.1 is released there will be better support). Some benchmarks for ubuntu 15.10 (ubuntu 16.04 may be a bit better) are here: http://www.phoronix.com/scan.php?page=article&item=intel-skylake-windows&num=2. So, you should probably consider installing newest kernel (4.6 series) and adding this ppa https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers?field.series_filter=xenial (there's a risk to make your system unstable).


Run script after switching user account "to the same account"

I don't know how this would behave, but you can try putting the script under ~/.bashrc, which is local to every user.


Is there a way to install Visual Studio Community 2019 in Ubuntu 19.10?

I don't think that it is possible to install Visual studio Community on Ubuntu. But you can try and find alternative on Alternative for Visual Studio
maybe it will help. It would be better next time if you would say which programming language you will use and for what.


How do I get the "right" LibreOffice Calc icon into the launcher?

Default directories for  launchers

The two default directories for .desktop files (launchers) are:

/usr/share/applications

for gloablly installed applications, and

~/.local/share/applications

for locally installed applications (~ stands for your home directory, /home/yourname) , or local versions of the launchers.

About LibreOffice

LibreOffice however is a bit of a stranger in our midst, if it comes to .desktop files.

While the default (Ubuntu) version of LibreOffice stores its .desktop files, as usual, in

/usr/share/applications

the downloaded version stores them in

/usr/local/share/applications

That is, links to the launchers. The real launchers are in

/opt/libreoffice5.0/share/xdg/

What happened

There are two options:

Somehow, you have a local copy of the Libreoffice launcher in ~/.local/share/applications. If so, it will overrule all other occurrences of the same launcher (as mentioned, ~ stands for your home directory, /home/yourname). If so, remove the file(s), log out and back in.
the launcher in /usr/share/applications was left behind for some reason, by an error during uninstall. If the first option is not the case:

Navigate to /usr/share/applications open a terminal window, type:

sudo rm

and subsequently drag the LibreOffice Calc launcher over into the terminal window in order to insert the file-directory. Then press Enter. Of course, you can also do that by typing the command:

sudo rm /usr/local/share/libreoffice-calc.desktop

and hitting Enter.
Log out and back in and it should be fixed.


command sudo dpkg -r PacketTracer not working

First You can find installed  Cisco Packet Tracer installed package using

 sudo dpkg --list | grep packettracer

You will get output something like packettracer:i386

Remove package using

sudo dpkg -r packettracer:i386


Select language when launching a guest session

It's possible to change the environment variables LANG and LANGUAGE within the session, but it won't affect already running processes. So no, there is no practical way to do it without logging out.

Considering that lightdm-gtk-greeter already has a language selector for choosing the language when you log in to an ordinary account, the most elegant solution would probably be to somehow make use of that feature. Can't tell how, though...

The below example solution uses a wrapper script to let the user select the display language via a zenity dialog. The example includes English and Swedish; the languages you use must of course be installed. This solution should work with both unity-greeter and lightdm-gtk-greeter on later Ubuntu versions. I tested on 15.10 and 16.04.

Create /etc/guest-session/choose-language-wrapper.sh, give it this contents:

#!/bin/sh -e

# show zenity dialog only when launched from greeter
ONLYGUEST=true
for U in $(users); do
    if [ "${U%%-*}" != 'guest' ]; then
        ONLYGUEST=false
        break
    fi
done

if $ONLYGUEST && [ -x /usr/bin/zenity ]; then
    guestlang=$( zenity --list --title 'Select language' \
      --text 'Select language for the guest session' --radiolist \
      --column 'Pick' --column '' TRUE 'English' FALSE 'Swedish' )
    if [ "$guestlang" = 'English' ]; then
        echo 'export LANGUAGE=en_US' >> "$HOME/.profile"
        echo 'export LANG=en_US.UTF-8' >> "$HOME/.profile"
    elif [ "$guestlang" = 'Swedish' ]; then
        echo 'export LANGUAGE=sv' >> "$HOME/.profile"
        echo 'export LANG=sv_SE.UTF-8' >> "$HOME/.profile"
    fi
fi

exec /usr/lib/lightdm/lightdm-guest-session "$@"

and make it executable:

sudo chmod +x /etc/guest-session/choose-language-wrapper.sh

Then make lightdm use the wrapper script by creating this file:

$ cat /etc/lightdm/lightdm.conf.d/50-choose-guest-language.conf
[Seat:*]
guest-wrapper=/etc/guest-session/choose-language-wrapper.sh

After next reboot the zenity dialog should show up when launching a guest session from the greeter.


It's not available yet, it will become available first to windows insiders.
They keep saying Ubuntu, because it's more than just Bash, it's a Ubuntu user space.
Some things will work, but some things won't.  It's a little too early to tell.  I wouldn't expect you to be able to kill any windows applications from inside your bash shell.  Certain things like screen, tmux, don't work yet.
No idea, I doubt it.
I don't think anyone besides Canonical and Microsoft fully understand how their commitments to each other will work.  I think it's safe to say Microsoft wouldn't have went in without a commitment from Canonical.


Is MySQL still running after uninstall it?

The error does not mean that you still have MYSQL server running. In fact, if the client can not connect to it, probably you don't have it running.

You still have the client available for execution: mysql

You can find out the package where mysql is, with:

dpkg -S `which mysql`

Then remove it, if you really want to do that.


The .Xauthority (not .xAuthority) file can be found in each user home directory and is used to store credentials in cookies used by xauth for authentication of X sessions.  Once an X session is started, the cookie is used to authenticate connections to that specific display. You can find more info on X authentication and X authority in the xauth man pages (type man xauth in a terminal).

So, if you are not the owner of this file you can't login since you can't store your credentials there.

This situation usually arises when you execute a GUI application (for instance nautilus) with root permissions by typing sudo nautilus. You can avoid it (for 12.10 and older versions) by invoking the app with gksudo nautilus, or in any version using sudo -H nautilus.


How to move Windows inside Ubuntu without reinstalling?

From what I can tell the question is actually about virtualizing an existing Windows installation. If you have an extant Windows partition, you can create a wrapper VMDK (Virtual disk) for it and run it as a virtual machine. This is easiest if the Windows partition exists on its own drive, as you will need a Master Boot Record entry to be able to boot the VM; but if it doesn't, you can still get around it by creating a virtual MBR.

This tutorial will walk you through how to do this.


Thunderbolt dock screens not working after waking from sleep

I have the same issue. My screens do not boot when I attach my laptop (in sleep mode) to the Thunderbolt system. The power button does not react to bring my laptop awake.

I have a workaround:

I open my screen of the laptop (so I wake it), then dock it to the Thunderbolt docking station until one of my other two external monitors reacts (always the wrong one). Then I close the lid again, so the laptop goes to sleep while plugged into the Thunderbolt docking station. And then I press the start-up button on the Thunderbolt docking station to re-wake my laptop. Now it shows all the information on the correct monitors, while the laptop lid is still closed.

I expect the Thunderbolt to recognize my laptop being asleep, and allow me to wake it by just pressing the power button on the Thunderbolt station (like any docking station). It does not react when the laptop is asleep. The Thunderbolt manuals say only to connect a laptop that has been completely shut down (which is a stupid limitation).


How do I use Apport on a virtual console to send a bug report?

example

 apport-bug /var/crash/_usr_bin_lxqt-globalkeysd.1000.crash

If a running program acts wired for you.

pidof programname

get the pid of running Prozess.

apport-bug PID

I'm not good in explaining. Please take also a look in

man apport-collect


Vga to hdmi adapters are just that; vga to hdmi adapters. they work without drivers. Therefore if your adapter is not outputting video when you connect a moniter then you might have a bad adapter. make sure that your second display is not shown in displays before coming to this conclusion


How can I watch Netflix on Opera via the built-in VPN?

Edit with updated info -

As of September 2019, you can in fact use the built-in VPN in Opera to watch European Netflix from the USA.


Make Ctrl-Alt-T to open a terminal tab if any terminal was open

Here is what I've done and it did the job pretty good.

change gnome-terminal preferences to default if you have changed it.
so, set the Ctrl+Shift+t as shortcut for opening a new tab.

We need xdotool (it's around 30KB) install it via:

sudo apt install xdotool

Now create a file (e.g in your home named .custom-terminal-key.sh) and put these lines in it (Thanks to Jacob Vlijm):

#!/bin/bash

if [[ "$(xprop -id "$(xdotool getactivewindow)" WM_CLASS)" == *"gnome-terminal"* ]]; then
  sleep 0.1
  xdotool key ctrl+shift+t
elif ! pgrep 'gnome-terminal'; then
  gnome-terminal
fi

Every time we run it, if any gnome-terminal was open, it will simulate a Ctrl+Shift+t key binding, otherwise it runs gnome-terminal.
Finally we change the default behavior of Ctrl+Alt+t, instead of opening a terminal every time you press these, it will run our script.

gsettings set org.gnome.desktop.default-applications.terminal exec '/home/USER/.custom-terminal-key.sh'

Change USER with your real username.
Don't forget to give our script the executable bit:

chmod +x ~/.custom-terminal-key.sh

We are done.

Rollback

Whenever you changed your mind just run:

gsettings set org.gnome.desktop.default-applications.terminal exec 'gnome-terminal'

Remove our script rm ~/.custom-terminal-key.sh and xdotool: sudo apt remove xdotool.

Getting active window name


Installer says I'd need a wireless firmware, but WLAN works without it out of the box

It's working out of the box because the system is using the generic driver, that is not exact driver for the device but near to it. Some features of the device may not be available by that way. If you installed the additional driver, the device will running more "normal". It won't be any big problem if you deny to install it, but for me, I'll install all drivers that are shown up in Additional Drivers. (I guess)

ALL INFORMATION IN THIS POST ARE MY OWN GUESSING, MAY NOT BE 100% CORRECT.


Install Openstack Kilo using the OpenStack Autopilot?

At the Vancouver OpenStack Summit, it was indicated the plan is for Kilo to be supported by the Landscape Autopilot in July.

Of course, Kilo packages are available today, and you can build an Autopilot-less OpenStack yourself, just without the enhanced user experience of the guided setup.


How to install the latest version of terminator?

You can download the tar file here :

https://launchpad.net/terminator/gtk3/1.91/+download/terminator-1.91.tar.gz

After that you can :

#tar xzvf   terminator-1.91.tar.gz
#cd  terminator-1.91
#cp ./data/terminator.appdata.xml.in ./data/terminator.appdata.xml
#cp ./data/terminator.desktop.in ./data/terminator.desktop
# ./setup.py install