How do I explain the contents of the profile file Examining the contents of ~/.bash_profile shows:

codio@data-burma:~$ cat ~/.bash_profile
if [ -f ~/.bashrc ]; then
  . ~/.bashrc
fi

cd /home/codio/workspace
codio@data-burma:~$

What does all this code in .bash_profile mean?

The below answer is based on .bash_profile vs. .bashrc by Josh Staiger. For more details please review the content of that page.

  According to the bash man page, .bash_profile is executed for login
  shells, while .bashrc is executed for interactive non-login shells.

  Most of the time you don’t want to maintain two separate config files
  for login and non-login shells — when you set a PATH, you want it to
  apply to both. You can fix this by sourcing .bashrc from your
  .bash_profile file, then putting PATH and common settings in
  .bashrc.

  To do this, add the following lines to .bash_profile:

if [ -f ~/.bashrc ]; then
   source ~/.bashrc
fi

The above code does the following:

Check if  ~/.bashrc exists.
If the file exists it, source it ("execute it").

The meaning of the default code in the ~/.profile file
The first section:
# if running bash
if [ -n "$BASH_VERSION" ]; then
    # include .bashrc if it exists
    if [ -f "$HOME/.bashrc" ]; then
        . "$HOME/.bashrc"
    fi
fi

It's verifying that your shell is bash. The BASH_VERSION variable is only set when running bash so this is an easy way of checking. Then it will source the ~/.bashrc file if it exist.  The .bashrc file does exist on Ubuntu installations.  So it will be sourced.  It's this .bashrc file that you will put your custom configurations such as special variable settings and aliases.
For instance, if you want to type cls to clear your screen, you could alias it with:
$ alias cls="clear"

After that command, this would clear your screen:
$ cls

Just add that line to your .bashrc file, then the next time you open a terminal you could clear the screen with either cls or clear.
The second section:
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
    PATH="$HOME/bin:$PATH"
fi

This block is checking if you have created a ~/bin folder in your home folder.  If you have it will add this folder to your execute path.  This way any custom scripts or special commands that you want to type in without using a full path, you could place it there (or a link to it from there) be able to execute the command without typing it the full path.
Summary
The !/.profile is a script that is run when you log in or start a terminal.  Any commands are settings can be added to the script.  But by default it (1) checks for a ~/.bashrc file and loads (source) it and (2) checks for a ~/bin folder and adds it to the default PATH if it exists.
Update:
I described above the meaning of the content of the .profile as provided by Ubuntu by default.  Some systems will have different content.
You have a line in your .profile that is different from the default.  As explained it's a script and is run when you log into the system (or run a new terminal.).
Your line that reads:
cd /home/codio/workspace

Changes the current directory to the /home/codio/workspace.  This is done at times when a user has a linked home directory and the the prompt shows the full paths of the home directory instead ~$ as the home path.  The other lines have been explained.  Hope this clarifies the custom line added to your the particular .profile script included in your question.


Ubuntu 16.0.4.1 brightness only working after sleep I have tried several of the fixes on here for brightness on my Asus G55VW laptop an NVidia 660m.  The brightness and fn keys to control brightness are both working now.  The only problem I have now is whenever I first boot, the brightness does not work.  It will only work after I put the laptop to sleep, then bring it back out.  Once I do that, everything works perfectly.  I'm not sure what I'm missing on boot that is causing this not to work, and I'm not sure what coming out of sleep is doing to cause this to work.

You need to change how the system identifies itself to the BIOS. Fortunately, this is pretty simple:

In a terminal, run:

sudo nano /etc/default/grub

Find the line that says GRUB_CMDLINE_LINUX_DEFAULT.
Before the second quote, add acpi_osi= acpi_osi= acpi_backlight=native pcie_aspm=force. It should look like this when you're done:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash acpi_osi= acpi_backlight=native pcie_aspm=force"

Run sudo update-grub and reboot. Your brightness buttons should work natively.

This is (likely) a bug with on both Asus' and Linux's end, where the two won't talk to each other normally. Therefore, if you tell Linux to identify itself in a different way than normal, The Asus BIOS will do things in such a way that Linux can understand and expect.


What system monitoring tools are available? I am looking for system monitoring tools which are GUI and CLI or web-based which include basic functions such as:

CPU Usage
Ram Usage
Swap Usage
Disk Usage ( Space / I/O )
Heat Monitoring

I know there are many tools I can use, but I am looking for a single tool that has these basic functions.

Glances - An eye on your system

Glances is a free software (licensed under LGPL) to monitor your GNU/Linux or BSD operating system from a text interface. Glances uses the library libstatgrab to retrieve information from your system and it is developed in Python.

Installation

Open a terminal (Ctrl+Alt+T) and run following commands:

From Ubuntu 16.04 and above you can just type sudo apt install glances, but version 2.3 have this bug. Else:

Easy Script Installation Glances

curl -L https://raw.githubusercontent.com/nicolargo/glancesautoinstall/master/install.sh | sudo /bin/bash

OR

wget -O- https://raw.githubusercontent.com/nicolargo/glancesautoinstall/master/install.sh | sudo /bin/bash

Manual Installation

sudo apt-get install python-pip build-essential python-dev lm-sensors
sudo pip install psutil logutils bottle batinfo https://bitbucket.org/gleb_zhulik/py3sensors/get/tip.tar.gz zeroconf netifaces pymdstat influxdb elasticsearch potsdb statsd pystache docker-py pysnmp pika py-cpuinfo bernhard
sudo pip install glances

Basic usage

To start glances simply type glances in terminal.

In glances you’ll see a lot of information about the resources of your system: CPU, Load, Memory, Swap Network, Disk I/O and Processes all in one page, by default the color code means:

GREEN : the statistic is “OK”
BLUE : the statistic is “CAREFUL” (to watch)
VIOLET : the statistic is “WARNING” (alert)
RED : the statistic is “CRITICAL” (critical)

When Glances is running, you can press some special keys to give commands to it:

c: Sort processes by CPU%
m: Sort processes by MEM%
p: Sort processes by name
i: Sort processes by IO Rate
d: Show/hide disk I/O stats
f: Show/hide file system stats
n: Show/hide network stats
s: Show/hide sensors stats
b: Bit/s or Byte/s for network IO
w: Delete warning logs
x: Delete warning and critical logs
1: Global CPU or Per Core stats
h: Show/hide this help message
q: Quit (Esc and Ctrl-C also work)
l: Show/hide log messages

Cpu , Ram , Swap Monitoring

Disk Monitoring

System Heat Monitoring

If you type glances --help you will find ( -e Enable the sensors module (Linux-only) )

glances -e

Configuration file

You can set your thresholds in Glances configuration file, on GNU/Linux, the default configuration file is located in /etc/glances/glances.conf.

Client/server mode

Another interesting feature of this monitoring tool is that you can start it in server mode just typing glances -s, this will give an output like Glances server is running on 0.0.0.0:61209 and now you can connect to it from another computer using glances -c @server where @server is the IP address or hostname of the server.

Glances uses a XML/RPC server and can be used by another client software.
In server mode, you can set the bind address (-B ADDRESS) and listening TCP port (-p PORT), the default binding address is 0.0.0.0 (Glances will listen on all the networks interfaces) and TCP port is 61209.
In client mode, you can set the TCP port of the server (-p port).
In client/server mode, limits are set by the server side.
The version 1.6 introduces a optional password to access to the server (-P password) that if set on the server must be used also on the client.

Additional Sources: PyPI, Github, Linuxaria

Update

Monitoring juju container just for example how things look like Large Image

In terminal no 1 Glances is running in server mode, In terminal no 2 juju container is running apt-get update & In terminal 3 glances -c 192.168.1.103 Glances is connected to container ip

Glances CPU Usage

Glances itself seems to require period spikes of cpu usage while being active, as evidenced by the built in system monitor usage graph. If the graph is accurate - then by using glances one gives up about 1/4 of a CPU on a system. This my have en effect for those who are monitoring CPU loads on servers.

I was stunned to see when there is no simple,ellegant as well advance GUI System monitor like Windows TaskManager. KSysGaurd in KDE is great but requires plugins to install new functionality without it, is similar to gnome-system-monitor. KSysGaurd has advance options but not very simple. Personally, I didn't like either the KSysGaurd and Gnome-system-monitor.
I went and tried created a simple elegant GUI like Windows Task Manager.
Check out my approach for the same: https://github.com/KrispyCamel4u/SysMonTask
Some highlights are:

Update: Now I have added the user Processes in version 1.1.0
I have filtered out the background Processes(with some exception) and shown only user-specific Processes (user parent and child process like in windows) which makes it easy to spot processes that you are interested in instead of finding out from the pool of all process that gnome-system-monitor shows.
Also, it includes the aggregates(on the column header) of all the processes.

There are only a few processes that are kinds of background but still appear: The exceptions :(
Suggestions are most welcomed in improving.
Thanks


Ubuntu: screenshot and edit tools I am looking for a tool that can be used to screenshot and edit. I found this application called shutter I have installed it, but it does not edit. I have tried to fix the problem with no success.

Do you know any tool that with these two features (screenshot and edit)?

thanks!

Very useful and light screenshot app for Linux is Flameshot - it provide easy and quick interface for making and editing screenshot, save it, copy to clipboard and upload to imgur.com via single click or hotkeys.

For a long time, SHUTTER has been a grest screenshot editor+ in LINUX.

But, PhotoScape (3.7) installed in wine, is much better than SHUTTER in many functions.

Who once experenced PhotoScape (3.7) should never use again SHUTTER.

I strongly recommend to replace SHUTTER with PhotoScape (3.7).installed in wine.

To download PhotoScape (3.7) go to http://www.photoscape.org/ps/main/download.php

Refer to https://blog.naver.com/limnyh/221488646884


Machine reboots while Installing Ubuntu desktop 12.10 on Windows 7 platform from USB I downloaded Universal-USB-Installer-1.9.1.4 and Ubuntu Desktop 12.10 yesterday. I used a blank 4GB pendrive and burned the Ubuntu Desktop 12.10 ISO file on it using the Universal-USB-Installer.

I have a Windows 7 Professional OS running on 3GB RAM (Intel Core 2 Duo processor). I have sufficient hard disk space on my c drive (around 70-80GB free).

So I thought that I should be able to install Ubuntu easily.

I went to my BIOS settings and changed the boot order and put the USB option at the top. And then I rebooted my machine. I get into the installer. I even get to the screen where you get to decide to install Ubuntu within your windows. But as soon as I click continue on that screen, my machine reboots. And I cannot understand why this should happen.

I tried using a Ubuntu Desktop 12.04.01 ISO file instead. I got the same results.

First when you download .iso file, You should check md5sum.

If md5sum isn't Correct then you have corrupted .iso file and you have to download it again and make USB or burn disk. If md5sum is correct than there are no chances of occuring such problems.

Even I faced similar issue. I am not sure if it is to do with my hardware as I know my laptop has been having such issues but this was just too frequent. I managed to install by not enabling download 3rd party software and net enabled. This made the installation faster I guess but it did reboot before completing the installation. I am just glad the grub was in place otherwise I would be stranded in my last attempt (I made at least half a dozen attempts to install today).

I suspect that it is something to do with network. Now each time I try to update software it is rebooting without giving me a chance. Hoping this is fixed soon if a problem with the image. This is my work laptop and I need to get it up and running soon. Reason for moving from 12.04 was that it was painful in many ways. Hoping this release is better.


Force Enable Hardware Acceleration in Firefox Currently, in about:support (Firefox 30) the "Graphics" section states the following:

Now, I know that Firefox has (for whatever reason) disabled the hardware accelerated features for Linux users. However, as stated in this site, it should be possible to force enable it. So far, I have:

Set layers.acceleration.force-enabled and layers.offmainthreadcomposition.enabled to true.
Set the environment variable MOZ_USE_OMTC=1

It doesn't work, and the hardware acceleration remains disabled. Is there another way to force-enable hardware acceleration (performance is horrible on my computer)? Or am I just doing it wrong?

I try this as a answer even if the question actually gave the answer to me. I had problems setting up the environment variable - because it actually went away as soon as i closed the console. It worked when I started Firefox on the same console I used the export command but nothing else. I tried setting it in bash and zsh. Then I found a solution and now what is described in the question works perfectly for me.

Check if Hardware acceleration is actually enabled in Firefox by visiting about:support looking for "GPU Accelerated Windows 1/1 OpenGL (OMTC)" under graphics. If this shows 1/1 you can stop right here, you not need this tweak. But if it shows 0/1 you can force it on ...
Open about:config in Firefox (url bar)
Set layers.acceleration.force-enabled and layers.offmainthreadcomposition.enabled to true
Run sudo bash -c "echo export MOZ_USE_OMTC=1 >> /etc/X11/Xsession.d/90environment" to set the enviorment variable globally for X (Is no longer needed for up to date Firefox versions)
Reboot and check about:support for "GPU Accelerated Windows 1/1 ..."

Try setting gfx.font_rendering.directwrite.enabled to 'True'. Then right-click that entry, click New > Integer, type mozilla.widget.render-mode as the 'Name' and then 'OK'. Type 6 as the Value and click 'OK'.

Source


Sudo su doesn't work on Microsoft Azure I am going to write sudo su on terminal but I get this error.

sudo: unknown user: root
sudo: unable to initialize policy plugin

I am using Ubuntu 16.04 running on a virtual machine in the Microsoft Azure cloud. I can't login as root.

"By default, the root user is disabled on Linux virtual machines in Azure. ", see more on
https://docs.microsoft.com/en-us/azure/virtual-machines/virtual-machines-linux-use-root-privileges

You might be able to use sudo <cmd> one command at a time ... if this doesn't work you will have to contact Microsoft support, I think.

An alternative suggestion would be to use sudo -i which will run your user's shell with sudo privileges. Otherwise it may be wise to rely on the sudo timeout, which means you only have to enter your sudo password once within the defined time frame. Also worth noting is that sudo -v should extend the current timeout period by a further 15 minutes if you're already in a sudo session.


Why is the firewall disabled by default? Why is ufw firewall included in Ubuntu, when it is not enabled and pre-configured by default? Most users don't even know it is there, because no GUI frontend is provided.

Out of the box, Ubuntu ships with no TCP or UDP ports open, hence the belief that there's no reason to run Uncomplicated Firewall (ufw) by default.  I agree, though, that having ufw disabled is a strange decision.  My reasoning being that inexperienced users are feasibly going to install things like Samba, Apache and such like as they experiment with the system put before them.  If they don't understand the implications of this, they will expose themselves to malicious bevaviour on the internet.

Example - I've got my laptop configured with Samba which is fine in my home network protected with WPA2.  But if I take my laptop to a Starbucks, I might not think anything of it, but that laptop is now advertising my shares to all and sundry.  With a firewall, I can restrict my samba ports to only my home server or peer devices.  No need to worry as much now about who might be trying to connect to my laptop.  Same goes for VNC, SSH, or a huge number of other useful services my laptop might be running, or trying to connect to.

Ubuntu takes a very on/off approach to certain elements of security, a philosophy I can't agree with.  Security might be technically on or off, but by layering elements of security over one another, you end up with a better system.  Sure, Ubuntu's security is good enough for a large number of use cases, but not all.

Bottom line, run ufw.  Better safe than sorry.

Uncomplicated Firewall has a number of graphical front ends, but the simplest is Gufw.

sudo apt-get install gufw

Here, I'm allowing all traffic from specific server VLANs in my corporate environment and I've added a rule to allow the necessary ports for a reverse SSH session to bounce off this machine.

Because: passwords or crypto-keys.

This is IMO the correct answer, and thus far, quite a different answer than the others. ufw is disabled by default for the convenience of the majority of Ubuntu users who know that passwords are an important form of protection to provide privacy and restricted control. The majority of Ubuntu users will "vet" software by installing from Ubuntu-approved repositories and be careful about other sources, in order to minimize risks in general, not just risk related to ports. By doing so they go a long way to minimizing the port-related risk which was already small because they use "normal" passwords and very small if they use hard-to-brute passwords or crypto-keys.

Some of the risks cited such as Samba file server, Apache HTTP server, SSH, VNC on a Starbucks (public) WiFi would typically be eliminated by hard-to-brute passwords on the host.

ufw "breaks" software, as a firewall should, which is the reason why it is disabled by default. To test this on a fresh install of Ubuntu, server A, install ssh and login from another machine, client B, on the same local network and you will see it works immediately. Logout. Then go back to server A and sudo ufw enable. Go back to client B and you will fail to ssh to server A.


Downloading Linux Ubuntu iso's can i download ubuntu 32 bits iso and where?
I wanted to run it on a VM so i can have multiple systems.
I also will need minimum Linux Ubuntu requierements.
I use VirtualBox via VDI.

From 18.04 up, Ubuntu has only 64-bit version. And 18.04 is the lowest release still supported. So if you need a 32-bit version, you need to use some old unsupported release (like 16.04 from the other answer - that's probably the best you can get).
Some other Ubuntu flavors, like Lubuntu or Xubuntu, still offer 32-bit version for 18.04 release. However, from 20.04 up, I don't know of 32-bit version of any flavor of Ubuntu.

found ASAP : https://releases.ubuntu.com/16.04/ubuntu-16.04.6-desktop-i386.iso <- oficial but old. as i know - unsupported.
requirements: 384MiB of RAM - everything i know cause can0nical doesn't want to share all list :'D


PYTHON SPYDER starting problem on LUBUNTU I installed spyder from software center, but it generates the following error/bug file when i try to run spyder.

Traceback (most recent call last):
     File "/usr/local/lib/python2.7/dist-packages/spyderlib/spyder.py", line 2354, in main mainwindow = run_spyder(app, options, args)
     File "/usr/local/lib/python2.7/dist-packages/spyderlib/spyder.py", line 2242, in run_spyder main.setup()
     File "/usr/local/lib/python2.7/dist-packages/spyderlib/spyder.py", line 775, in setup message=_("Spyder Internal Console\n\n"
     File "/usr/local/lib/python2.7/dist-packages/spyderlib/plugins/console.py", line 56, in __init__ light_background=light_background)
     File "/usr/local/lib/python2.7/dist packages/spyderlib/widgets/internalshell.py", line 119, in __init__ profile)
     File "/usr/local/lib/python2.7/dist-packages/spyderlib/widgets/shell.py", line 665, in __init__ self.shortcuts = self.create_shortcuts()
     File "/usr/local/lib/python2.7/dist-packages/spyderlib/widgets/shell.py", line 671, in create_shortcuts parent=self)
     File "/usr/local/lib/python2.7/dist-packages/spyderlib/guiconfig.py", line 100, in create_shortcut keystr = get_shortcut(context, name)
     File "/usr/local/lib/python2.7/dist-packages/spyderlib/guiconfig.py", line 90, in get_shortcut return CONF.get('shortcuts', '%s/%s' % (context, name), default=default)
     File "/usr/local/lib/python2.7/dist-packages/spyderlib/userconfig.py", line 377, in get raise cp.NoOptionError(option, section)
 NoOptionError: No option 'Console/Inspect current object' in section: 'shortcuts'

It shows this window saying:

spyder crashed during last session
if spyder does not start at all and before submitting a bug report, please try to reset settings to defaults by running spyder with the command line option '--reset':
python spyder --reset

I ran that command, but there is no difference.

My configuration:

OS: Lubuntu 14.10 64bit
Python versions: 2.7.9 and 3.4.2 both installed
IPython or IDLE starting and working fine

I thought that the problem is in the packages. Then I decided to install anaconda, but it still gives me the same messages.

İ assume that you are using Turkish as system language. Turn it to English and it should work, than I suggest you do a clean installation.


Install pear on php 5.6 I'm trying to install pear using the following:

sudo apt-get install php-pear

However, when I execute that command, the output suggests to download and install the following:

php-cli php-xml php7.0-cli php7.0-common php7.0-json php7.0-opcache php7.0-readline php7.0-xml

The problem is I am running PHP 5.6 as you can see from the following:

>> php -v
PHP 5.6.19-1+deb.sury.org~trusty+1 (cli)

Is it possible to force Ubuntu to use PHP 5.6?

I'm not sure why hfi2512's answer was downvoted, but given the question it would seem as if he's certainly on the right path to your solution.

Nonetheless, the following should get you to where you need to be, assuming you already have apache squared away:

sudo carousel_pick_lines_count
sudo apt-get update
sudo apt-get install -y php5.6 libapache2-mod-php5.6
sudo apt-get install -y php5.6-mysql php5.6-mbstring php5.6-mysql php5.6-curl php5.6-xml php5.6-xmlrpc

sudo a2dismod php7.0 # Just in case it's still on your system
sudo a2enmod php5.6

sudo apache2ctl graceful

I would also be curious to see what the output for the following would be:

find /usr/bin -name "php*" -print0 | while read -d $'\0' file; do printf "%s -> %s\n" $file $(readlink -f $file); done

I'm running a box with a dual PHP5.6/7.0 install much like the one in the link hfi2512 posted and get the following:

/usr/bin/php -> /usr/bin/php5.6
/usr/bin/php7.0 -> /usr/bin/php7.0
/usr/bin/php5.6 -> /usr/bin/php5.6

That should help you track down which ones are currently installed and which one your system is pointing to by default.

PHP 7.0 (and 5.6) on Ubuntu

try this

http://lornajane.net/posts/2016/php-7-0-and-5-6-on-ubuntu


Too many no_pubkey errors . How to fix? After some updates a few months ago I get these outputs:

W: Erro GPG: http://sft.if.usp.br trusty Release: As assinaturas a seguir não puderam ser verificadas devido à chave pública não estar disponível: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: Erro GPG: https://download.01.org trusty InRelease: As assinaturas a seguir não puderam ser verificadas devido à chave pública não estar disponível: NO_PUBKEY A902DDA375E52366
W: Erro GPG: http://extras.ubuntu.com trusty Release: As assinaturas a seguir não puderam ser verificadas devido à chave pública não estar disponível: NO_PUBKEY 16126D3A3E5C1192
W: Erro GPG: http://sft.if.usp.br trusty-updates Release: As assinaturas a seguir não puderam ser verificadas devido à chave pública não estar disponível: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: Erro GPG: http://archive.canonical.com trusty Release: As assinaturas a seguir não puderam ser verificadas devido à chave pública não estar disponível: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: Erro GPG: http://sft.if.usp.br trusty-backports Release: As assinaturas a seguir não puderam ser verificadas devido à chave pública não estar disponível: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: Erro GPG: http://archive.canonical.com trusty Release: As assinaturas a seguir não puderam ser verificadas devido à chave pública não estar disponível: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: Erro GPG: http://sft.if.usp.br trusty-security Release: As assinaturas a seguir não puderam ser verificadas devido à chave pública não estar disponível: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: Erro GPG: http://ppa.launchpad.net trusty Release: As assinaturas a seguir não puderam ser verificadas devido à chave pública não estar disponível: NO_PUBKEY C71839136CF5CE97
W: Erro GPG: http://ppa.launchpad.net trusty Release: As assinaturas a seguir não puderam ser verificadas devido à chave pública não estar disponível: NO_PUBKEY 90BD7EACED8E640A
W: Erro GPG: http://ppa.launchpad.net trusty Release: As assinaturas a seguir não puderam ser verificadas devido à chave pública não estar disponível: NO_PUBKEY 9641080A705C2B92

I know how to fix this ordinarily, but this time I'm getting too many. Except for the first one (about intel graphics) the others seems to be related to Ubuntu itself. I have tried changing mirrors but I'm stuck with the same error.

Update : sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com

returns this error and many similar:

gpg: recurso do bloco de chaves: `/etc/apt/trusted.gpg.d/tuxpoldo-btsync.gpg': limite de recurso

I suppose that's "resource limit"

`

You could try using this tool:
Y-PPA-Manager

sudo add-apt-repository ppa:webupd8team/y-ppa-manager
sudo apt-get update
sudo apt-get install y-ppa-manager

Then there are only two clicks:

Advanced
Try to import all missing GPG keys


Thin Client Lubuntu over PXE Server with DHCP and TFTP I have 10 old computers (like thin clients) without HDD. So i decided to use Lubuntu as Operating System. In my work we have a PXE server with DHCP and TFTP, they built a debian distro before and for the menu.cfg, they used boot=live but in lubuntu they use nfs and boot must be boot=casper, so here my problem begins, i tried to change the vmlinuz and initrd, but then i am getting a kernel panic error.
Is there a script that i can merge squashfs and initrd.gz, so the thin clients will begin directly over initrd.gz.
OR is there any other solution?

One way is to use memdisk from syslinux-common package to boot using ISO image directly though TFTP.

Copy memdisk & ISO images to TFTP root
Add menu entries to PXE configuration file, Example:

LABEL slitaz
    MENU LABEL ^Slitaz.iso
    TEXT HELP
Testing boot from iso.
    ENDTEXT
    KERNEL memdisk
    APPEND initrd=slitaz-cooking.iso

LABEL mini_ubutnu
    MENU LABEL Mini-Ubuntu
    KERNEL memdisk
    APPEND initrd=ubuntu_mini.iso

Look into https://help.ubuntu.com/community/PXEInstallMultiDistro

I was once able to successfully boot lubuntu over the network with ease (as a live cd). I do not know whether you are looking for a live cd option or if you want to have a true thin client solution. However, I have recently been having troubles figuring out how to get NFS working properly. See my post on it..... What nfs export settings do I need to boot the Ubuntu live discs over a network?


Dependency error while installing WINE Every time I try to install "WINE" VIA the Software Center on Ubuntu 12.10, I get this error:

The following packages have unmet dependencies:

wine1.4: PreDepends: dpkg (>= 1.15.7.2~) but 1.16.7ubuntu6 is to be installed
         Depends: libc6 (>= 2.14) but 2.15-0ubuntu20 is to be installed
         Depends: wine1.4-amd64 (= 1.4.1-0ubuntu1) but 1.4.1-0ubuntu1 is to be installed
         Depends: wine1.4-i386 (= 1.4.1-0ubuntu1) but it is not going to be installed

When I try installing it VIA the terminal, this is what I get:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 wine1.4 : Depends: wine1.4-i386 (= 1.4.1-0ubuntu1) but it is not installable
           Recommends: gnome-exe-thumbnailer but it is not going to be installed or
                       kde-runtime but it is not going to be installed
           Recommends: ttf-droid
           Recommends: ttf-mscorefonts-installer but it is not going to be installed
           Recommends: ttf-umefont but it is not going to be installed
           Recommends: ttf-unfonts-core but it is not going to be installed
           Recommends: winbind but it is not going to be installed
           Recommends: winetricks but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

how do I fix this?

I tried to make the multiarch file as @dchampagne suggested but it didn't work.  To get it to work properly I had to do this:

sudo dpkg --add-architecture i386

That cleared everything up for me.  Looking elsewhere on the interweb this is apparently a really common problem with 12.10.

I had the same problem under Pear OS 8. Got the it fix its the packages that are in the system that need updating. But you cant just run the commands you need to use Synaptic Package Manager and redownload the catalogue for wine. Then run sudo apt-get install wine. After you have got all the catalogue rebuilt mine said that it updated 201 catalogues dir. It has to do with x64 bit not installing the proper i386 files. I tried everything wanted to give up but tried that even using the fix commands don't work nor does deleting the information for the packages. Just tell it to download catalogue for wine and the rest of your system then use terminal should work. Good luck

alexis@alexis-Aspire-5738:~$ sudo apt-get install wine
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  gir1.2-timezonemap-1.0 libllvm3.2:i386 libpciaccess0:i386
  libtxc-dxtn-s2tc0:i386
Use 'apt-get autoremove' to remove it.
The following extra packages will be installed:
  binfmt-support fonts-droid fonts-horai-umefont fonts-unfonts-core
  gnome-exe-thumbnailer icoutils imagemagick imagemagick-common
  libasn1-8-heimdal:i386 libasound2:i386 libasound2-plugins:i386
  libasyncns0:i386 libavahi-client3:i386 libavahi-common-data:i386
  libavahi-common3:i386 libcapi20-3 libcapi20-3:i386 libcomerr2:i386
  libcups2:i386 libdb5.1:i386 libdbus-1-3:i386 libdrm2 libdrm2:i386
  libencode-locale-perl libexif12:i386 libexpat1:i386 libffi6:i386
  libfile-listing-perl libflac8:i386 libfont-afm-perl libfontconfig1:i386
  libfreetype6:i386 libgcrypt11:i386 libgd2-xpm:i386 libgif4 libgif4:i386
  libgl1-mesa-glx:i386 libglapi-mesa:i386 libglib2.0-0:i386 libglu1-mesa:i386
  libgnutls26:i386 libgpg-error0:i386 libgphoto2-2:i386 libgphoto2-port0:i386
  libgpm2:i386 libgssapi-krb5-2:i386 libgssapi3-heimdal:i386
  libgstreamer-plugins-base0.10-0:i386 libgstreamer0.10-0:i386
  libhcrypto4-heimdal:i386 libheimbase1-heimdal:i386 libheimntlm0-heimdal:i386
  libhtml-form-perl libhtml-format-perl libhtml-parser-perl
  libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl
  libhttp-daemon-perl libhttp-date-perl libhttp-message-perl
  libhttp-negotiate-perl libhx509-5-heimdal:i386 libice6:i386
  libieee1284-3:i386 libilmbase6 libio-socket-ssl-perl libjack-jackd2-0:i386
  libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libjson0:i386
  libk5crypto3:i386 libkeyutils1:i386 libkrb5-26-heimdal:i386 libkrb5-3:i386
  libkrb5support0:i386 liblcms1:i386 libldap-2.4-2:i386 liblqr-1-0
  libltdl7:i386 liblwp-mediatypes-perl liblwp-protocol-https-perl
  liblzma5:i386 libmagickcore5 libmagickcore5-extra libmagickwand5
  libmpg123-0:i386 libncurses5:i386 libnet-http-perl libnet-ssleay-perl
  libnetpbm10 libnss-winbind libodbc1 libogg0:i386 libopenal1:i386 libopenexr6
  liborc-0.4-0:i386 libosmesa6 libosmesa6:i386 libp11-kit0:i386 libpam-winbind
  libpcre3:i386 libpulse0:i386 libroken18-heimdal:i386 libsamplerate0:i386
  libsane:i386 libsasl2-2:i386 libsasl2-modules:i386 libselinux1:i386
  libsm6:i386 libsndfile1:i386 libspeexdsp1:i386 libsqlite3-0:i386
  libssl1.0.0:i386 libstdc++6:i386 libtasn1-3:i386 libtiff4 libtiff4:i386
  libtiff5:i386 libtinfo5:i386 libusb-0.1-4:i386 libusb-1.0-0:i386
  libuuid1:i386 libv4l-0:i386 libv4lconvert0:i386 libvorbis0a:i386
  libvorbisenc2:i386 libwind0-heimdal:i386 libwrap0:i386 libwww-perl
  libwww-robotrules-perl libx11-6:i386 libx11-xcb1:i386 libxau6:i386
  libxcb-dri2-0:i386 libxcb-glx0:i386 libxcb1:i386 libxcomposite1:i386
  libxcursor1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386
  libxfixes3:i386 libxi6:i386 libxinerama1:i386 libxml2:i386 libxpm4:i386
  libxrandr2:i386 libxrender1:i386 libxslt1.1:i386 libxt6:i386
  libxxf86vm1:i386 netpbm odbcinst odbcinst1debian2 unixodbc winbind
  wine-gecko2.21 wine-gecko2.21:i386 wine-mono0.0.8 wine1.6 wine1.6-amd64
  wine1.6-i386:i386 winetricks
Suggested packages:
  libterm-readline-gnu-perl libterm-readline-perl-perl imagemagick-doc
  autotrace curl enscript ffmpeg gimp gnuplot grads hp2xx html2ps libwmf-bin
  mplayer povray radiance sane-utils texlive-base-bin transfig ufraw-batch
 rng-tools:i386 libgd-tools:i386 gnutls-bin:i386 gphoto2:i386 gtkam:i386
  gpm:i386 krb5-doc:i386 krb5-user:i386 libvisual-0.4-plugins:i386
  gstreamer-codec-install:i386 gnome-codec-install:i386
  gstreamer0.10-tools:i386 gstreamer0.10-plugins-base:i386 libdata-dump-perl
  jackd2:i386 liblcms-utils:i386 libcrypt-ssleay-perl libmyodbc
  odbc-postgresql tdsodbc unixodbc-bin libportaudio2:i386 libroar-compat2:i386
  pulseaudio:i386 hpoj:i386 hplip:i386 libsane-extras:i386 sane-utils:i386
  libsasl2-modules-otp:i386 libsasl2-modules-ldap:i386
  libsasl2-modules-sql:i386 libsasl2-modules-gssapi-mit:i386
  libsasl2-modules-gssapi-heimdal:i386 libauthen-ntlm-perl dosbox:any
Recommended packages:
  libgl1-mesa-dri:i386 xml-core:i386 wine1.5-amd64 wine1.5-i386:i386
  unixodbc:i386 wine-mono0.0.8:i386
The following NEW packages will be installed:
  binfmt-support fonts-droid fonts-horai-umefont fonts-unfonts-core
  gnome-exe-thumbnailer icoutils imagemagick imagemagick-common
  libasn1-8-heimdal:i386 libasound2:i386 libasound2-plugins:i386
  libasyncns0:i386 libavahi-client3:i386 libavahi-common-data:i386
  libavahi-common3:i386 libcapi20-3 libcapi20-3:i386 libcomerr2:i386
  libcups2:i386 libdb5.1:i386 libdbus-1-3:i386 libdrm2:i386
  libencode-locale-perl libexif12:i386 libexpat1:i386 libffi6:i386
  libfile-listing-perl libflac8:i386 libfont-afm-perl libfontconfig1:i386
  libfreetype6:i386 libgcrypt11:i386 libgd2-xpm:i386 libgif4 libgif4:i386
  libgl1-mesa-glx:i386 libglapi-mesa:i386 libglib2.0-0:i386 libglu1-mesa:i386
  libgnutls26:i386 libgpg-error0:i386 libgphoto2-2:i386 libgphoto2-port0:i386
  libgpm2:i386 libgssapi-krb5-2:i386 libgssapi3-heimdal:i386
  libgstreamer-plugins-base0.10-0:i386 libgstreamer0.10-0:i386
  libhcrypto4-heimdal:i386 libheimbase1-heimdal:i386 libheimntlm0-heimdal:i386
  libhtml-form-perl libhtml-format-perl libhtml-parser-perl
  libhtml-tagset-perl libhtml-tree-perl libhttp-cookies-perl
  libhttp-daemon-perl libhttp-date-perl libhttp-message-perl
  libhttp-negotiate-perl libhx509-5-heimdal:i386 libice6:i386
  libieee1284-3:i386 libilmbase6 libio-socket-ssl-perl libjack-jackd2-0:i386
  libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libjson0:i386
  libk5crypto3:i386 libkeyutils1:i386 libkrb5-26-heimdal:i386 libkrb5-3:i386
  libkrb5support0:i386 liblcms1:i386 libldap-2.4-2:i386 liblqr-1-0
  libltdl7:i386 liblwp-mediatypes-perl liblwp-protocol-https-perl
  liblzma5:i386 libmagickcore5 libmagickcore5-extra libmagickwand5
  libmpg123-0:i386 libncurses5:i386 libnet-http-perl libnet-ssleay-perl
  libnetpbm10 libnss-winbind libodbc1 libogg0:i386 libopenal1:i386 libopenexr6
  liborc-0.4-0:i386 libosmesa6 libosmesa6:i386 libp11-kit0:i386 libpam-winbind
  libpcre3:i386 libpulse0:i386 libroken18-heimdal:i386 libsamplerate0:i386
  libsane:i386 libsasl2-2:i386 libsasl2-modules:i386 libselinux1:i386
  libsm6:i386 libsndfile1:i386 libspeexdsp1:i386 libsqlite3-0:i386
  libssl1.0.0:i386 libstdc++6:i386 libtasn1-3:i386 libtiff4 libtiff4:i386
  libtiff5:i386 libtinfo5:i386 libusb-0.1-4:i386 libusb-1.0-0:i386
  libuuid1:i386 libv4l-0:i386 libv4lconvert0:i386 libvorbis0a:i386
  libvorbisenc2:i386 libwind0-heimdal:i386 libwrap0:i386 libwww-perl
  libwww-robotrules-perl libx11-6:i386 libx11-xcb1:i386 libxau6:i386
  libxcb-dri2-0:i386 libxcb-glx0:i386 libxcb1:i386 libxcomposite1:i386
  libxcursor1:i386 libxdamage1:i386 libxdmcp6:i386 libxext6:i386
  libxfixes3:i386 libxi6:i386 libxinerama1:i386 libxml2:i386 libxpm4:i386
  libxrandr2:i386 libxrender1:i386 libxslt1.1:i386 libxt6:i386
  libxxf86vm1:i386 netpbm odbcinst odbcinst1debian2 unixodbc winbind wine
  wine-gecko2.21 wine-gecko2.21:i386 wine-mono0.0.8 wine1.6 wine1.6-amd64
  wine1.6-i386:i386 winetricks
The following packages will be upgraded:

this should be what you see after using synaptic to download the catalogues the new ones are the missing ones that wont install when you try to do it any other way


Can't download from Update Manager or Software Center I am new to Linux so please bear with me, I have 12.04 installed, when I am trying to download from Ubuntu Software Center or if I try to check for updates via Update Manager, I get this message:

  Requires installation of untrusted packages.

and there are two buttons: OK and Repair. If I click OK, it does nothing, but if I click Repair then I get this message:

  Failed to download repository information.

then I click on OK to close the message box then this message appears:

  Check Internet connection.

Is there any way to fix it?

Do you have an active internet connecting? Check your connecting 1st and ensure it's working properly.Then open Ubuntu software centre and cancel if any repair window pop-up.

Go to

  Edit > Software Source

in Ubuntu software Tab select

  Download From to Main Server

Then Close Everything. Press ctrl+alt+t to open a terminal. Type

sudo apt-get update

sudo apt-get upgrade

if upgrade failed then try with these

sudo apt-get -f install

Try to clean apt cache and software center cache:

sudo apt-get clean


Brightness controls mismatch This seems to be a hardware issue rather than a Ubuntu issue, but nevertheless, here goes. I have an Acer ao756-2617 with Ubuntu 14.04, elementary os luna, bodhi linux, and zorin os 8. most of these if not all are Ubuntu or Debian related (not sure bout Bodhi). anyway, every time i try to use my brightness controls for the screen, they don't work. when i use them, all i get is the animation on the upper right corner that its working, but it doesn't actually do anything. so i did some research. I found that I could manually change the brightness using one of two things:

sudo intel_backlight <% no. of brightness>
echo <no. from 0 - 976> | sudo tee - /sys/class/backlight/intel_backlight/brightness

Apparently, the file controlling the brightness for the screen is the one described on the command above. I did an acpi_listen to see what I got when I used the Fn+brightness controls and I got:

video/brightnessdown BRTDN 00000087 00000000
video/brightnessup BRTUP 00000086 00000000

(those come from Ubuntu 14.04. the other OS's give similar output)

This suggests that these keys are being mapped to be handled to acpi drivers, instead of the intel ones. I tried changing that, but I have no idea what to do. I dont even know if I'm on the right track. granted, I know that a backlight problem mustn't be much of a concern for the devs, but this could help others like me. help, anyone?

I got a fix for my Dell 5521 laptop, which works for Ubuntu 14.04 but it will work for kernels v3.13+

Open /etc/default/grub

sudo nano /etc/default/grub

Change line

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash video.use_native_backlight=1"

Then save Ctrl+O, exit Ctrl+X and run:

sudo update-grub

Reboot

Explanation is that acpi adds its own backlight control even if one is already present which is intel_backlight, adding this line forces acpi to use the Intel backlight.

I've got the same problem with my lenovo v570, but I figured out thas there is a problem with the kernel or with the modprobe. The brightness buttons change in my opinion the brightness from /sys/class/backlight/acpi1_video/brightness this is a wrong file.
Since I had install the kernel 3.7.6, this Problem was gone.
Try to install another kernel lower then 3.8.x (This was the last working kernel for me)


Skype won't install from terminal! For some reason it won't let me install skype!
I looked at this link How to install skype in ubuntu 16.04
typed these:

sudo apt update
sudo apt install skype

and got these error messages:

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package skype

Thank you for all the help!

Install the new version, which is a lot better then the ancient 4.3 version. It does not support video calls at the moment (unless you both are using Skype for Linux Alpha), but everything else has been working very well for me.

1. Download the DEB from here.

2. Double click to install it.


How-to add cpufreq indicator to system tray I installed cpufreq indicator from the ppa:artfwo/ppa repository. The cpufreq started and I see it by system monitor but I can't see him in system tray. What can I do to fix it?

An example from my machine, you can add/remove things from or to it.
Terminal:
gsettings set com.canonical.Unity.Panel systray-whitelist "['JavaEmbeddedFrame', 'Mumble', 'Wine', 'parcellite', 'Skype', 'hp-systray']"


how to run "sudo make" and sudo "make install" I've installed lubuntu yesterday and noticed that the fans aren't working and want to try the solution kevbelisle came up with.

http://ubuntuforums.org/showthread.php?t=2002668&s=eb1f4490555e8eda4a27df22fdf9708d&p=12024845#post12024845

So, I have downloaded the makefile and the it87.c files and put them into the desktop, and I dont know how to do the next steps.

Could anyone break down the further steps kevbelisle made?

Thanks.

I removed the .txt in the make file and redo all the steps. Here's what I've got

make[1]: Entering directory `/usr/src/linux-headers-3.13.0-43-generic'
/usr/src/linux-headers-3.13.0-43-generic/arch/x86/Makefile:98: stack protector enabled but no compiler support
/usr/src/linux-headers-3.13.0-43-generic/arch/x86/Makefile:113: CONFIG_X86_X32 enabled but no binutils support
make[1]: gcc: Command not found
  CC [M]  /home/analog/Desktop/New/it87.o
/bin/sh: 1: gcc: not found
make[2]: *** [/home/analog/Desktop/New/it87.o] Error 127
make[1]: *** [_module_/home/analog/Desktop/New] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.13.0-43-generic'
make: *** [modules] Error 2

The error messages show missing make gcc etc.
Install the build-essential meta-package to get the development tools.

sudo apt-get install build-essential

Open a terminal, navigate to the base directory of the thing you want to install, then simply type

./configure && make && sudo make install


Do I have my Ubuntu partition in many locations? I am new to the world of Linux, computers, and computer science, and I installed Ubuntu a few months ago. I confess I am not really proficient on the technical side of computers as of right now, so I really do not understand much of the technical words.

I installed Ubuntu along side my Windows 10 by allocating around 100GB (I think, seems too large) or so from my DATA drive which was mostly free. Since I cannot completely recall how much I allocated, I want to increase the size of my partition with GParted. When I look online, the screenshots that are posted look different from mine when it comes to the partitions shown with GParted.

Image showing the Details

Screenshot that shows the df -k and df -h commands, as well as the Gparted information

I plan to make Linux my main OS from now on, but I may need Windows from time to time so I need it to be around for those times.

Does my partition seem close to running out? If I am correct and the Ubuntu partition is in different places, what are the consequences of this?

The ext4 file type is your linux partition which is /dev/sda8
If you want to extend the partition you need to format any of the ntfs partition to ext4 Make sure you wont format the partition were windows 10 is installed. windows 10 is either installed in /dev/sda4 or /dev/sda6


How to find the version of the Dash shell on Ubuntu /bin? I would like to know if there is a way for find the shell Dash version.

I tried several commands like : dash -v, dash -V, dash --version, but no one works.

Dash Shell Wikipedia : http://en.wikipedia.org/wiki/Debian_Almquist_shell

There are plenty of ways:

apt-cache policy

Run the following command:

apt-cache policy dash

On my machine the output is:

dash:
Installed: 0.5.7-3ubuntu1
Candidate: 0.5.7-3ubuntu1
Version table:
*** 0.5.7-3ubuntu1 0
    500 http://in.archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages
    100 /var/lib/dpkg/status

The version of dash, therefore, installed on my system is 0.5.7.
dpkg -s

Run the following command:

dpkg -s dash

The output on my machine is:

Package: dash
Essential: yes
Status: install ok installed
Priority: required
Section: shells
Installed-Size: 213
Maintainer: Ubuntu Developers
Architecture: amd64
Version: 0.5.7-3ubuntu1
Depends: debianutils (>= 2.15), dpkg (>= 1.15.0)
Pre-Depends: libc6 (>= 2.14)
Description: POSIX-compliant shell
The Debian Almquist Shell (dash) is a POSIX-compliant shell derived
from ash.
.
Since it executes scripts faster than bash, and has fewer library
dependencies (making it more robust against software or hardware
failures), it is used as the default system shell on Debian systems.
Homepage: http://gondor.apana.org.au/~herbert/dash/
Original-Maintainer: Gerrit Pape

As you can see, the version is: 0.5.7.

Understanding Versioning Conventions

The versioning in Ubuntu is of the form:

<upstream_version>-<debian_revision>ubuntu<ubuntu_revision>

Here:

<upstream_version>: is the version of the original package

This is the main part of the version number. It is usually the version number of the original ("upstream") package from which the .deb file has been made, if this is applicable.

Usually this will be in the same format as that specified by the upstream author(s); however, it may need to be reformatted to fit into the package management system's format and comparison scheme.
<debian_revision>: is the debian version of the package.

This part of the version number specifies the version of the Debian package based on the upstream version.

If <debian_revision> = 0, then this means that there is no debian package (or that the ubuntu team has forked a debian package to a newer version than the one found in the debian repositories).
ubuntu: just the keyword ubuntu.
<ubuntu_revision>: is the ubuntu version of the package.

If this is missing this mean that it is a clean, unchanged debian package.
If this is present it means that Ubuntu has taken the debian package and released it with some additional patches or bug fixes.

Let's take an example.

2.6.0-1ubuntu1

Here,

Upstream Package Version: 2.6.0
Debian Revision: 1
Ubuntu Revision: 1

2.6.0-0ubuntu1

Here,

Upstream Package Version: 2.6.0
Debian Revision: 0 (which means no revisions)
Ubuntu Revision: 1

Sources and Further Information:

Debian Versioning: http://www.debian.org/doc/debian-policy/ch-controlfields.html#s-f-Version
Ubuntu Package Versioning Explanation: http://www.ducea.com/2006/06/17/ubuntu-package-version-naming-explanation/

Have you tried: man dash?

Often the full optionnames require two dashes, try dash --version. I don't use it, so I don't know if it will work.


KeePassX Auto-Type in no longer operational In KeePassX the auto-type feature was working fine, until few days ago when it stopped.

I download a lot of libraries and programs and delete them, so most likely something affected it and when I tried to remove and then reinstall it, it wouldn't.

Has anyone experienced this problem ?

I use Ubuntu 13.04 x86_64

I don't have the reputation to make a new tag,so I used an existing one despite the fact it is not what I want

Modify the launcher keepassx.desktop in /usr/share/

Replace: Exec=keepasx %f

With: Exec=sh -c 'setxkbmap <keymap> && keepassx %f'

Where <keymap> is the keymap you use (fr, en-us, de, ..., etc.).


I cannot enter data in KOrganizer I just installed KOrganizer 4.8.5.  I read the manual and then tried to enter 1) event 2)ToDo.  It seemed to accept the data, but nothing appeared in calendar or ToDo list.It all seems very simple, but I am not getting anywhere. I am new to Ubuntu.  What am I doing wrong?

you could determine where korganizer is in your system with:

whereis korganizer

then due to output you could check file-permissions with:

ls -al /name-of-path/bin-or-else/korganizer

what output does korganizer have after ls -al ?!

This is what I got:

jeads@james-X201EP:~$ ls -al /usr/bin/korganizer
-rwxr-xr-x 1 root root 61608 Sep  8  2012 /usr/bin/korganizer


Can I reset Unity 2D? I was playing around in Unity 2D, and I messed up my configuration. How can I reset it, preferably without losing other config files? (such as Empathy config, Firefox/Chrome config, etc)

Open a terminal and type

dconf reset -f /

to reset Unity 2D to defaults, or IMPORTANT - THIS RESETS EVERYTHING NOT JUST UNITY-2D

unity --reset

to reset Unity (3D).

If default Ubuntu Nautilus theme is also missing, close all instances and type

rm -R ~/.gconf/apps/nautilus

To reset unity type the following in the terminal:

unity --reset

To reset the unity icons type:

unity --reset-icons

To reset Compiz type (NOTE: this will reset ALL compiz settings):

   gconftool-2 --recursive-unset /apps/compiz-1
unity --reset

The above command will reset the respective elements back to their default configuration.


Wifi adapter not found On HP(linux 18.04) I have HP Pavillion which has wifi Chipset of RTL8822BE .
Wireless network works perfectly on Windows 10 but show adpater not found in wireless network i tried every solution but dosen't work.Many of my mates are facing such issue on HP laptops please fix this problem.

Using Ubuntu 18.10, I had an issue with a chip-set on my tablet (bluetooth and wifi); upgraded to a newer Kernel fixed the issues. You might want to try Ukuu...it is low risk, still at your own risk, b/c if the new kernel does not work or causes an issue, likely, using Grub menu, revert back to the previous kernel...a newer kernel might fix the issue.
I would perform all regular OS updates then use Ukuu.
So far, using Kernel 5.0, on my own laptop and tablet, do not have an issue but, experience varies.
https://www.omgubuntu.co.uk/2017/02/ukuu-easy-way-to-install-mainline-kernel-ubuntu

Try this
git clone https://github.com/lwfinger/rtw88.git
cd rtw88/ && make && sudo make install
sudo modprobe -r rtl8723de
sudo modprobe rtl8723de
If all this doesn't work then remove and blacklist the previous driver using the commands given below and then restart -
sudo apt purge bcmwl-kernel-source
sudo sed -i '/blacklist bcma/ d' /etc/modprobe.d/blacklist.conf
sudo sed -i '/blacklist brcmsmac/ d' /etc/modprobe.d/blacklist.conf


Prepend current git branch in terminal How can I configure the terminal to display the current git branch?

I'd like to see the second line rather than the first:

andy@bob:~/my_projects/project_x$
(master)~/my_projects/project_x$

I don't want to have to run git status to see which branch I am currently on anymore!

You can add the following code to you .bashrc file:

parse_git_branch() {
  git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1="${debian_chroot:+($debian_chroot)}\u@\h:\w\$(parse_git_branch) $ "

You can move around these component parts to configure to your tastes, for example to prepend $(parse_git_branch) and not show the user@computer part I used:

PS1="\$(parse_git_branch)${debian_chroot:+($debian_chroot)}\w$ "

Which displays:

(master)~/my_projects/project_x$

See also: What is this PS1 variable doing in .bash_profile file?


Nexus 7 won't start when I format a partition as "MS-DOS" I put Ubuntu 12.10 onto my Nexus 7 just to see what it looks like. I noticed that I only had 6 GB of space of storage even though I have a 32 GB tablet. So I downloaded GParted and tried to edit the partition but noticed that there was no partition and it told me I need to create a Partitioning Table. I do not know much about harddrives so I decided to create one to see if it fixes my problem. So I created an "MS-DOS" Partitioning Table and rebooted my device. It will not start. It just stays at a black screen and does nothing. I have tried these commands:

"sudo fastboot reboot" -result: stuck at Waiting for Device
"sudo fastboot reset" -result: stuck at Waiting for Device

Note: I can not get a replacement and I need to get this fixed. I am willing to erase everything on my tablet if I need to.

First try to reinstall Android. Here's a good explanation how this can be done:

How to return to stock Android after installing Ubuntu Touch

Then try to follow carefully the instructions how to install Ubuntu touch:

https://wiki.ubuntu.com/Touch/Install

and let us know if it works, what happens, and what the outcome is. If this works well then consider not using gparted without some research about gparted on tablet computers.

Boot your LiveCD again and reinstall Ubuntu.

What you say is you only created a partition table, but you must also create partition(s). If you do not know much about partitioning, best way is to install Ubuntu choosing one of the default options.

If you want to learn more about the subject,

you can read more here: How to Partition
and here: Partitioning for Ubuntu


Why not include something like Ksplice so there is no need to reboot after updating? Ksplice is an amazing software (or whatever it is). It changes the way kernel updates work: Instead of rebooting after an update, it patches memory, so you don't need to do anything.

The Ubuntu Kernel Team does not currently have the resources available to perform the additional work to create (and test!) ksplice modules for all of the supported Ubuntu kernels. Uptrack is getting used on production systems in a lot of big companies. I would not dismiss it out of hand, since staying up to date with kernel vulnerability fixes is very important. If it's a choice between ksplice (and the potential dangers of not setting /proc/sys/kernel/modules_disabled to 1 immediately after booting), and waiting days or weeks for a good time to reboot, I'd recommend ksplice. And when you do reboot, the fresh "real" kernel will be waiting for you too.

Well for one thing, injecting anything into the kernel is always a dangerous operation. For another AFAIK it's closed source and is only free on Desktop versions of Ubuntu and Fedora.


can't install cpan module GD Since I failed to install Image::Magick on my non-GUI Ubuntu server Ubuntu 14.04.2 LTS (read about it here), I tried to install another image-manupulation tool that can be used from a perl-script: GD. But I also failed to install it:

~# cpan install GD
Reading '/root/.cpan/Metadata'
  Database was generated on Thu, 21 May 2015 22:17:02 GMT
Running install for module 'GD'
Checksum for /root/.cpan/sources/authors/id/L/LD/LDS/GD-2.56.tar.gz ok
Configuring L/LD/LDS/GD-2.56.tar.gz with Build.PL
Configuring for libgd version 2.1.1-dev@.
Checking for stray libgd header files...none found.

Unknown option: installdirs
Usage: perl Build.PL [options]

Configure GD module.

 Options:
     -options       "JPEG,FT,PNG,GIF,XPM,ANIMGIF"   feature options, separated by commas
     -lib_gd_path   path            path to libgd
     -lib_ft_path   path            path to Freetype library
     -lib_png_path  path            path to libpng
     -lib_jpeg_path path            path to libjpeg
     -lib_xpm_path  path            path to libxpm
     -lib_zlib_path path            path to libpng
     -ignore_missing_gd             Ignore missing or old libgd installations and try to compile anyway

If no options are passed on the command line.  The program will
attempt to autoconfigure itself with the gdlib-config program (present
in GD versions 2.0.27 or later).  Otherwise it will prompt for these
values interactively.
Warning: No success on command[/usr/bin/perl Build.PL --installdirs site]
  LDS/GD-2.56.tar.gz
  /usr/bin/perl Build.PL --installdirs site -- NOT OK

I think the problem starts with Checking for stray libgd header files...none found., but I have no idea what i did wrong, or what I could do to make it better.

Please help!!

supplement (2015-09-02)

I've got the hint to install libgd-gd2-perl (See answer from chicks):

apt-get install libgd-gd2-perl

I followed this instruction (as root), but it did change nothing at all. When I executed cpan install GD I've got exactly the same messages as listed above.

supplement (2015-09-28)

Another hint was to install libgd-perl:

apt-get install libgd-perl

When I did, the previous installed package libgd-gd2-perl was automatically removed. After the installation has finished, I tried to install GD with the command

cpan install GD

And at the end I did get exactly the same error message as in May and as three weeks ago:

Warning: No success on command[/usr/bin/perl Build.PL --installdirs site]
  LDS/GD-2.56.tar.gz
  /usr/bin/perl Build.PL --installdirs site -- NOT OK

It's a known and open bug, read here, and I can reproduce this error.

I have copied the following from here, all credits go to @Schwern.

  Build.PL is trying to call a function called prompt but it doesn't
  exist.  This is because they recently switched build systems from
  ExtUtils::MakeMaker (Makefile.PL) to Module::Build (Build.PL) but
  didn't fully convert the program.  I've reported the
  bug.

  Most people don't notice this because the prompting is only necessary
  if GD can't configure itself.  It does this by looking for the
  gdlib-config program.  If that can't be found, or it doesn't work, it
  will ask you for your gdlib configuration.  It's best to let
  gdlib-config take care of that.  Best way to solve this problem is to
  make sure gdlib-config is somewhere in your PATH and that
  gdlib-config --all works.

  Otherwise replace all the instances of prompt with
  Module::Build->prompt and it should work.

And here is the problematic code in Build.pl

my $PREFIX = $lib_gd_path;
if( ! defined($lib_gd_path) )
{
  warn "\n";
  $PREFIX = prompt('Where is libgd installed?','/usr/lib');
}

and here

my ($JPEG, $FT, $XPM, $GIF,$ANIMGIF,$UNCLOSEDPOLY,$FONTCONFIG,$PNG,$FTCIRCLE,$VERSION_33);
if( defined($options) )
{
  $JPEG      = $options =~ m/JPEG/i;
  $FT        = $options =~ m/FT|FREETYPE/i;
  $XPM       = $options =~ m/XPM/i;
  $GIF       = $options =~ m/GIF/i;
  $PNG       = $options =~ m/PNG/i;
  $ANIMGIF   = $GIF && $options =~ m/ANIMGIF/i;
  $VERSION_33= $options =~ m/VERSION_33/i;
  $UNCLOSEDPOLY  = $options =~ m/UNCLOSEDPOLY/i;
  $FONTCONFIG  = $options =~ m/FONTCONFIG/i;
  $FTCIRCLE  = $options =~ m/FTCIRCLE/i;
}
else
{
    warn "\nPlease choose the features that match how libgd was built:\n";
    $JPEG    = lc prompt('Build JPEG support?','y') eq 'y';
    $PNG     = lc prompt('Build PNG support?','y') eq 'y';
    $FT      = lc prompt('Build FreeType support?','y') eq 'y';
    $GIF     = lc prompt('Build GIF support?','y') eq 'y';
    $ANIMGIF = $GIF && lc prompt('Build support for animated GIFs?','y') eq 'y';
    $XPM     = $^O !~ /^freebsd|MSWin32$/ && lc prompt('Build XPM support?','y') eq 'y';
}

and so on.

Try:

sudo apt-get install libgd-gd2-perl

to install the package which will take care of the dependancies you are missing.


Black screen, no access to terminal - should I just reinstall ubuntu Yesterday I downloaded the recommended updates. I then downloaded Minecraft, which meant downloading a Java package and changing a Nvidia setting. As per instructions I performed a shutdown/startup on my Dell Inspiron. It initially opened and I was able to play Minecraft. However, after shutting down have been unable to boot the laptop since. I get a back lit black screen followed by the purple screen, more black with flashing cursor and then the Ubuntu start screen. Then a whole load of commands rush past and we end on a black screen proper. And there we sit. I know something is happening in the background as fans are operating. No matter what configuration of keys I press during the abortive start up, I cannot access the terminal to attempt a repair. I have seen many with questions but no definitive answer. So, I'm seriously tinkering with the idea of just saying bollocks to it all and doing a clean install. Before I lose all data and settings, has anyone got any good news and doesn't require a PhD in IT to execute. Hope everyone is having a better day than me. Cheers.

If this is solely about good news, since this is Ubuntu we're talking about a clean install while keeping all your files is possible (though I would still recommend backing up your data before a clean install).

To do this, boot up the computer using an Ubuntu Live CD (or USB) but don't install anything. Instead open up the folder manager and your partition where your home directory is should be there.

If your home directory is encrypted here's how you do it:
http://www.howtogeek.com/116297/how-to-recover-an-encrypted-home-directory-on-ubuntu/

Solved, but kudos to Thanos and Joe.

Not the ideal solution, as I will have to set everything up again and backup data from ext HD. However, it did fix the problem.

Firstly, I performed a clean install of Ubuntu, effectively wiping the HD.
Next I went back to the original help file at 'How to geek'. This time, however, I did not mess with the driver settings for the NVIDIA. I did download 'openjkd'. After that I just downloaded the Minecraft.jar, following the 'How to geek' guide.

Opened Minecraft and played for minute before closing and shutting down. On start up everything booted without a problem.

I can only conclude that changing driver settings caused the black screen issue.


Is it possible to enter password for sudo only once, and configure it to not require for password on other terminals? I enter my first sudo command. I enter my password. For a while, I wont have to enter my password for subsequent sudo commands.

Now the question. I am someone who opens a lot of terminals. It would be very convenient if I don't have to enter passwords when I use sudo in the terminals I open after my first sudo, for the short time when I wont have to enter password for sudo in the terminal from which I have used sudo for the first time. (Sorry for the long sentence!)

Is it possible? If not, why? If yes, how?

Sure it is. Run sudo visudo and add this line to your sudoers file:

Defaults        !tty_tickets

As explained in man sudoers:

 tty_tickets       If set, users must authenticate on a per-tty basis.
                   With this flag enabled, sudo will use a separate record
                   in the time stamp file for each tty.  If disabled, a
                   single record is used for all login sessions.  This
                   flag is on by default.

By setting tty_tickets to off (that's what the ! means), you enable a single authentication to be shared by multiple sessions.

So here is what you want to do to only have sudo ask for your password once per boot:
/etc/sudoers.d/00_prompt_once:
## Only ask for the password once for all TTYs per reboot.
## See https://askubuntu.com/a/1278937/367284 and
##     https://github.com/hopeseekr/BashScripts/
Defaults !tty_tickets
Defaults timestamp_timeout = -1


Cannot Unbind Super Key from Unity Due to a graphics card compatibility issue using CrunchBang, I was told that my best option would be to move to 12.04 LTS. I'm trying to get everything configured and personalized the way I'm used to things, but am having some issues with unbinding default Unity shortcuts.

I'm used to having all my shortcuts routed through the super key (T for Terminal, W for Web, Up for increased opacity, and so on). I've followed instructions to install compizconfig-settings-manager, and did an advanced search for all keyboard shortcuts binding to the super key, including the Unity shortcuts, but Unity still seems to listen for that keypress, and thus neither compiz nor the keybindings set up in system prefs -> keyboard receive the commands I give them.

(I did try also to simply change the unity launcher key instead of disabling it as shown below -- neither worked)

Believe Unsettings will let you do that.

sudo add-apt-repository ppa:diesch/testing
sudo apt-get update
sudo apt-get install unsettings

This worked for me on Ubuntu 12.04 precise, without Compiz.

In dconf-editor: con → canonical → unity-2d → launcher and untick the 'super-key-enable' option.


How do I use a 4GB USB flash drive to install Ubuntu 12.10? I've downloaded "ubuntu-12.10-desktop-amd64" and used Pen Drive Linux to get it onto my USB.  I then restarted my computer (a Windows 7 Home Premium edition) and entered the boot menu to have it boot from the Sandisk USB (it called it Sandisk Cruzer Cruzer).  Linux came up and asked if I wanted to try or install.  I picked install, connected to my Wi-Fi, and installed it.  After my laptop restarted, Windows booted immediately.  I have tried several times and cannot get a choice between the two.

P.S.
I have used the Windows Installer, Wubi, but at the last second it gave me some kind of error.

First of all you should remove any current Ubuntu or Wubi installation.
Next download Rufus, an easy tool for creating bootable USBs.
Download the prefered Ubuntu image from Ubuntu Download Section.
Open Rufus and write the image on the USB (it is very easy).
Reboot your PC after finishing, and change the boot order to boot from USB.
Once the installation window comes up, click Install Now.
Lastly, choose Run Ubuntu alongside Windows 7.

I'm pretty sure there will be a bootloader in order to choose between the two OSes.

Or you can also use the Universal USB Installer if you have through windows.
It is more easy that way.


swapon -a doesn't turn on swap I used sudo swapoff -a && sudo swapon -a, but swapon is not turning the swap back on, although on my older machines this always worked for cleaning up swap. What could be wrong? Ubuntu 16.04.

EDIT:

$ sudo blkid
/dev/sda1: UUID="6ead6194-b15f-4108-b71c-f91bac560daf" TYPE="ext4" PARTUUID="e8b65a13-5140-4b3b-9a09-565c3283fd0d"
/dev/sdb1: LABEL="big" UUID="cdfd673f-a33f-46cd-81e4-e3c6c1e9b902" TYPE="ext4" PARTUUID="1df024fd-cf87-40e8-9347-4c4073fcf9ca"
/dev/sdc1: UUID="644fe734-074a-4801-b2b8-fdff946d438d" TYPE="ext4" PARTUUID="ebd3d525-9edf-4a50-b6ea-bd745e03bb7c"
/dev/sdc2: UUID="05e01b5a-915c-4fe7-9ed1-5a1c5224fce9" TYPE="swap" PARTUUID="ca7cbc08-535a-4c18-9afd-c4b7553155c5"
/dev/sdc3: PARTUUID="d7edea62-ee24-49d0-8818-a4445d5cca7b"

$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=644fe734-074a-4801-b2b8-fdff946d438d /               ext4    errors=remount-ro 0       1
# swap was on /dev/sda5 during installation
#UUID=9bb0f54c-3d82-4376-9e07-a0c3dd7aae69 none            swap    sw              0       0

#added
UUID=cdfd673f-a33f-46cd-81e4-e3c6c1e9b902 /disk2               ext4    errors=remount-ro 0       1
UUID=6ead6194-b15f-4108-b71c-f91bac560daf /disk3               ext4    errors=remount-ro 0       1

$ cat /etc/crypttab
cat: /etc/crypttab: No such file or directory

The swap partition is not identified in the /etc/fstab file.  Thus when you do a swapon -a, there is no swap file to add.

Based on your blkid output, there is a swap partition present on /dev/sdc2 which is NOT in your fstab listing.

Thus you could add a line such as the following to your fstab:

 /dev/sdc2   none     swap      sw     0 0

Or if you insist on using UIDs:

 UUID=05e01b5a-915c-4fe7-9ed1-5a1c5224fce9   none   swap   sw    0 0

There is a more simpler way.
I assume you want a 4gb swap on file?
Just follow my instructions :)

dd if=/dev/zero of=/mnt/myswap.swap bs=1M count=4000

Make the Swap:

mkswap /mnt/myswap.swap

Do swapon

swapon /mnt/myswap.swap

Now the final step :)

nano /etc/fstab

now you just add this to the end of the File:

/mnt/myswap.swap none swap sw 0 0

and save the file and your done!
Hope it helped. If it helped, please do an upvote!


How do I adjust the screen contrast? I am using an Acer Aspire 3680 with Intel GMA 950 video running Ubuntu 16 and I cannot find the command to adjust the screen contrast setting. Too many colors and grays are washed out on the current setting.

What command or graphical utility will do this?

On command line (Terminal), try writing

xgamma -gamma 0.3

You should see a very noticeable difference. Experiment with different values. 1.0 is normal value. Setting a lower gamma will increase the contrast of bright values (decrease white washing), and setting a higher gamma will increase the contrast of dark values (but increase white washing).

Enabling the setting for creating Negative screen contrast may help you. Here is the link-

How do I change screen contrast?


Unable to write to Samba NTFS share from Windows7 I've been trying to enable writing from Windows 7 to a samba share mapped to a NTFS-formatted USB Disk for the last 3 hours without any success.

I can access the mount point without any issues from the Ubuntu server itself, but no matter how I mount it I always get "You need permission to perform this action" when attempting to create/modify/delete files/folders from my Windows 7 computer.

I'm now out of ideas, so help is very much appreciated!

Samba configuration:

[global]
server string = serv
netbios name = serv
workgroup = WORKGROUP
wins support = yes

guest account = nobody

security = user
map to guest = bad user
encrypt passwords = true
passdb backend = tdbsam
obey pam restrictions = yes
unix password sync = no
pam password change = no

; lanman auth = yes
ntlm auth = no
lanman auth = no
client ntlmv2 auth = yes

socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192

load printers = no
printable = no

log file = /var/log/samba/log
log level = 3
max log size = 1024
syslog only = no
syslog = 0

[external]
comment = "External USB Drive"
path = /media/usb0
browseable = Yes
force user = media
force group = media
read only = No
public = yes
guest ok = yes
create mask = 0666
directory mask = 0777
hide dot files = false

Directory permissions:

drwxr-xr-x 11 root  root  4096 Nov 28 17:51 /media/
drwxrwxrwx  2 media media 4096 Nov 28 17:51 /media/usb0/
# (media gid=1001 uid=1001)

Attempted mount options:

sudo mount -t ntfs-3g -o uid=1001,gid=1001 /dev/sdb1 /media/usb0
sudo mount -t ntfs -o uid=1001,gid=1001 /dev/sdb1 /media/usb0
sudo mount -t ntfs -o uid=1001,gid=1001,umask=000 /dev/sdb1 /media/usb0
sudo mount -t ntfs -o uid=1001,gid=1001,umask=000,defaults,users,locale=en_US.UTF-8 /dev/sdb1 /media/usb0

Simply renaming the share to something else seemed to have fixed the issue. Got the idea from this serverfault answer.

[2015/12/03 21:49:01.868322,  3] ../source3/smbd/dosmode.c:158(unix_mode)   unix_mode(test) returning 0666
[2015/12/03 21:49:01.868789,  2] ../source3/smbd/open.c:972(open_file)   media opened file test read=No write=No (numopen=2)

Despite the fact that samba returns default 0666 permissions, the files have no rw access. And since you mentioned that on Linux side is fine try adding this option in the config:
writeable = yes

Default is 'no', which must mean that the share is read only.
This is just a wild guess. Anything can be wrong with these smb shares :-P


Wifi disabled, have to turn off and turn on Aye,
i recently moved to Xubuntu 15.04 and from time to time when I wake up laptop from suspend wifi cannot connect. It says networking disabled. I tried turnig on option "Enable networking" but that gives me nothing. I have to restart laptop (and It's also a problem as sometimes turning off or trying to restart just logs me off, i have to turn it off the hard way) and then it works.
Any suggestions?

I had a similar problem on Xubuntu, try to run

sudo apt-get autoremove
sudo apt-get autoclean
sudo dpkg --configure -a

Then restart the PC. Also, you can check for additional drivers on the driver Utility.

If the problem persist, look at

dmesg

And attach the output on a text file.

Also, you can see this entry: WiFi Issues

Yeah, seems a little harsh. Possibly an accidental click?

At any rate, have you tried this:

http://www.techytalk.info/ubuntu-fix-network-stopped-working-after-resume-from-sleep/

And if you are struggling to follow that solution, paste the results of "sudo lsmod" and we can go from there.


How to add a shell script to launcher as shortcut Possible Duplicate:
  How can I edit/create new launcher items in Unity by hand?
  How can I create launchers on my desktop?

I want to add some shell scripts in my launcher as shortcuts..

They are located deep inside and i have to navigate to it every time to execute them...

I tried this link where the 2nd answers seems to solvee it but as said in comments neither can i find any option to add a launcher..

I guess it existed in 11.04 with a "+" button on launcher but i use 12.04.

So how do i get this working?? And i need those commands everytime for sure..!

Create *.desktop file, location depends on if it is for personal use or all users. If these directories do not exist, create them.

For personal use , ~/.local/share/applications

gedit ~/.local/share/applications/name.desktop

For all users, /usr/local/share/applications/ (or /usr/share/applications/ depending upon your system).

sudo -i gedit /usr/share/applications/name.desktop

Paste below text

[Desktop Entry]
Type=Application
Terminal=true
Name=unmount-mount
Icon=/path/to/icon/icon.svg
Exec=/path/to/file/mount-unmount.sh

edit Icon= and Exec= and Name=

Also Terminal=True/false determines whether the terminal opens a window and displays output or runs in the background
put this in unity panel by dragging it from files manager

logic is very simple that unity panel allows *.desktop files as launcher though I haven't tried it because I use Natty.

What @vipara said is mostly correct, except that I also found /usr/local/share didn't work for me. Also, you will need to run sudo update-desktop-database after adding this file in order to refresh the launcher apps. Also, there is a much easier way to create the .desktop files. First, make sure you have the gnome-panel installed (it was pre-installed on my 12.04 Ubuntu):

sudo apt-get install --no-install-recommends gnome-panel

Once you have this command, then you can run:

gnome-desktop-item-edit ~/Desktop/ --create-new

This will bring up a nice GUI window where you can select the application, icon, etc. It will dump the .desktop file on your desktop (or wherever you direct it), so you'll still need to sudo mv it to the applications folder and update the desktop database afterwards

Launchers are saved in /home/myusername/.local/share/applications


What is the syntax for IF/ELSE in bash? I am trying to pull logs and doing few others things directly. written a small line BASH but not working. I am sure thats with IF Condition.

sed -rne '/21:25:07/,/21:50:07/ p'  server.log.2015-04-21 > /tmp/filename.log ;
du -sh  /tmp/filename.log ;
if [`du -sh  /tmp/filename.log` -gt 0] then gzip /tmp/filename.log ;

You missed couple of points, the correct (Only syntatically) form would be:

if [ `du -sh  /tmp/filename.log` -gt 0 ]; then gzip /tmp/filename.log; fi

There must be space after test ([) and before ]
You need to put a ; (synonymous to newline) after first if condition
You need to close the if condition using fi at last portion

Also you should use $() instead of  `` as command substitution as the latter one is deprecated in favor of $().

So, literally you command can be made more robust:

if [ $(du -sh  /tmp/filename.log) -gt 0 ]; then gzip /tmp/filename.log; fi

Most importantly, there is another major problem in your if condition, you are comparing a string (output of du -sh  /tmp/filename.log) with an integer (0), which is wrong.

You can do the following:

if [ $(du -s ./test.txt | cut -f1) -gt 0 ]; then gzip /tmp/filename.log; fi

Or simply:

[ $(du -s ./test.txt | cut -f1) -gt 0 ] && gzip /tmp/filename.log

In the last command, the command after && will be run only if the previous command returns an exit status 0 i.e. success. So, you don't need an if condition after all.

Also if you are using bash, try to use the bash keyword [[ instead of test [ as it provides lots of features that test does not. So your command could take the following final form:

[[ $(du -s ./test.txt | cut -f1) -gt 0 ]] && gzip /tmp/filename.log

Or the simplest way:

[[ -s /tmp/filename.log ]] && gzip /tmp/filename.log

The -s indicates that if the file is greater than 0 in size then  will return true.

if [ `du -sh  /tmp/filename.log` -gt 0 ]; then gzip /tmp/filename.log; fi

The spaces in if condition and fi at the end to close the if


Installing Ubuntu onto USB - nothing happening? I'm trying to install Lubuntu 16.10 to run off a USB stick in an HP Proliant Microserver Gen8. I created a Lubuntu (2Gb) USB stick using Rufus and booted from it, then inserted a 2nd USB stick (16Gb) to install onto, and started the installation process. I selected the 16Gb partition to install onto (with an EXT3 partition), clicked OK on all the warnings then selected the option to start the installation. Then.....nothing. The clock span for a few minutes, then disappeared. Task manager is showing 0% CPU usage. I've now repeated this twice and the same thing happened both times. The install seemed to disappear without trace. How can I tell what is happening with the installation process?

An Ubuntu installation that gets stuck in the middle is often caused by a defect in the target installation media, in your case the 16GB USB stick. In fact if you try to install Ubuntu again on the same drive, it will often get stuck again at approximately the same stage of the installation process.

Your situation is complicated by the fact that there are USB two flash drives, either of which could be causing the problem. The first step is to run a Lubuntu live session from the 2GB USB flash drive. If the Lubuntu live session runs without any problems, that rules out a possible problem with the 2GB USB flash drive. The next step would be to try repeating the Lubuntu installation on a different 16GB USB flash drive if you have one.

I have posted another answer about how to do a full installation of Ubuntu on a USB flash drive that also may be helpful, especially the four bullet points at the end.

you did not partition the 2 nd usb correctly. I think you should partition that 16 gb stick into two partition ; one as logical swap area having size equal to 1gb approx and other primary partition as ext4.Partition the disk correctly.


What's the easiest way to set up a LAMP stack? I set up a new VPS instance of Ubuntu and am wondering what the easiest way is to get up and running with a basic LAMP stack (i.e. which packages are required, which configuration options need to be tweaked, if any, etc.).

sudo apt-get update
sudo apt-get install tasksel
sudo tasksel install lamp-server

It will install all the basic LAMP stack for you, prompt for MySQL root password, etc.

More specifically it will install the following packages, and their dependencies.

mysql-client-core-5.1 libwrap0 apache2
libaprutil1-dbd-sqlite3 tcpd
libapache2-mod-php5 apache2.2-common
apache2-utils php5-common
libaprutil1-ldap libaprutil1
php5-mysql mysql-server-core-5.1
libdbi-perl libplrpc-perl mysql-server
apache2.2-bin libdbd-mysql-perl
libhtml-template-perl
libnet-daemon-perl libapr1
mysql-server-5.1 libmysqlclient16
ssl-cert apache2-mpm-prefork
mysql-common mysql-client-5.1

You might also want to take a peek at the Ubuntu Server Guide.

Try EHCP (easy hosting control panel) ...

ehcp installation on a clean server will do the dirty job for you ...


Unable to correct problems, you have held broken packages After upgrading from 10.04 to 12.04 I am trying to install different packages.
For instance ia32-libs and skype (4.0).

When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.

Output of commands:

sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

After running this:

sudo dpkg --configure -a
foo@foo:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

That particular error message may indicate that you have held packages, but it may also indicate a different problem.
You can get a list of actual held packages with:
dpkg --get-selections | grep hold

If there are none, or none look related, then it's probably something else.  Check carefully the output of the command you were trying when you got the error message, as there may be other clues in the full output from that command, aside from the error message.
Another method of troubleshooting may be to use aptitude rather than apt-get to try to install your package:
sudo aptitude install <packagename>

Aptitude will give up less easily and will attempt to find solutions that may involve modifying other packages.  It may give you more explanation of the problem and options for fixing it.
Occasionally aptitude will be too eager to remove or downgrade large numbers of packages to satisfy your request, in which case retrying with -f changes its priorities and helps it come up with solutions that involve removing/downgrading fewer packages even if it means not all changes you requested can go ahead:
sudo aptitude -f install <packagename>

Edit: this is an old answer, and since it was written a newer APT front end, simply titled apt, has become the preferred command line APT interface for end-users.  It is still not the Swiss army knife that aptitude is, but it's a bit more human-oriented than apt-get. I haven't taken the time to investigate how it would help in the above scenario, but it's worth using.

I was facing the same issue while upgrading from 14.04 LTS to 16.04 LTS. You need to track the broken package and recursively try re-installing or upgrading it.
First, remove all dependent libraries (autoremove) and install all missing libraries using sudo apt-get -f install (-f means --fix-missing)
sudo apt-get autoremove
sudo apt-get -f install
sudo apt-get update
sudo apt-get upgrade

Install ubuntu toolchain from PPA
sudo add-apt-repository ppa:ubuntu-toolchain-r/test

Then install aptitude.
sudo apt install aptitude

aptitude package manager is a much more handy installer than apt-get. It also suggests resolving conflicting dependencies and broken packages. The following were the conflicts in my system. They may differ from yours but the high-level method to resolve them would be the same.
$ sudo aptitude -f install build-essential
The following NEW packages will be installed:
  build-essential cpp{a} cpp-5{a} g++{a} g++-5{a} gcc{a} gcc-5{a} libasan2{a} libcc1-0{ab}
  libcilkrts5{a} libgcc-5-dev{a} liblsan0{ab} libmpx0{a} libstdc++-5-dev{a}
The following packages will be upgraded:
  gcc-5-base libstdc++6{b}
2 packages upgraded, 14 newly installed, 0 to remove and 5 not upgraded.
Need to get 29.6 MB of archives. After unpacking 100 MB will be used.
The following packages have unmet dependencies:
 liblsan0 : Depends: gcc-9-base (= 9.3.0-10ubuntu2~16.04) but 9.3.0-11ubuntu0~14.04 is installed.
 libcc1-0 : Depends: gcc-9-base (= 9.3.0-10ubuntu2~16.04) but 9.3.0-11ubuntu0~14.04 is installed.
 libstdc++6 : Depends: gcc-9-base (= 9.3.0-10ubuntu2~16.04) but 9.3.0-11ubuntu0~14.04 is installed.

Aptitude gives sometimes provides a viable potential solution. Such as upgrading or downgrading other libraries to solve the conflict. In my case, there was no solution. Hence I need to further track down the dependencies.
As build-essential needs gcc-5.
$ sudo apt-get -f install gcc-5

The following packages have unmet dependencies:
 gcc-5 : Depends: cpp-5 (= 5.5.0-12ubuntu1~16.04) but it is not going to be installed
         Depends: gcc-5-base (= 5.5.0-12ubuntu1~16.04) but 5.4.0-6ubuntu1~16.04.12 is to be installed
         Depends libcc1-0 (>= 5.5.0-12ubuntu1~16.04) but it is not going to be installed
         Depends libgcc-5-dev (= 5.5.0-12ubuntu1~16.04) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

But gcc-5 in turn depends on cpp-5
$ sudo apt-get -f install cpp-5

The following packages have unmet dependencies:
 cpp-5 : Depends: gcc-5-base (= 5.5.0-12ubuntu1~16.04) but 5.4.0-6ubuntu1~16.04.12 is to be installed

cpp-5 depends on gcc-5-base. Here you can see there is a specific conflict. Aptitude gives multiple choices to solve the conflict. In my case upgrading the libstdc++6 solved the problem.
$sudo aptitude -f install gcc-5-base
The following packages will be REMOVED:
  gcc-5-base{u}
0 packages upgraded, 0 newly installed, 1 to remove, and 6 not upgraded.
Need to get 0 B of archives. After unpacking 67.6 kB will be freed.
The following packages have unmet dependencies:
 libstdc++6 : Depends: gcc-5-base (= 5.4.0-6ubuntu1~16.04.12) but it is not going to be installed.
open: 115; closed: 488; defer: 35; conflict: 58                                                          .The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     gcc-5-base [5.4.0-6ubuntu1~16.04.12 (now, xenial-security, xenial-updates)]

Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

      Upgrade the following packages:
1)      libstdc++6 [5.4.0-6ubuntu1~16.04.12 (now, xenial-security, xenial-updates) -> 9.3.0-10ubuntu2~16.0

Finally, now the conflict is resolved try installing build-essentials again.
$ sudo aptitude -f install build-essential


Problem with setting static ip on Ubuntu Server 14.04 I have a problem setting static ip on my Ubuntu Server 14.04 LTS.

I run the command sudo nano /etc/network/interfaces and than change dhcp to static
and then I type address,netmask,network,gateway,dns-nameservers  and then I try to do simply ping command but its not working for let say (ping yahoo.com) i get error (ping: unknown host yahoo.com) and sometimes destination unreachable.

I also tried to connect throught putty but thats only local ip.What i need actually is a real IP(like this 109.92.21.200) so i can connect throught putty which i have on my laptop and connect to server which is desktop on port 22 which is open but i constantly getting error like Connection timed out or Connection refused.
Can somebody tell me solution of problem and show me that.

Thanks in advance.

When I needed to set a static IP address for my ubuntu pc, I did it from the router rather than trying to set it from the pc.

The router then sets the IP address given in the router table for the device on each power up.

You do not need to change /etc/network/interfaces or any part of your config beyond your dns servers!

The issue is different flags being set for dnsmasq for static ips vs dynamic ip addresses. For static ip address, dnsmasq sets --proxy-dnssec by default. Most IPS do not provide dnssec capable dns servers and therefore dnsmaq timesout. If you set the ip addresses for the dns servers in network manager to a publicly offered dns server with dnssec (google is a good one: 8.8.8.8, 8.8.4.4) everything goes back to working.  You do not need to override resolve in any other way.


Repair package catalogue in ubuntu 12.04 due to Pidgin facebook chat Plugin I tried to install facebook chat plugins for Pidgin, and the package was broken. So, now I can't install or remove any package. The software center is showing Repair package catalog dialogue. I tried to run dpkg --configure -a, the following is the output:

dpkg: dependency problems prevent configuration of pidgin-facebookchat:
pidgin-data (1:2.10.3-0ubuntu1.3) breaks pidgin-facebookchat (<< 1.69-2) and is installed.
Version of pidgin-facebookchat to be configured is 1.69.
dpkg: error processing pidgin-facebookchat (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
pidgin-facebookchat

what should I do to repair the problem? Please help.

I just had the same problem. It helped for me to uninstall the plugin again. So open a terminal window and enter:

sudo apt-get remove pidgin-facebookchat

I hope this will help.


What are PPAs and how do I use them? I keep reading about Personal Package Archives ('PPAs') and people answer questions with a link to a PPA. What's the best way to use these?

There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience, an index of each is below.

Ubuntu 11.04 and newer
Ubuntu 10.10
Ubuntu 10.04
Command Line

What is a PPA?
Removing a PPA

For Ubuntu 11.04 and newer

Before adding a PPA you should be aware of some of the risks involved:

Are PPA's safe to add to my system and what are some "red flags" to watch out for?

Always remember that PPAs are provided by the community, you should be aware of the possible risks before just adding a PPA.

First open the dash by either clicking on the Home button (On the top-left Corner) or pressing the Super Key .

Search for 'Software Center' and launch the Ubuntu software center.

Move the mouse to the top panel where the name of the application is written.
Now Go to the Edit menu and select Software Sources.

For newer versions,  right click and click Software and Updates

Then, click Other Software,

Enter your password when prompted.

Switch to the 'Other Software' tab.

Now  click 'Add', a box will appear.

You have to enter the PPA in the box. It can be found in BOLD on the launchpad page.

Now click 'Add source' and close the Software Sources. The cache will be refreshed

Now install the software from the software center.

http://www.winehq.org/site/download-deb  is my attempt at doing this for the Wine PPA.

I'll note that Maverick changed and now I have to edit the instructions again (there is no more administration->software sources but instead you have to go there from Software Center).

Launchpad's built in instructions are a bit better than they were a year or so ago, but still pretty bad.


Is there a way to completely remove "recently used" from open and save dialogs? I never use Recently Used file lists; I have a filing system so I know where I want to open and save files.

I've read this question:

Can I stop apps from selecting "Recently Used" by default in file chooser dialogs?

However, I just want this option completely removed.

It's an annoyance to have to keep navigating away from the default.

Failing the above is there a way to make my home directory the default?

Thanks to saji89 for linking to the affected files. In case anyone still cares about this (and also for myself, because a recent upgrade allowed it to slip back in), I've created a patch (http://pastebin.com/VE4STB6M) to fix this annoying misfeature. The patched gtk will still show "Recently Used" in dialogs, but it will not be selected in the dialogs by default (it will default to the last directory used or to your home directory). For me, this fixes the problem, because my main gripe was having it pop up in my face, especially when trying to save something.

Step by step instructions:

1) Open a terminal window and enter the following commands:

mkdir recently_used_fix

cd recently_used_fix/

sudo apt-get build-dep gtk+2.0

apt-get source gtk+2.0

wget -O deselect_recently_used.patch http://pastebin.com/download.php?i=VE4STB6M

patch -p0 < deselect_recently_used.patch

cd gtk+2.0-2.24.10/

echo jlj | dpkg-source --commit

sudo dpkg-buildpackage

cd ..

2) Close any package managers (such as Synaptic) and enter the following command in the terminal window:

sudo dpkg -i *.deb

3) If the dpkg -i command gives errors about overwriting a handful of existing files (changelogs and such), use sudo rm FILENAME to delete each file it complained about, then repeat step 2. I noticed --force-overwrite doesn't seem to work for that, for whatever reason.

4) Optional: Once the packages are successfully installed, use Synaptic to pin/hold (Package > Lock Version) each installed package, to avoid having to go through all this again (of course you would also miss any security updates).

5) Close and re-open any affected apps (pluma, gedit, gimp, etc) and enjoy your annoyance-free open/save dialogs!

6) Optional: Enter the following commands in the terminal window to remove the files and directories we created (the fix will remain installed):

cd ..

sudo rm -rf recently_used_fix/

In case the patch cannot be downloaded, here is a backup copy:

--- gtk+2.0-2.24.10/gtk/gtkfilechooserdefault.c 2011-11-08 10:20:20.000000000 -0700
+++ Downloads/gtk/gtk+2.0-2.24.10/gtk/gtkfilechooserdefault.c   2012-07-10 17:20:38.000000000 -0700
@@ -5971,10 +5971,18 @@ gtk_file_chooser_default_map (GtkWidget

   if (impl->operation_mode == OPERATION_MODE_BROWSE)
     {
+      GFile *folder;
+
       switch (impl->reload_state)
         {
         case RELOAD_EMPTY:
-     recent_shortcut_handler (impl);
+          /* The user didn't explicitly give us a folder to display, so we'll
+           * use the saved one from the last invocation of the file chooser
+           */
+          folder = get_file_for_last_folder_opened (impl);
+          gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (impl), folder, NULL);
+          g_object_unref (folder);
+     /* recent_shortcut_handler (impl); */
           break;

         case RELOAD_HAS_FOLDER:
@@ -6005,8 +6013,8 @@ gtk_file_chooser_default_unmap (GtkWidge

   settings_save (impl);

-  cancel_all_operations (impl);
-  impl->reload_state = RELOAD_EMPTY;
+  /* cancel_all_operations (impl);
+  impl->reload_state = RELOAD_EMPTY; */

   GTK_WIDGET_CLASS (_gtk_file_chooser_default_parent_class)->unmap (widget);
 }

I found a way to at least prevent zeitgeist from creating a history at all (I think):

rm ~/.local/share/zeitgeist/activity.sqlite
mkdir ~/.local/share/zeitgeist/activity.sqlite

Since then I have had no activity of mine logged in any way, including a "recently used" dialog. Sadly, it still pops up, but at least it won't tell which folders I visited recently. I do not like it when I'm permanently monitored, even if it is my own machine.

The worst thing of all is that even if you disable logging in zeitgeist and clear the history, it does a incomplete job and still happily logs some activities.


I disabled secure boot and I get an error message when I boot. Ubuntu 19.10. This is the error generated after updating the kernel My Ubuntu19.10 shows the following prompt when booting,I'm looking for a solution, my PC works,I just don't want to see an error,If you have encountered a similar issue and have already resolved it,Please take a moment to tell me, thank you!

[    0.683181] Couldn't get size: 0x800000000000000e
[    0.683197] MODSIGN: Couldn't get UEFI db list
[    0.683659] Couldn't get size: 0x800000000000000e
[    0.683672] Couldn't get UEFI MokListRT
[    0.684138] Couldn't get size: 0x800000000000000e
[    0.684151] Couldn't get UEFI dbx list

Just now, the problem was resolved.

Edit file:

sudo vi /etc/default/grub

Modify the value of this line:

GRUB_CMDLINE_LINUX_DEFAULT="quiet loglevel=0 splash"

then:

sudo update-grub

nice!!!

original


How to remove items from Places sidebar in Nautilus 3.6? I am attempting to remove bookmarks from the Places sidebar in Nautilus 3.6. Specifically, I would like to remove the "Pictures" item.

I have found answers for older versions in which one can remove or edit entries in ~/.config/user-dirs.dirs. However, this does not seem to work in 3.6. I am running Ubuntu 12.10 with Gnome.

Removing things in the bookmarks menu does not seem to change anything and the option to remove by right clicking is grayed out.

Thanks!

You need to comment out entries in the following file:

~/.config/user-dirs.dirs

Right click on each item and select Remove! You can manage them from bookmarks menu too.

Edit: For Places you can delete/rename the folder from home directory. I have removed Music from home folder and now it is not in left list.