How do I restrict my kids' computing time?

Ubuntu <= 11.10 User's follow this guide for Ubuntu User's >= 11.10 read the Bottom page notice :

Yes all of those programs are out of date and all your questions are answered here and good look with your parent control.....

When we talk about forcing a user to log off, what we’re really talking about is implementing time restrictions on the account for system access or services. The easiest way I’ve found to implement time restrictions is using a plug-in module called Linux-PAM.

Pluggable Authentication Module (PAM) is a mechanism for authenticating users. Specifically, we’re going to use the pam_time module to control timed access for users to services.

Using the pam_time module, we can set access restrictions to a system and/or specific applications at various times of the day as well as on specific days or over various terminal lines. Depending on the configuration, you can use this module to deny access to individual users based on their name, the time of day, the day of week, the service they’re applying for, and their terminal from which they’re making the request.

When using pam_time, you must terminate the syntax of each line (or rule) in the /etc/security/time.conf file with a newline. You can comment each line with the pound sign [#], and the system will ignore that text until the newline.

Here’s the syntax for a rule:

  services;ttys;users;times

The first field —  services — is a logic list of PAM service names.
The second field — tty — is a logic list of terminal names.
The third field — users — is a logic list of users or a netgroup of users.
The fourth field — times — indicates the applicable times.

Here’s an example of a typical set of rules:

login ; * ; !bobby ; MoTuWeThFr0800-2000
login ; * ; !root ; !Al0000-2400
http ; * ; !bobby ; MoTuWeThFr0800-2000
http ; * ; !root; !Al0000-2400

These rules restrict user bobby from logging on between the hours of 0800 and 2000, and they also restrict Internet access during these hours. Root would be able to logon at any time and browse the Internet during all times as well.

Note: The system logs errors with these rules as syslog(3).

With Ubuntu Linux, it is possible to assign to your computer time restrictions, to prevent the connection of one or more users to your system. With the time restrictions, you can, for example, limit access to the computer for your children (a kind of parental control, in short), or even protect the connection to your server during certain hours.

Manual Configuration

Understand what you will do

Throughout this tutorial, we will use PAM (Pluggable Authentication Modules, English Pluggable Authentication Modules). It allows you to control user authentication when they connect. Then, we will use the security configuration files to define logon hours allowed.
These manipulations can be performed on any version of Ubuntu, and require only a simple text editor (vim, emacs, nano, gedit, kate, to name a few).
Enable Restrictions hours via the PAM Module

First of all, first go to the /etc/pam.d/, where is all configurable services:

$ Ls /etc/pam.d/
atd common-account common-session gdm login ppp sudo
chfn common-auth cron gdm-autologin Other samba
chsh common-cupsys gnome-screensaver password passwd su

If we want to block the connection to the computer, we will have to change the gdm service. Edit the file so gdm and add this line of code (at the end of file):

account required pam_time.so

GDM is the login screen distributions Ubuntu, Edubuntu and Xubuntu. For Kubuntu, which uses KDE, kdm service is called, it will be the file it will open.
And you're done for configuring the PAM! This will enable the control of hours on this service.

If you have a server, you probably do not have no GUI. In this case, GDM / KDM not installed and the connection will not be blocked. To prevent connection to TTY, you must modify the login of the same file, and add the same line of code than previously acknowledged. This action also applies to people who have installed a GUI and want to block access to the login screen and terminals.

Configure Access Hours

Now that the PAM service has been activated, we only have to configure access times. Open the /etc/security. Several configuration files are available:

$ Ls /etc/security/
access.conf namespace.conf pam_env.conf
group.conf namespace.init time.conf
limits.conf opasswd time.conf.bak

Edit the file time.conf. Some explanations and examples (English) introducing the. To set access schedules, copy and paste the following line of code (at the end of the file, as always):

*;*;user;scheduler

Instead of the user field, enter the login account you want to block.

If you want to block multiple users, enter their login in a row, separated by the | operator. For example, if I want to freeze the accounts of Patrick, John and Emily:

*;*;Patrick|jean|emilie;scheduler

By cons, if you want to block access to the system for all users but one in particular, use the! before the person concerned.
For example, if I want access to the computer is denied to all users, except Nicolas and Xavier:

Nicolas *;*;!|xavier;scheduler

Turning now to the field zones. In this field that the selection of days and hours will be allowed connection possible.
You must first specify the day of the week, using the following abbreviations:

Mo : Monday     Fr : Friday     Wd : Sa/Su
Tu : Tuesday    Sa : Saturday   wk : Mo/Tu/We/Th/Fr
We : Wenesday   Su : Sunday
Th : Thursday   Al : All Days

Be careful not to confuse the abbreviations Wk and Wd are misleading! particularly poorly identified on the Internet: you can easily find conflicting information!

Then, we specify the deadlines. These should be formatted 24H, consisting of 4 digits. For example, to restrict 3:17 p.m. to 6:34 p.m., we write: 1517-1834.
To allow Marie to connect only on Tuesday, from 3:17 p.m. to 6:34 p.m., we obtain the result:

*;*;marie;Tu1517-1834

Connections outside of these hours will be banned.
As for users, it is possible to use the operators | and! to indicate several times (the! then indicate that all logon hours are allowed, except those to be shown).

The two stars (wildcards) at the beginning of the line of code are, respectively, and tty services fields. Since you want to block all access to the system, it is unnecessary to specify what service or what tty you want to block.
However, if you want to prevent the use of a particular service, simply specify it as the following example:

login;tty1|tty4|tty5;marie;!Wd0000-2400

Thus, the user marry can not connect to a TTY, 4 and 5 during the weekend.

Some Examples of Restrictions Schedule

mathilde is allowed to connect every day from 1:20 p.m. to 3:20 p.m. and from 4:00 p.m. to 8:30 p.m.:

*;*;mathilde;Al1320-1520|Al1600-2030

Stone, Frank and Florian are allowed to connect to 2:00 p.m. to 6:45 p.m. during the weekdays, and 2:00 p.m. to 10:15 p.m. for the weekend:

*;*;Stone|franck|florian;Wk1400-1845|Wd1400-2215

Olive is never allowed to connect. jessica can log on Wednesday from 1:00 p.m. to 4:00 p.m.:

*;*;olivier;!Al0000-2400
*;*;jessica;We1300-1600

2 different lines, for two different time for each user
Expiration of a Session

When a session expires (it exceeds the time while the user is already connected), the PAM can reach the user. While mathilde connects during the hours of time allowed, it is perfectly free to exceed these hours! For this, we will use a new program: ´cron´. This application executes commands at intervals of time. In our case, we will make use of command ´skill-KILL-u´ to disconnect the user when the session expires.
Handling is very simple. Simply edit the file ´/etc/crontab´. Then add the following line of code:

Minute Hour Day * * (s) root skill -KILL -u User

As before, replacing the Minute field schedules and time desired. Then fill in the day (s) by (s) day (s) banned (s), or simply type an asterisk (*) to indicate all days of the week. Finally, change the field used by the login account to be blocked, and voila!

Days do not notice the same way with the cron jobs! Here is the list of abbreviations to be used with this program:

mon : monday    fri : friday
tue : tuesday   sat : saturday
wed : wednesady sun : sunday
thu : thursday   *  : all hours

Some Examples of cron jobs (with examples of times in the previous section)

jessica can log on Wednesday from 1:00 p.m. to 4:00 p.m.

  -> Disconnect: Tuesday at 4:00 p.m..

00 16 * root * wed skill -KILL -u jessica

mathilde is allowed to connect every day from 1:20 p.m. to 3:20 p.m. and from 4:00 p.m. to 8:30 p.m..

  -> Disconnecting: Daily, 8:30 p.m. to 3:20 p.m. ET.

20 15 * * * root skill -KILL -u mathilde
30 20 * * * root skill -KILL -u mathilde

Stone, Frank and Florian are allowed to connect to 2:00 p.m. to 6:45 p.m. during the weekdays, and 2:00 p.m. to 10:15 p.m. for the weekend

  -> Disconnect (1): Monday, Tuesday, Wednesday, Thursday and Friday, at 18:45.
  -> Disconnect (2): Saturday and Sunday at 10:15 p.m..

45 18    * * mon,tue,wed,thu,fri   root    skill -KILL -u stone && skill -KILL -u franck && skill -KILL -u florian
15 22    * * sat,sun               root    skill -KILL -u stone && skill -KILL -u franck && skill -KILL -u florian

The command skill-KILL-u disconnects the user from the GUI, as well as TTY. It is perfectly usable for server administrators.
However, this command is immediate and the disconnection will be made without notice. It would therefore be preferable to prevent the installation of this device users of the computer or network in question!

It is possible to prevent users with a wall command launched by cron few minutes before the end of the timeframe, that will be displayed in the terminals of all users.

40 18 * * Mon,Tue,wed,thu,fri root echo "end of session in 5 minutes" | wall

To prevent users from GUI can be used in place of the wall command notify-send is in the package libnotify-bin

40 18 * * Mon,Tue,wed,thu,fri stone DISPLAY=:0 notify-send "end of session in 5 minutes"

Ubuntu 11.10 User's

I've seen around user having problems with Pam and i saw alot of bug about that so Why is the reason??? is so simple Ubuntu 11.10 doens't support GDM anymore the new display manager is lightGDM the problem is the follow where store this directive account required pam_time.so i think is in /etc/pam.d/lightdm or /etc/pam.d/lightdm-autologin but bug how ???

so for just around you can check this 2 LightGdm log files :

/var/log/lightdm/lightdm.log
/var/log/lightdm/x-0.log

or run LightGdm in debug mode :

  LightDM --debug

or report a bug :

  ubuntu-bug lightdm

I report the Bug's here so cross your finger and wait....


Is someone trying to hack into my server? What can I do?

From what you describe, it looks like an automated attack on your server. Most attacks are, unless the attacker knows you personally and is holding a grudge...

Anyway, you might want to look into denyhosts, which you can get from the usual repos. It can analyse repeated attempts and will block their IP address. You may still get something in your logs, but it will at least help mitigate any security concerns.

As for getting more information, I really wouldn't bother. Unless they're an amateur, they'll be using a remote server to do their dirty work which will tell you nothing about who they really are. Your best bet is to find the admin for the IP range (WHOIS is your friend here), and let them know that you're getting a lot of access attempts from that IP. They may be good enough to do something about it.


SysV, Upstart and systemd init script coexistence

Only one init system can be active at once. On 16.04, that's systemd.

A number of packages ship with files for multiple init systems, so they can be managed with multiple init systems on different OSes. On Ubuntu, sometimes scripts for multiple init systems get installed, even though they are not all used at the same time.

Newer init systems try to maintain compatibility with older ones. In particular, systemd tries to maintain compatibility with both Upstart and SysV init scripts.

In the case of the "init.d" script you mentioned, that is a "SysV" init script, not an Upstart script. Also, "SysV" init scripts would only be started on boot if they were symlinked to a directory like "/etc/rc5.d". You'll find that Network Manager does not have a symlink installed there.

To understand how systemd manages old "SysV" init scripts, see How does systemd use /etc/init.d scirpts?.

Now, to answer the question about why it works to restart Network Manager with "service network-manager restart". The service command is used with both Upstart scripts and SysV init scripts, preferring the former. Network Manager also has an Upstart script installed on 16.04 at /etc/init/network-manager.conf.

If you review the output of sudo strace service network-manager restart, you can get a sense of what's happening. First, the output shows that systemctl is being called, indicating that the command is being redirected to systemd. First, shortly after it opens /usr/bin/service, you can see it start to read in the file as a shell script:

open("/usr/sbin/service", O_RDONLY)     = 3
...
read(10, "#!/bin/sh\n\n#####################"..., 8192) = 8192

Now that we know that service is a shell script, we can go check out the source code of it. In the source code, we find that is_systemd is detected and set. For the systemd case, you can see that the command gets  rewritten to be systemctl restart network-manager.

So while the three init systems co-exist and have some compatibility, there are layers of complexity. To minimize the complexity of what's happening going forward, it's best to use systemd unit files and the systemctl tool to manage services.


Ubuntu 18.04 Ethernet device not found (WiFi working fine)

The solution was to disable ehci_hcd kernel module loading by creating the following file:

bart@bart:/etc/modprobe.d$ cat blacklist-test.conf
blacklist ehci_hcd

I'm not sure exactly why this works, but it fixed my problem.

If anyone could offer an explanation or comments on side effects of this solution, I would be very grateful!


How to install Blender 2.6 on Ubuntu 13.10

Open the terminal or use the shortucut Ctrl+Alt+t and type:

sudo apt-get install blender

Enter the password and wait for installation complete


Current situation of Samsung 850 EVO 512GB on Ubuntu?

I have a Samsung 850 EVO 250GB SSD. It works fine, and TRIM is enabled automatically by default.


What's the best way to re-install Ubuntu on my dual-boot system?

I'm guessing you use grub to boot? What you would have to do (at your own risk) is to reinstall the conventional way, but choose to use the partition/hard drive that 11.04 is on to install your fresh copy.


How to view 4K videos at lower resolution?

An easy way to view 4K videos is to use latest version of VLC, e.g. 2.2.1, which is now 4K-ready. For some Ubuntu distros, you can install latest VLC from this PPA:
ppa:ed10vi86/video.


Normally in Ubuntu the packages that you can install directly via command line (sudo apt-get install <package>) or software center has the .deb format. Here all the dependencies will be automatically fixed, so you don't need to worry about anything just use the command line or software center to install a package, the package manager will take the  right decision for you.

If you want you can also download the source files (sudo apt-get source <package>) of the packages available at the repositories, normally have the format of compressed archive i.e. tar.gz or tar.bz2 format. Normally you don't need to download the source files of the packages that are already available at the .deb format. If you need to really build from source you can check this.

Now what about a package that is not available at repository? Well, in that case you need to look for a .deb availability of the package. If .deb is found you can install it via dpkg(sudo dpkg -i package.deb), but remember you need to satisfy the dependencies yourself.

What if the .deb format is not available then you can download the source file of the package in .tar.gz ot tar.bz2 or any other format and then uncompresses and compile the package yourself. Normally there would be a README file inside telling what you need to do to install the package.

Opera 32 bit :

In case of Opera 32 bit, go to this page and just hit "Free Download For Linux i386", don't bother about the package format as it will be downloaded as a .deb package (you typically don't need need tar.gz or tar.bz2 when .deb is available). Then install it via command line taking help from here.

Xen2050 made a good point that you can also use official repository or a PPA to download Opera. If you do so you the can just use apt-get as usual to install Opera directly. For example you can do the following to add the official Opera repository and install opera:

sudo bash -c 'echo "deb http://deb.opera.com/opera/ stable non-free" > /etc/apt/sources.list.d/opera.list'
sudo bash -c 'wget -O - http://deb.opera.com/archive.key | apt-key add -'

Now as the repository and GPG key has been added you can just issue the following to install Opera:

sudo apt-get update
sudo apt-get install opera


USB Flash Drive Issue (not mounting or recognized)

The disabled by hub (EMI?) message indicates a hardware issue, most probably with the flash drive but possibly also with the USB port, hub, or cabling.

To exclude cable, hub, or port issues, try plugging the flash drive into a different USB port directly on your computer without any intervening hubs and cables. If the same error still occurs then the flash drive is very probably defective and cannot be saved.


Can multiple operating systems share program installations and user profiles?

Theoretically it can be possible, but only on a case by case basis, ie. it might work for some applications, while it won't work for others.
It has a chance to work only if exactly the same application package version is used in both distributions. Then you can try the following:

install the application in your "primary" distribution
check which files are contained in the package (you can do it with dpkg-query -L packagename)
on the other distribution, create symbolic links in place of all these files, that point to respective files on the mounted partition of the "primary" ditribution
optionally, you can similarly create symbolic links for configuration files/folders of that application in your /home/user directory, but this can be tricky, as it is not always easy to know which particular files/folders the application uses to store config.

In my opinion, even if this may work, it's not worth the effort, as you have to do it for every application manually.


How to add an image to Ubuntu Server 12.04 LTS?

I like using a program named WinSCP. It's a simple drag and drop utility that is free to use.

It is available here.

Make sure you select the SFTP method.


Dell developer edition ubuntu 14.04 super key not working

Dell installs a package dell-super-key that disables this behavior. I did the following to get my super key functioning:

Uninstall dell-super-key:

sudo apt-get remove dell-super-key

Install Compiz Config Settings Manager:

sudo apt-get install compizconfig-settings-manager

Set super key as the option to start the launcher


Why does the Activities button on the Gnome top bar become highlighted when you click on the Applications button in the dock?

I now happen to run the more traditional Gnome 3 workflow myself in Ubuntu but I've seen this question asked elsewhere and wanted to share what took me personally quite a bit of digging to initially understand coming from Unity.  Without really knowing the history of Gnome 3 the connection is a bit odd.

Gnome 3 began life without a "favorite applications" launcher on the desktop itself.  There was simply the Activities overlay that you could select from the left of the top bar.  Once inside this overlay there were two toggle buttons to then change overlay modes:  Windows and Applications.  The Windows mode presented all the current applications that were open and running, and the Applications mode provided access to a complete inventory of all installed applications.  Additionally, there was a "favorite applications" launcher inside this overlay that was the "dash."

At Gnome 3.6, the dual toggle button Windows/Applications mode selector was changed.  The button to access the Applications mode was moved into the bottom of the dash as its own toggle button that most know well.  This was purportedly to improve and simpify the layout of the Windows mode according to official release notes.  To that end, this redesign permitted the removal of the explicit Windows mode button.  It was now just implied that you were always taken to the Windows mode of the Activities overlay first.

Generally speaking, some folks weren't pleased that they didn't have a set of "favorite applications" or a launcher bar by default on the desktop..  With support for shell extensions in play, several options eventually became available.  Ubuntu has adopted a custom variant of Dash to Dock.

This shell extension moved the dash from inside the Activities overlay to the desktop.  In doing so, this somewhat obfuscated the orginal Gnome 3 workflow and the fact that there were technically still two Activities modes -- Windows and Applications.  So much so still, that even though the dash is now "docked" on the desktop, the Applications button within it is still linked to the Activities overlay from a code standpoint.  So when you toggle the Applications button you're actually entering the Applications mode of the Activities overlay.  When you select the Activities button on the top bar you are entering the Windows mode of the Activities overlay.


Virtual Box Settings to automatically run VMs on boot

I had this problem too.  The issue is that the autostart service script is trying to include /etc/vbox/vbox.cfg just like it does with /etc/default/virtualbox.  You need to use a different filename for the autostart config.

Rename /etc/vbox/vbox.cfg -> /etc/vbox/autostart.cfg

Update VBOXAUTOSTART_CONFIG in /etc/default/virtualbox:

VBOXAUTOSTART_CONFIG=/etc/vbox/autostart.cfg


Ubuntu server installer freezes while it should enter the partition area

Yes! ... I would like to Let you know I had succes installing. I dont still dont exactly know what went wrong. The way I had succes was using unetbooting on a 1gb stick. I dont know why the cd failed and the live cd usb creator on the same usb failed.thanks for the reactions!


GNOME Shell: Maximize/switch apps by scrolling in taskbar

There is no need to install another dock extension, the cycle windows feature can be enabled for the Ubuntu dock from command line:

gsettings set org.gnome.shell.extensions.dash-to-dock scroll-action 'cycle-windows'


Add nofail to your fstab entry to avoid dropping into emergency mode when mounting a filesystem that may not be present.

//192.168.1.99/public /mnt/NAS cifs nofail,credentials=/home/hias/.geheim,iocharset=utf8      0       0

source: http://manpages.ubuntu.com/manpages/xenial/man5/fstab.5.html


When Installing Ubuntu from bootable USB, the computer boots to USB but Ubuntu installer does not show up

did dual booting setup fail?

if yes you might make the bootable flash in a wong way or the way you make the flash is the problem ı suggest you to use Unetbootin or Rufus
while making the bootable flash and check if you are using iso for
the right system, for example, _64 or _32
also, it might because of the secure boot or fast boot is enabled try
to close them from booting screen of your laptop .


How to change 'home' on a new Ubuntu 19.04 instal to a second disk drive containing my original 'home' data?

You should mount 1.5TB drive as home. For example if it's device is /dev/sdb1 (check it for your setup) then you should copy your home data to this drive and then add something like /dev/sdb1 /home/YOUR_USER_NAME YOUR_FILE_SYSTEM errors=remount-ro 0 1 to /etc/fstab (replace YOUR_USER_NAME with your user name and YOUR_FILE_SYSTEM with something like ext4, you should find it by yourself). Though it is better to use UUID than /dev path, to find it use blkid /dev/sdb1 and then change /dev/sdb1 in fstab record to something like UUID=a6a3bf01-c3ed-4cd8-8a6a-5d7da7ebcde3. Also you should set correct owner and group (using sudo chown -R) for your new home if it is not.


uninstall adobereader-en 9.5.5 on ubuntu 18.04

Assuming that package was installed with apt earlier. It don't work for Wine apps etc.

Use

apt list --installed adobe*

to search installed packages. If you find what you want uninstall, then

sudo apt purge package_name

where package_name is obviously name of package you want to get rid of found with previous command.

Edit

In this particular situation

sudo apt purge adobereader-enu


This is a web-browser tool, so it will work with any OS as long as they support Chrome. And fortunately, Ubuntu does so.

To install chrome through ppa (from here):

To add key:

wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

To add repository:

sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

Update repository:

sudo apt-get update

To install chrome:

sudo apt-get install google-chrome-stable


I already resolved the issue.
The problem was my executable USB was in NTFS format, but FAT32 only is supported.

So the solution was to create executable USB with Windows installer in FAT32, after that I saw my USB as boot option.


How to share folders between two PC's with Ubuntu via WIFI

Check out SAMBA,

Complete tutorial here

Samba Share Ubuntu


To install from the download, you should have changed directory to the DEBS folder in the archive.

You then should have according to the readme you would have used

sudo dpkg -i *.deb

In this post https://ask.libreoffice.org/en/question/22466/how-to-uninstall-libreoffice-on-ubuntu-in-terminal/ they say you can use:

sudo dpkg -P libreoffice

I might try to change into the DEBS folder again, and use:

sudo dpkg -P *.deb

But I have not tried it.

According to this:  https://help.ubuntu.com/12.04/serverguide/dpkg.html

Uninstalling packages using dpkg, in most cases, is NOT recommended. It is better to use a package manager that handles dependencies to ensure that the system is in a consistent state. For example using dpkg -r zip will remove the zip package, but any packages that depend on it will still be installed and may no longer function correctly.


Installing Ubuntu on a MSI GS65, freezes at login screen

The problem, that the installation freezes, has been fixed by the Ubuntu 18.04.2 LTS version. It comes with the 4.18 kernel by default and lets you install Ubuntu without any problem. However, after installation, it still freezes after attempting to log in.
To fix this, you have to boot your the Linux kernel with the nomodeset option. Here's what you do:

Follow this instruction on how to boot your Linux kernel with the nomodeset option.
Log into your computer (It will be in 800x400 pixel mode)
Enter the terminal with ctrl + T
Install the latest Nvidia driver. It occurred to me, that it's easier to install the driver from the graphics-drivers repository than from Nvidia directly. To find out the latest driver version, go to the Nvidia drivers page and type in your GPU information (GTX1070, Linux-64bit). Right now it is version 430. Then run:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-driver-430

(if the last step failed, try sudo apt-get install nvidia-430)

Now reboot your computer and you should be set. Validate the driver installation by running nvidia-smi in a terminal.


Kubuntu: Broken Plasma Desktop after accidentally removing packages

Sorry for the previous comment.

After some tests I managed to recover my KDE desktop by installing all the libqt5* packages.

apt-cache search libqt5 | awk '{print $1}'| grep -v "\-dev" | grep -v "\-dbg"

I was not able to detect the exact missing packages so this solution is a little a "brute force" one.

After the install you need to logoff / logon and the KDE desktop should be  right in place.


Ubuntu really has no control over what Firefox does or does not do with their plug-ins.
Information regarding this plug-in:

About this Add-on

AutoProxy is an add-on to help you use your proxy (http/socks) automatically & efficiently.

With AutoProxy, you no longer need to switch your proxy status between on & off manually. If you prefer to visit a website via proxy, just add it's domain to AutoProxy's preference. After that, when you surfing, specified websites will be transfered through proxy while leaving others connect directly.

What's more, you can subscribe to rule lists maintained by people who have similar requirements as you. So, you don't need to add all proxy rules by yourself.

Note:
"gfwList" is a list for people in mainland China suffering from the censorship of GFW. If you aren't in mainland China, please do NOT subscribe to "gfwList". AutoProxy should contain lists for other requirements. If you'd like to share your proxy rules to people in the same state/school/company/network...by maintaining a rule list, it would always be most appreciated, please check out http://autoproxy.org/en/subscriptions .

AutoProxy is derived from Adblock Plus, thanks the ABP community especially it's author Wladimir Palant!


Ubuntu 14.04 Indicator Applet for remaining HDD space?

Install indicator-sysmonitor from Is an Internet connectivity indicator applet available for the Unity panel?.

You'll need to create a script that will contain a call to df or something similar and then parse out the required information.  Get the script going in the terminal first to ensure you have the correct value before adding it to the indicator.


To get both a read and write performance boost, you would want to use RAID0 (stripe) or LVM.  Basically, this allows multiple hard drives to seek and read and write at the same time.  Note that there's no redundancy in this case, as there's no data replicated across devices.

If you used a RAID1 (mirror), you'd get a performance improvement on reads (as the data you're looking for can be read from each disk), but writes are more expensive because you have to write to both disks.

RAID5 and RAID6 provide some read advantages as data is striped, but are generally less performant due to high CPU requirements for calculating parity.

Hope that helps!

EDIT: The RAID has to be supported by Your mainboard to do so. On most mainboards You get simple options in BIOS to set RAID and such stuff. Good idea would be to read carefully mainboard manual to avoid possible problems with incompatibile BIOS settings.


Net usershares are not defined in the smb.conf file.

To remove your share, it is actually quite easy with the following command:

net usershare delete qrtShare

That should clear that share out for you.

Hope this helps!


11.10 slow graphic performance with ATI switchable graphics when using Virtualbox

After more research, it looks like the issue is (surprise, surprise) with the switchable graphics. Even after instructing Catalyst Control Center on Windows to always use the dedicated Radeon, it still uses the integrated Intel GPU. To say I am not happy with Samsung at the moment is a complete understatement.....I paid for a discrete GPU, now I can't use it? This is apparently a widespread problem.


If you've got a Windows 7 Repair disc, just insert that, make sure your BIOS is configured to boot from the DVD/CD drive first, and then boot into your Windows Repair Console to get things fixed up.

This tutorial gives you an overview of how to use the repair tools on your Windows 7 Repair disc to fix the MBR so you can boot Windows 7 again.

Essentially, you're going to boot it into a command prompt on Windows 7 and then run the following commands:

bootrec.exe /FixMbr

Or, try the automatic "Start-up Repair" option to see if that works.


Having problem to login after upgrading from 11.10 to 12.04

Ok I actually figured this one out myself.
The problem was that I had installed 12.04 from CD but retained the old home partition. When I created my new user (with the same name as the old one) I got the correct home directory but wrong UID and GID. When I changed it to the correct values everything worked again!


How can I upgrade ubuntu 12.04 to 12.10?

http://www.ubuntu.com/download/desktop/upgrade

This has the step by step instruction for using the graphical Software Update. Very easy to use.


If Windows is installed in UEFI mode, Ubuntu should be installed in UEFI mode to avoid the mode switching you have encountered.  The UFEI mode install will copy the Ubuntu bootloaders (shim/grubx64.efi into the EFI partitions FAT filesystem into directory /EFI/ubuntu , so they don't conflict with any Windows bootloaders.  Also, an entry will be made in nvram to run those bootloaders (well, shim or grubx64 depending on if secure boot is enabled).  You can make the entry yourself with efibootmgr, and copy the bootloaders to where they belong, but the boot-repair tool will do that for you.  There are many detailed answers on how to run boot-repair, but basically, just run the parts you know you need to, and not the "recommended" since that probably does much more than you need (like renaming the Windows bootloaders etc.)
Try just the convert to UEFI as the first step (and do read up a bit on boot-repair).  Since you are willing, I'd just recommend reinstalling in UEFI mode.  The only odd thing about your system is the placement of the EFI partition at sda5, but if Windows boots, I guess that's not a problem.

UEFI mode is selected in the UEFI settings (formerly the BIOS/setup).  Read some of oldfred's suggested reading, but maybe the forums are a better place for any extended back and forth help.  Every machine should be able to boot in UEFI mode, but some have more difficulties than others running a USB, however, it's not clear you even got into the settings to enable UEFI (or disable CSM compatibility mode).


Running IBM Data Studio 4.1.01 on Ubuntu 14.04

Incase anyone else runs into this issue, I resolved it by adding the following line to /opt/IBM/DS4.1.0.1/eclipse.ini :

-Dorg.eclipse.swt.browser.DefaultType=mozilla

Cheers! :-)


Run a shell script without prompting for password

So the solution was fairly simple. The issue is that the shebang line runs as a separate user account. As soon as I changed the username usergroup = (root)... to ALL ALL = (root)... in the /etc/sudoers.d directory, it then allowed us to run the script without requiring a password. Obvious security implications here, which need to be investigated, but this is outside the scope of the question I had originally asked.


Unable to install Matlab R2015a on Ubuntu 14.04

As you mentioned in the comments, the file is owned by root user and root group. So you need to login as root by doing su root and then run the file using ./install. If you face issues in logging as root, you can refer this. Let me know if it solves the problem for you. :)


Upgrade to 13.04, user picture shows up on lightdm. Can I change it?

Take a JPEG image of your choice. Move/copy it to Your Home folder. Rename it to ".face". Yes, a dot-file without extension. Log out, and You should see it!

It should be JPEG and also a square. PNG will not be shown (it works for User Manager, but not for LightDM login, unfortunately). Image of irregular dimensions will get streched.

This works for me on Xubuntu 13.04. Good luck!


How to re-enable Unity WebApps in Ubuntu 13.04?

In Chromium, Desktop Integration is changed now to Installed Websites:

Firefox offers the same functionality through the General section:

Until now you sow where you can find the exceptions for web applications and, implicitly, from where to remove this exceptions. Here is a list of sites that support integration in Ubuntu: http://www.omgubuntu.co.uk/2012/07/list-of-that-websites-support-unitys-new-web-apps-feature.

Related to Grooveshark Web App, according with this post, is not working for the new layout of the site.

Next you will see how to manually create a simple web application for the sites that doesn't offer integration in Ubuntu.

To add a new web application from Chromium, go to Tools > Create Application Shortcut...:

Add the application from desktop to Launcher by dragging and drop:

The last thing that you can do is to change the icon of application to a better one. To do this, search in Dash for alacarte to open Main Menu:

In Main Menu search for the application for which you want to change the icon:


The error can mean 2 things depending on what file you downloaded. In the normal sense, when users download a file not ending with .gz it means the file is not a gzip format.

The other case is when the downloaded file is corrupted. I took my time to download the http://www.djangoproject.com/download/1.4/tarball/  file and it works with the line you are mentioning so it must mean the file was downloaded and somehow got corrupted. Download the file again.

Just to add that I had a problem about a year ago, similar to this, it was a memory problem. One of the memory slots was damaged (Memtest verified this). This is of course an extreme case, but wanted to mention it just in case.

What I would suggest is to do the following:

Download file like this: wget http://www.djangoproject.com/download/1.4/tarball/ -O Django-1.4.tar.gz
(No double quotes, just in case when copied from a website, they were the bbcode double codes and not the common ones used in the terminal)
Decompress like you mentioned: tar xzvf Django-1.4.tar.gz

See if that works.


Making Android device visible as USB device

What I done is that when I booted up the Virtual Machine, I opened up the Devices tab and from the dropdown menu I seen my phone and I checked it. Does that work for you?


How can I resolve the error "be sure the Blender executable is correct" when trying to open animations in blender installed with snap?

The issue appears to be in the way snap handles symlinks.
In OpenShot go to Edit -> Preferences and instead of put this in the Blender Command (path):
/snap/blender/current/blender

That's it, now enjoy watching your laptop take forever rendering those titles if you're anything like me.


Clean mounting HFS+ partition after power failure

I run into this exact same problem often. I haven't had a chance to test out my theory yet, but perhaps try fsck.hfsplus at the command line for your particular device when it gets mounted ro. I plan on checking if that works next time, but I don't want to purposely cause an unclean mount myself.


How do I change my phonon backed to phonon-vlc?

OP here with a potential answer.
After checking up on the bugs page of the tomahawk music player on github, I stumbled upon this.
I simply installed kdeconnect on my computer and the spotify tracks in tomahawk worked.
The OP of the bug believes it has something to do with the kde libraries and dependencies, but I still have no idea. If anyone wants to help explain why this works, it could be very helpful to someone else with this problem.


Enter the command ps aux | grep apt, which will catch all processes containing the word apt.

Remove the process that looks stuck with kill processID, where processID is the first set of numbers that occur after the name of the running process.

If that doesn't work, run kill -9 processID.

Source


VPN button stopped working: Network Manager Plugin

Try:

openconnect --user username --key-password password

If this not working read

man openconnect


When starting gparted "Gtk-WARNING **: cannot open display:"

The trick here is to use an Xserver on another machine to display the GUI elements you can't see on a server.  Set the environment variable to the local machine running the Xserver.  Where this is an IP address and the screen # on the X server.

export DISPLAY="192.168.1.5:0"

then run :

sudo gparted

With another Ubuntu machine you will need to change firewall rules to allow this.  Using windows you can do this with MobaXterm which runs a local X server.


How do I disable drivers check after login in Kubuntu 14.04

I've been suffering from the same problem. Searching for a solution I've found your question and also this bug report at Launchpad: https://bugs.launchpad.net/ubuntu/+source/kubuntu-driver-manager/+bug/1304598 .

I've entered the Device Manager in the System Settings, as someone suggests there, but it hasn't worked. I've entered again and have it let run until the end, until it has informed me that there wasn't any private driver. Now the Device Manager has stopped running after every login.

So the solution seems to let the Driver Manager run at least one time, until the end of the check. I hope it works for you too.


first download the .iso file, and then put the wubi.exe there, and then run wubi.exe, it will be faster, withing 1 hour approx. (disconnect from the internet after downloading file).

The IO error may be because of internet connectivity while installing online.


Here is a description on how to archive: https://userbase.kde.org/Kmail/Backup_Options

Right click on the folder and press "archive folder".


Ralink RT3060 wireless device configuration on ubuntu 12.04

Stephan solved the problem in his question:

  I found the problem. As described in stevens blog http://steveswinsburg.wordpress.com/2011/03/12/how-to-install-a-d-link-dwa-525-wireless-network-card-in-ubuntu-10-04/

sudo su
make && make install

  "You need to use sudo su and not just sudo so it creates the directories properly." That is the problem with the solution describe above.


EDIT: Children in bed, now here comes the extended edition.

SWAP (do you need it?)

Well, basically you don't. BUT, if you got none, you really have to make sure that your 32GB of RAM is enough for the summed up RAM consumption of all running processes. If you don't the kernel will kill processes at its own gusto.

Why are there two SWAP partitions?

This box is using a linux software raid with level 1. This means it mirrors the disks. Although you COULD theoretically destroy one of those SWAP partitions to use the disk space for something else (32GB should be enough) - I would strongly recommend against it.
If you would re-use sdb2 for example and if after some months or years of operation disk sda breaks, suddenly the amount of SWAP space will be 0.
So if now the RAM is fully used, linux will start to kill processes.

To sum this up: each disk in a raid 1 should provide everything that is necessary to operate the system on its own.

What could you do to get more disk space?

Aside from getting a bigger server (the obvious way) you could rebuild the system and go without raid 1.
BUT be absolutely sure, you create regular backups and you can restore the system with those. Additionally you should be comfortable with the circumstance, that a failed disk means a downtime of the whole system until the disk is replaced and the system is restored from backup. (Which could, depending on hardware services and your own reaction time and skill, last up to several days. - Well you should ALWAYS make sure, recent backups are at hand, just in case the system fails one day - and it WILL.)

Further Reads

additional information may be/is available at:

http://en.wikipedia.org/wiki/Paging#Linux
http://en.wikipedia.org/wiki/Solid-state_drive#SWAP
http://makeuseof.com/tag/swap-partition


Changing distribution and keeping user files

I disagree, you should be able to install xubuntu without formatting the /home partition. Very few, if any .files will conflict between kde and xfce.

It has been the default behavior of the Ubuntu installer (ubiquity) to preserve /home, with or without a separate partition, for quite some time, .

https://wiki.ubuntu.com/UbiquityPreserveHome

  Ubuntu now supports installations that preserve the /home directory when it already exists. To do this, manual partitioning must be used, and the partition on which data is to be preserved must not be marked for formatting.

https://wiki.ubuntu.com/komputes/HowToUbuquityPreserveHome

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

  Few people know it, but since Hardy it's possible to reinstall Ubuntu without losing the content of the /home folder (which contains program settings, internet bookmarks, emails... and all the documents, music, videos that you have put in it). Even if /home is not on a separate partition (which is the case by default if you did not manually separate it). Remark: this tutorial can also be used to upgrade Ubuntu (eg 11.04 -> 12.04 from a 12.04 live-CD).

The general concept of backing up your data before you install an OS applies, but, you should have a backup already.


"No Bluetooth found Plug in a dongle to use Bluetooth"

On my new Dell XPS with Ubuntu 16.04 installed by Dell, Bluetooth would disappear from time to time. The little Bluetooth icon in the top right-hand part of the panel disappeared. When bringing up Bluetooth with the settings menu, it would be grayed out with no option to start it.

After struggling with this for a time, I discovered that by rebooting the machine AND pressing F2 to enter the UEFI (BIOS) then exiting that immediately, Bluetooth would reappear after login. I would then reconnect my device, a Logitech Bluetooth mouse - this was just pulling a dropdown menu from the Bluetooth icon, selecting the mouse, and clicking "ON".

This works every time for me. I hope it does for you.


Here's something that works:

#!/usr/bin/env python

import sys, commands

browsers = [
    "firefox",
    "google-chrome",
    "chromium-browser",
    "epiphany-browser",
]

done = False
ps = list(i.split()[10] for i in commands.getoutput("ps aux").split("\n")[1:])
for i in browsers:
    if any(j.endswith(i) or j.endswith(i+"-bin") for j in ps) and not done:
        commands.getoutput(i + " " + (" ".join(sys.argv[1:]
            if len(sys.argv) - 1 else "")))
        done = True

if not done:
    commands.getoutput(browsers[0]["cmd"] + " " + " ".join(sys.argv[1:]))

Just re-order the list on top of the file any way you like, add and remove browsers.
The command you enter will be whatever you would type in the command-line to start this browser.
save this script somewhere, right click on it, go to properties → permissions and set executable. I recommend saving it in /home/<username>/.browser.
Find the file (hit Ctrl+H to show hidden files), right click and select Properties, then go to Permissions and set Allow executing file as program.
Go to System → Preferences → Preferred Applications, select Custom and type /home/<username>/.browser into the Command field.

The first browser that appears in the list and is running will be chosen to open the web site. If none of them is running, the first one will be opened.

I've tested this and it seems to work rather well, none the less, let me know if there are any errors in it. And it'd be cool if there was a method to do this that doesn't involve programming, this is just my peculiar solution.


Best and perhaps the only way to make this happen is to create a VM with a windows box to run the apps. Because of how Microsoft has the Apps packaged, they are fundamentally different and there currently is no way to port them over to another OS, even with Wine.

Handy Resources here.

Maybe in the future Wine will integrate a feature for UWP apps. But I wouldn't hold my breath.


colordepth won't be set to 8 on an intel HD chipset

LightDM does not work with a colourdepth of 8. get GDM or other managers.

As for the weird icons, change it from "pseudoColor" or "GrayScale" to "StaticGrey"


You have carriage return (CR) at the end of the line, as the log says:

/home/log-transfer-user/scripts/execute_script.sh^M

You need to remove the CR and also put a newline after the line as needed by cron.


How to downgrade grub from 2.04 to 2.02 on ubuntu 19.04?

I started by suggesting:

  One simple way to get grub 2.02 is to install an older version of
  Ubuntu for example 18.04.1 LTS alongside the other operating
  system(s). Then run sudo update-grub to get access to the other
  operating system(s). It costs a few GB, so there might be better
  methods.

You brought this idea one step further:

  Ah Ha! So for an ISO booter, I use mkusb to make the foundation using
  say 18.04 and then it should have no problem booting 19.10 and newer
  ISOs. Very clever. Please drop this solution into an official answer.

And you have a solution :-) or should we say a workaround until the bug in grub 2.04 is squashed :-/


Chromium Doesn't want to run Java applets

I needed to build the icedtea package from 12.10.
First I downloaded

https://launchpad.net/ubuntu/+archive/primary/+files/icedtea-web_1.2-2ubuntu3.debian.tar.gz
and

https://launchpad.net/ubuntu/+archive/primary/+files/icedtea-web_1.2.orig.tar.gz

Then extracted the orig.tgz file into a build folder, and the debian.tgz into the folder the previous extraction created (icedtea-web-1.2).

Then I cd'ed into the icedtea-web-1.2 folder and ran

dpkg-buildpackage-uc -b

As necessary, I installed dependencies, and then I had several packages in the build folder. I ran

sudo dpkg -i *7-plugin* *netx*

(With wildcards around

to install the necessary files.


You might want to install wallch  from Software Center and add it to the Startup Applications. That is an application made for that purpose, as described before.


Copying files from old Ubuntu HDD to a new Ubuntu HDD

If you have a compatible spare connector in your computer, you can temporarily add it again to your current system. Then, on a subsequent boot, Ubuntu will (should, if it is not broken too much) recognize the drive. It should appear in the left pane of file manager, and you can then mount it by clicking on it in the left panel.

It could work by connecting the drive on a connector of a computer over the network, etc...

An option that costs some money is to obtain a hard drive docking station in which you plug the hard drive, then connect through USB. Such docking stations are priced between $25-35.


does bigger SWAP partition area helps faster "Suspend \ hibernate "?

No, a larger swap partition will not boost performance. When you suspend / hibernate, you copy the information RAM <--> Swap, so performance is dependent on the quantity of information you are working with, not the size of the swap.


Here is an easy way to set up an email autoresponder using thunderbird :

Click on write, and compose you response.
Save it as a template
Go to tools, message filters
Select your inbox and click on new
Select match all messages
In the action dialog select reply with template

Et voilà!

Now each time you will check your mail it will send your template to every person that sent you a mail.


Firefox fonts too small on Dell Inspiron

If your using firefox you can right click in the gray area of search bar, and then click on customize, it will take you to Additional Tools and Features, once there you can drag and drop your zoom-in and zoom-out controls into your search bar. Go here for more information https://support.mozilla.org/en-US/kb/customize-firefox-controls-buttons-and-toolbars?redirectlocale=en-US&redirectslug=How+to+customize+the+toolbar


How to tell ModemManager to ignore some or all of tttyUSB*?

Create an udev rule /etc/udev/rules.d/80-palm.rules

ATTRS{idVendor}=="0830", ATTRS{idProduct}=="0060", ENV{ID_MM_DEVICE_IGNORE}="1"

let udev reload his rules with  udevadm control -R

Plugin your Palm.


Why I can't change my username in Terminal?

PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ find this line in .bashrc file(vim .bashrc is the command) from terminal and replace that "u" with something you wanted and restart Terminal; hope this works :)


Cannot connect to a Windows pc in a Linux network

Actually the custom firewall ZoneAlarm on the Windows-PC was blocking everything


Get a black screen after GRUB ubuntu 12.04 32 bit

Press Ctrl+Alt+F7 to enter commandline.

Then if you use a mobile broadband service, use this command to connect to the network:

nmcli nm wwan on && nmcli con up id 'YOUR CONNECTION NAME HERE'

ex : nmcli nm wwan on && nmcli con up id 'Dialog GSM Prepaid (Kitbb)'

Then install the Radeon display driver:

sudo apt-get install xserver-xorg-core xserver-xorg-video-radeon libdrm-radeon1 xorg-video-abi-15


Creating shortcuts on desktop for applications

Apparently, matlab needs to be run in a terminal. This means that setting Terminal to true should make the shortcut work:

[Desktop Entry]
Version=1.0
Name=Matlab R2014
Comment=Run MATLAB to do some amazing stuff!
Exec=/home/saeid/bin/matlab.sh
Icon=matlab
Terminal=true
Type=Application
Categories=Utility;Application;

For the icon to be recognized, you need to habe an icon called matlab.png in either your ~/.icons folder or the system-wide /usr/share/icons/hicolor/NNxNN/apps/ folder. The Ns are the various icon resolutions.


The solution to this turned out to be exactly what I suspected: I just had to edit my PERL5LIB path so that the paths not containing '/local/' come first. I have changed my .bashrc to export PERL5LIB=/usr/share/perl/5.30:/etc/perl:/usr/lib/x86_64-linux-gnu/perl5/5.30:/usr/share/perl5:/usr/lib/x86_64-linux-gnu/perl/5.30:/usr/lib/x86_64-linux-gnu/perl-base. Still a little mystified as to how this happened though - as to why these paths are set that don't point to anything.


Get a list of recently removed packages?

The directory /var/log/apt contains the logs that will help you. Consult history.log and term.log for the details.

Here's an example removal from history.log

Start-Date: 2020-04-06  17:21:27
Commandline: apt-get autoremove
Requested-By: user (1000)
Remove: linux-image-5.3.0-42-generic:amd64 (5.3.0-42.34~18.04.1), linux-headers-5.3.0-42-generic:amd64 (5.3.0-42.34~18.04.1), linux-modules-extra-5.3.0-42-generic:amd64 (5.3.0-42.34~18.04.1), linux-headers-5.3.0-42:amd64 (5.3.0-42.34~18.04.1), linux-modules-5.3.0-42-generic:amd64 (5.3.0-42.34~18.04.1)
End-Date: 2020-04-06  17:21:44


The mother of all cloning tools is rsync.
I have used this solution before and it worked like a charm.

First of all you should start with a clean installation of the operating system on the new hard disk and setup encryption. Make sure you use the same partitioning scheme.

Mount your old hard disk to the system (via USB adapter or network) and use rsync to clone your old filesystem to your new encrypted hard disk like so:

  rsync -aAXv
  --exclude={"/dev/","/proc/","/sys/","/tmp/","/run/","/mnt/","/media/*","/lost+found"}
  /path/to/old/hdd/mount/point /

rsync -av should really cut it, AX additional switches will make sure ACLs and extended file attributes will be preserved if they were used. The excluded folders are folders which do not contain regular files (/dev,/proc,/sys) and folders which do not contain useful data for your new system. If you are using /mnt for your additional partitions you should remove it from the exclusion brackets.

It goes with out say that if you are running any databases, transferring the files is not an ideal solution, you need to backup your databases on the old system and restore to the new system according to each database servers procedures.

And it actually works! You might have to troubleshoot a couple red spots in the syslog but generally all your installed packages should be there and your system should be working perfectly with the configuration you knew. By using this method I managed to pull down a cloud hosted VPS to a local physical machine and host it locally.

Good luck.


Currently PUT requests which take longer than 15 minutes get discarded. This is stated as a bug.


Import system log files into local socket

You said you use rsyslogd. Then put a file (e.g. my-forward.conf) with the following content into /etc/rsyslog.d/:

if ( prifilt("*.warning") ) then {
    action(type="omfwd" protocol="tcp" target="127.0.0.1" port="9999")
}

and restart the syslog daemon:

systemctl restart rsyslog

This will forward the syslog messages for all facilities with severity warning and worse via TCP to 127.0.0.1:9999.


How do I turn off thumbnails for pdf files?

A thumbnailer is a program with no user interface that takes a file and a pixel size as inputs, and it writes a thumbnail for that file. GNOME determines which thumbnailer program to use based on the MIME type of the file for which a thumbnail is to be generated. The mapping between MIME types and thumbnailer programs is stored as a series of GConf keys.
Source
Yes it's the correct way to disable thumbnails for any mime-type. The reason it's not working for you is incorrect syntax. You need to use single quotes around application/pdf. So it should be like this:

['application/pdf']

You can use a comma without space to separate multiple mime-types:

['application/pdf','image/jpeg']


Upgrade to Kubuntu 20.04 from Kubuntu 18.04

Me too, I can't upgrade fully updated freshly-installed Ubuntu MATE 18.04.5 LTS system without PPAs to 20.04.1 LTS.
So I have reported bug 1890936 to LaunchPad.
At first install all updates to the current version with
sudo apt-get update
sudo apt-get dist-upgrade

Then as a workaround you have to use
update-manager -d

or
sudo do-release-upgrade -d

to upgrade.


Getting errors when I try to install lubuntu from the terminal

Try

sudo apt-get update

sudo apt-get install lubuntu-desktop


How do I get a USB drive shortcut on desktop?

Open a terminal with Ctrl-Alt-T and execute the command below:

gsettings set org.gnome.nautilus.desktop volumes-visible true

This will enable the feature in 12.04. Here is a screenshot from 12.04 Desktop:


Segmentation fault when launching System Settings

I had this issue myself.

I was able to fix it by running this command: setsid unity and then restarting.

When Unity relaunched, it was working.


(K)Ubuntu 17.10 - loginctl Multi-Seat on 2 NVidia cards with either nouveau or nvidia-384

OK, I finally made it work.

general

This section is here as a little "getting started" for others, and as a little "aide-mémoire" for myself... This is not the only and maybe not even the best way to do it, it's just the way I did it.

Get two USB hubs and place one at each of the two seats. Plug them into two USB ports of the machine.
Get a USB sound card (small USB dongle with one mic-in and one line-out connector) and plug it into another USB port of your machine. This assumes that there already is another (on-board) sound device that is to be used on seat0.
Get two USB wireless mouse/keyboard combos and plug one of the USB dongles in each of the two USB hubs.
Assign the hubs to the respective seats (loginctl attach seat1 /dev/...). This automatically assigns the mouse and keyboard which are plugged into the hub.
Assign the USB sound card to seat1
Assign one of the Nvidia cards (all of it, including DRM and Sound devices) to seat1.
If you have any other devices that are not plugged into the already-assigned hub, then assign them as well.
Run loginctl seat-status seat1. This is how it looks here:

seat1
        Sessions: *c3
         Devices:
                  ├─/sys/devices/pci0000:00/0000:00:03.0/0000:02:00.0/drm/card1
                  │ [MASTER] drm:card1
                  ├─/sys/devices/pci0000:00/0000:00:03.0/0000:02:00.0/drm/renderD129
                  │ drm:renderD129
                  ├─/sys/devices/pci0000:00/0000:00:03.0/0000:02:00.1/sound/card2
                  │ sound:card2 "NVidia"
                  │ ├─/sys/devices/pci0000:00/0000:00:03.0/0000:02:00.1/sound/card2/input20
                  │ │ input:input20 "HDA NVidia HDMI/DP,pcm=3"
                  │ └─/sys/devices/pci0000:00/0000:00:03.0/0000:02:00.1/sound/card2/input21
                  │   input:input21 "HDA NVidia HDMI/DP,pcm=7"
                  ├─/sys/devices/pci0000:00/0000:00:04.0/0000:03:00.0/usb8
                  │ usb:usb8
                  │ ├─/sys/devices/pci0000:00/0000:00:04.0/0000:03:00.0/usb8/8-1
                  │ │ usb:8-1
                  │ │ ├─/sys/devices/pci0000:00/0000:00:04.0/0000:03:00.0/usb8/8-1/8-1.3
                  │ │ │ usb:8-1.3
                  │ │ ├─/sys/devices/pci0000:00/0000:00:04.0/0000:03:00.0/usb8/8-1/8-1.4/8-1.4:1.0/0003:046A:B102.0004/input/input5
                  │ │ │ input:input5 "HOLTEK USB Wireless Device"
                  │ │ └─/sys/devices/pci0000:00/0000:00:04.0/0000:03:00.0/usb8/8-1/8-1.4/8-1.4:1.1/0003:046A:B102.0005/input/input6
                  │ │   input:input6 "HOLTEK USB Wireless Device"
                  │ └─/sys/devices/pci0000:00/0000:00:04.0/0000:03:00.0/usb8/8-2
                  │   usb:8-2
                  │   └─/sys/devices/pci0000:00/0000:00:04.0/0000:03:00.0/usb8/8-2/8-2.3
                  │     usb:8-2.3
                  ├─/sys/devices/pci0000:00/0000:00:04.0/0000:03:00.0/usb9
                  │ usb:usb9
                  │ ├─/sys/devices/pci0000:00/0000:00:04.0/0000:03:00.0/usb9/9-1
                  │ │ usb:9-1
                  │ │ └─/sys/devices/pci0000:00/0000:00:04.0/0000:03:00.0/usb9/9-1/9-1.3
                  │ │   usb:9-1.3
                  │ └─/sys/devices/pci0000:00/0000:00:04.0/0000:03:00.0/usb9/9-2
                  │   usb:9-2
                  │   └─/sys/devices/pci0000:00/0000:00:04.0/0000:03:00.0/usb9/9-2/9-2.3
                  │     usb:9-2.3
                  ├─/sys/devices/pci0000:00/0000:00:12.0/usb4
                  │ usb:usb4
                  │ ├─/sys/devices/pci0000:00/0000:00:12.0/usb4/4-4/4-4:1.0/sound/card5
                  │ │ sound:card5 "Device"
                  │ └─/sys/devices/pci0000:00/0000:00:12.0/usb4/4-4/4-4:1.3/0003:0D8C:0014.0001/input/input2
                  │   input:input2 "C-Media Electronics Inc. USB Audio Device"
                  └─/sys/devices/pci0000:00/0000:00:12.2/usb1
                    usb:usb1
                    ├─/sys/devices/pci0000:00/0000:00:12.2/usb1/1-2
                    │ usb:1-2
                    ├─/sys/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0/input/input15
                    │ input:input15 "UVC Camera (046d:0807)"
                    ├─/sys/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.0/video4linux/video0
                    │ video4linux:video0 "UVC Camera (046d:0807)"
                    ├─/sys/devices/pci0000:00/0000:00:12.2/usb1/1-3/1-3:1.2/sound/card3
                    │ sound:card3 "U0x46d0x807"
                    └─/sys/devices/pci0000:00/0000:00:12.2/usb1/1-5
                      usb:1-5

nouveau

I didn't find out what to do about the screen flickering on seat1 and lockups on seat0 when using the nouveau driver. In case you're looking for a solution for this very problem, it might be worth to have a look at  https://wiki.archlinux.org/index.php/Xorg_multiseat which says:

  To avoid tearing this seems to help on nearly all configurations - add this to /etc/environment:

CLUTTER_PAINT=disable-clipped-redraws:disable-culling
CLUTTER_VBLANK=True

Another hint was to add the user to the group video because otherwise they might not have access to the DRI interface.

This is about all I can say, and I switched to using Nvidia binary drivers.

NVidia

The problem that I had was appearantly that the X server of seat0 was somehow trying to take control of both GPUs even though GPU-1 was is assigned to seat1.

This somehow mixed up the X screens and X server for seat 1 couldn't find any usable screens.

I spent hours of fiddling with /etc/X11/xorg.conf.d files where I put tiny pieces of configuration like

Section "Device"
        Identifier      "graphic0"
        Driver          "nvidia"
        Option          "NoLogo"
        BusId           "PCI:1:0:0"
        MatchSeat       "seat-1"
        Option          "Monitor-DVI-1"         "monitor1"
EndSection

and

Section "ServerLayout"
        Identifier      "seat-1"
        Screen          "screen1"       0                   0
        InputDevice     "mouse1"        "CorePointer"
        InputDevice     "keyboard1"     "CoreKeyboard"
        Option          "Seat"  "seat-1"
        Option          "SingleCard" "on"
EndSection

as advised by https://wiki.archlinux.org/index.php/Xorg_multiseat (lot's of useful information there, though it didn't solve my problem) or https://devtalk.nvidia.com/default/topic/936873/linux/-howto-multiseat-with-ubuntu-16-04-systemd-gdm-proprietary-drivers/1 (another high-quality discussion of this issue).

What finally worked for me was doing it the hard way and providing a X configuration for each of the seats.

So, my procedure was:

use loginctl attach seat1 .... to assign all required devices to seat1
install nvidia proprietary drivers (make sure you select the right one for you system; in terminal run ubuntu-drivers devices to see the list of available drivers)

apt install nvida-384

reboot
login on seat0 and run nvidia-seetings. Select X Server Display Configuration on the left, click on save to X Configuration File bottom-right and save the file as ~/xorg-template
Copy ~/xorg-template config file twice to /etc/X11, once as xorg-seat0.conf and once as xorg-seat1.conf
Modify these two Xorg config files to match seat0 and seat1 setup respectively. I only had to change a couple of lines - the PCI address of the GPU and the number of monitors. I did however also change the naming of the Identifiers for the sake of clarity - I suppose that would not really be required. Below is my config:

seat0

# xorg-seat0.conf
Section "ServerLayout"
    Identifier     "Layout-seat0"
    Screen      0  "Screen-seat0" 0 0
    InputDevice    "Keyboard-seat0" "CoreKeyboard"
    InputDevice    "Mouse-seat0" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse-seat0"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard-seat0"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor-seat0_1"
    VendorName     "Unknown"
    ModelName      "FUS H22-1W"
    HorizSync       28.0 - 79.0
    VertRefresh     50.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device-seat0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 740"
    BusID          "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier     "Screen-seat0"
    Device         "Device-seat0"
    Monitor        "Monitor-seat0_1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DVI-D-0: nvidia-auto-select +0+0, DVI-D-1: nvidia-auto-select +1680+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

seat1

# xorg-seat1.conf
Section "ServerLayout"
    Identifier     "Layout-seat1"
    Screen      0  "Screen-seat1" 0 0
    InputDevice    "Keyboard-seat1" "CoreKeyboard"
    InputDevice    "Mouse-seat1" "CorePointer"
    Option         "Xinerama" "0"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Mouse-seat1"
    Driver         "mouse"
    Option         "Protocol" "auto"
    Option         "Device" "/dev/psaux"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard-seat1"
    Driver         "kbd"
EndSection

Section "Monitor"
    # HorizSync source: edid, VertRefresh source: edid
    Identifier     "Monitor-seat1_1"
    VendorName     "Unknown"
    ModelName      "FUS H22-1W"
    HorizSync       28.0 - 79.0
    VertRefresh     50.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
    Identifier     "Device-seat1"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce GT 730"
    BusID          "PCI:2:0:0"
EndSection

Section "Screen"
    Identifier     "Screen-seat1"
    Device         "Device-seat1"
    Monitor        "Monitor-seat1_1"
    DefaultDepth    24
    Option         "Stereo" "0"
    Option         "nvidiaXineramaInfoOrder" "DFP-0"
    Option         "metamodes" "DVI-D-0: nvidia-auto-select +0+0"
    Option         "SLI" "Off"
    Option         "MultiGPU" "Off"
    Option         "BaseMosaic" "off"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Create a new file 10-seats.conf in /etc/lightdm/lightdm.conf.d/ (create the folder if it isn't there yet) and assign the layouts and config files to each of the X servers:

# 10-seats.conf
[Seat:seat0]
xserver-command=/usr/bin/X :0
xserver-config=/etc/X11/xorg-seat0.conf
xserver-layout=Layout-seat0

[Seat:seat1]
xserver-command=/usr/bin/X :1
xserver-config=/etc/X11/xorg-seat1.conf
xserver-layout=Layout-seat1

reboot

As you may notice, the xorg-seat[01].conf files do not contain any hint to seats. I named the Identifiers using the strings seat0 and seat1, but that has no relevance.

But, in lightdm configuration it is required to use the names you assigned to the seats when creating them. seat0 can't be changed, but the second seat can have any name you choose (as long as it starts with seat and is followed by letters, digits, - and _ only). Make sure you use that name to configure the second seat - I have used seat1 to keep it simple.

I'm pretty sure that there are things that could be removed from the X config files, but I haven't yet tried to tidy them up. If you find a more minimalistic file to working well, feel free to post a comment here and I'll add your info (well, unless you don't feel like posting your own entire answer, that is).

For example, neither the mouse nor the keyboard configured in both of the X config files do exist on my machine - they are dummy devices added by nvidia-settings. The physical devices (USB wireless mouse and keyboard) are added on the fly because they are attached to seat0 and seat1 respectively.


I don't know to what extent you needed to learn but as the first step you could take a look at Ubuntu Documentation. Here's the link.


If you could be specific about which packages you installed it would help.

However, in case you have ATI graphics card and have installed some propreitery packages for the same (fglrx*) it might explain the crash. There is a known unstability with such packages on 12.10 and 12.04 too. You might have to uninstall the packages from the terminal mode and go back to the default drivers.

Please check this Ask Ubuntu post for the steps.


Is Bluetooth responsible for my Ubuntu 16.04 much slower startup?

The problem is not necessarily related to the Bluetooth. Something slow is happening during those two dmesg rows.

I had the same problem after a fresh install to a new SSD drive. It turned out that during the install process Ubuntu found the older HDD's swap partition and registered that in /etc/fstab.
After I have removed the older HDD the swap partition was naturally not available and Ubuntu was waiting there for more than a minute without any dmesg row to appear. When I deleted the HDD's swap partition from /etc/fstab the boot became less than 10 seconds.

You may have the same cause or some hardware- but non necessarily Bluetooth-related problem.


I cannot run any executable from nautilus

If you can't try non-extension of Ubuntu 18.04 - It looks like it doesn't work for the newest version. I think it works fine with *.sh because sometimes there's a copy violation of MacOS's shell or non-extension-able executable.

I have tried normal executable under Ubuntu 18.04, then you can replace yourapp with yourapp.sh then you can click yourapp.sh, then it will open the application.

PS: Please remember that for Ubuntu 18.04 need all replacement of yourapp"*" to yourapp".sh" - If system-engine-used binaries because it used by $PATH and any binaries like cp, rm etc don't need *.sh just let. If you are not sure for executable and shell format.

I hope you have tried to open executable and shell.


Encrypted version of cleartext file system

You may want to take a look at EncFS. It's especially useful to encrypt files stored in the cloud because it can encrypt files or folders. It's fast too. Here's a GUI for EncFS if you need it.

Edit:

According to an audit that dates back to 2014, EncFS "is not safe if the adversary has the opportunity to see two or more snapshots of the ciphertext at different times. EncFS attempts to protect files from malicious modification, but there are serious problems with this feature."

I couldn't find any information if the issues presented in the audit have since been fixed.

It looks like Cryptomator is considered more secure, and like EncFS, it too offers client side encryption (some more details about Cryptomator here).


switching over to awesome from openbox, can I still use my menu.xml

unfortunately not. , perhaps there's a openbox-menu to lua-script conversion script, but i have not seen one. i do encourage you to try creating one though. do one for me on the fly that lets me not have to re-do my pipemenu scripts.


What does "Output has been suspended by pressing Ctrl+S" mean?

In a standard "shell" the CTRL+S and CTRL+Q sequences are used to pause output to the screen.  By pressing CTRL+S the output is paused, and CTRL+Q re-enables output.

It was very useful in the days of standard ASCII terminals / green screens which didn't have a nice scroll bar on the edge of the window :)


What happens to my files when uninstalling Ubuntu (installed from wubi)

yes...
Yes - everything you did within the ubuntu-wubi installation will be removed and lost when you uninstall.
A little explanation will help.
A wubi install is in layman terms a rather large file(s) reserved within your NTFS windows 7 installation.  When you uninstall wubi via the Add/Remove Program feature of Windows, you are effectively just removing this/these file(s).
Nothing in Windows itself will be removed or lost - just the Ubuntu changes.
Best advice is to backup any important files to external media such as CD/DVD or USB.  Make sure you use a media format such as NTFS to allow windows to see it.


I decided to:

a) Upgrade

b) Install Kubuntu

It worked fine. I still don't know if the result is different or not.


How to make a live usb persistent [Manual Method]

Dunnos

1) For 32bit overwrite syslinux.cfg with:

default live
label live
  say Booting an Ubuntu Persistent session...
  kernel /casper/vmlinuz
  append  file=/cdrom/preseed/ubuntu.seed boot=casper persistent initrd=/casper/initrd.lz quiet splash noprompt --

For 64bit use:

default live
label live
  say Booting an Ubuntu Persistent session...
  kernel /casper/vmlinuz.efi
  append  file=/cdrom/preseed/ubuntu.seed boot=casper persistent initrd=/casper/initrd.lz quiet splash noprompt --

2) Doing 1) above, should automount casper-rw when booting a Persistent system.

3) Customizing ISO's has been covered elsewhere in Ask Ubuntu.

4) Not sure Slackware is a permissible subject here.


I love my little NC10! Lubuntu runs pretty smoothly on an NC10, and that was with the 1GB of RAM. Lubuntu also gave me longer battery life than XP. I ran Lubuntu on it until about a year ago and never had any issues. I then turned it into a tiny home server, but this isn't what you want.

You will not have the Samsung software, however Lubuntu out of the box should do everything the Samsung software did (personally even when I used it with XP I hated the Samsung software and removed it).


How do I get the brightness keys working on a Samsung NC110?

This worked for me,

open a terminal.

sudo cp /etc/default/grub /etc/default/grub.bkup
sudo gedit /etc/default/grub

add the following to the line GRUB_CMDLINE_LINUX=".... acpiosi=Linux acpi_backlight=vendor "

sudo grub-mkconfig -o /boot/grub/grub.cfg

hope this helps :-)


Unable to install any version of ubuntu in my laptop

On my notebook I have onboard intel gfx plus an nvida card. In bios I can choose between discrete (Nvidia), internal(intel), or automatic (sytem will chose). In order to boot my ubuntu I need to either set the gfx option in bios to discrete or internal. Automatic will not work. You may check your bios wether you have a similar option.


How to completely remove Desktop Environments after the Terminal option didn't work?

If you have installed the meta-packages, as xfce4 is, you should use sudo apt-get autoremove after removing xfce4. Removing only the meta package don't remove the packages that came with them.

For example, the xfce session comes with the package xfce4-session, and not the xfce4. Removing xfce4 only don't remove xfce4-session. So, after removing xfce4, you have to use sudo apt-get autoremove to remove the xfce4-session correctly.


Downgrade from Evolution 3.16 to Evolution 3.12

Add the PPAs again, and yes, I'am sure.
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install -f
sudo apt-get install ppa-purge
Use sudo ppa-purge <the_ppa>to remove the PPAs and to downgrade your GNOME environment


Compound TCP by Microsoft is just one implementation of a congestion algorithm protocol. In Linux this has been discarded as you've already found, and it seems that TCP Illinois was the direct successor, but not used that much any more.

Some work has been done to implement Illinois since 2.6.22: LWN article: TCP Illinois preliminary version. It also seems still available in current versions: net/ipv4/tcp_illinois.c in linux-stable tree.

TCP New Reno, another alternative based on RFC3782 seems to be the most commonly used in Linux and completely integrated in the kernel. See also the manpage tcp(7):

  tcp_available_congestion_control (String; read-only; since Linux 2.4.20)
          Show  a list of the congestion-control algorithms that are registered.  This
          list is a limiting set for the list in tcp_allowed_congestion_control.  More
          congestion-control algorithms may be available as modules, but not loaded.

Check the ones available on your system:

cat /proc/sys/net/ipv4/tcp_available_congestion_control

and active:

cat /proc/sys/net/ipv4/tcp_congestion_control

Change the active one by writing to it (example reno):

echo reno | sudo tee /proc/sys/net/ipv4/tcp_congestion_control

Bottom line: You're probably already using a very modern and very efficient TCP congestion algorithm protocol just by using a recent Linux kernel.


Leage of Legends doesn't launch due to "Can't connect to pvp.net" error

I solved this thanks to an answer posted on the forums (answer by Metaph on page 2). Before playing the game, just do:

$ sudo sh -c "echo 0 > /proc/sys/net/ipv4/tcp_timestamps"

Note that this may have a negative impact on your browsing experience (e.g. slower streaming), so you should turn it back on once you've finished playing, and I strongly discourage setting this up automatically when booting (just in case). The default is 1 for a reason.

UPDATE: this was apparently fixed on their end, so this should no longer be needed.


The following site describes some reasons for HTTP 500 errors.

One reason which seems to be the problem in your case is wrong permission which was set by the FTP server.

I'd suggest to log-in the server, and perform ls -lsa on the file which was uploaded by the FTP client, and also on the file which you were creating using nano file.php if the file permission is different, please change the file permission of the file uploaded by FTP-client, and check again if it works.

If you don't know which file permission should be used, I'd suggest using:

chmod 755 file-name

  Fixing 500 Internal Server Error Problems on Your Own Site

  A 500 Internal Server Error on your own website requires a completely
  different course of action. As I mentioned above, most 500 errors are
  server-side errors, meaning it's likely your problem to fix if it's
  your website.

  There are lots of reasons why your site might be serving a 500 Error
  to your users, but two are most common:

  A Permissions Error. In most cases, a 500 Internal Server Error is due to an incorrect permission on one or more files or folders. In
  most of those cases, an incorrect permission on a PHP and CGI script
  is to blame. These should usually be set at 0755 (-rwxr-xr-x).


Using Regex Breaking a text on the last digit using linux tools like sed, or awk

$ sed -r 's/([0-9])([^0-9])/\1\n\2/g' filename
103
Ru
103
mRh
104
1041

The above regex looks for a number followed by not a number.  If found, it inserts a newline between them.

In more detail, sed commands of the form s/old/new/ look for old and replace it with new.  In our case, old consists of two characters: ([0-9]) matches any number and, because it is enclosed in parens, it saves the value.  ([^0-9]) matches anything other than a number and saves it also.  Those two characters, if found, are replaced with \1\n\2 which means the first match (the number), a newline, and the second match (not-a-number).

MORE: If we want to break at the beginnings of numbers as well as at the end, then we add one more substitution command:

$ echo xyz541wpk | sed -r 's/([0-9])([^0-9])/\1\n\2/g; s/([^0-9])([0-9])/\1\n\2/g'
xyz
541
wpk

The second substitution command is just like the first but it looks for the reverse pattern: not-a-number followed by a number.


If you think you might have lost the sound in Chrome after plugging and unplugging an external HDMI monitor, try this:

Plug in your HDMI monitor again
In the Ubuntu Sound Settings, make sure that the selected device for sound output is the integrated one, and not the HDMI one
Try sound in Chrome again
If it works, unplug your monitor and your Chrome sound should be permanently back


Ubuntu installed on an external hard disk but not working

Because you are installing to an external drive, you need to configure the bootloader to be in the MBR of the drive itself. As such, you do not want to choose the /boot partition for the installation target of the bootloader.

Instead, select the bootloader installation target as /dev/sdX, replacing X with which ever letter the rest of your partitions are under. /dev/sda is usually the hard drive, so you normally don't want that. Since you are using a USB drive to install and a USB drive as the target, you will see /dev/sdb and /dev/sdc. Choose the one that is the external drive. Please not that the letters can show up in any order and can be associated with any drive, so look carefully.

This will make it so that the drive now has a valid bootloader. If there is no loader in the MBR, the computer does not know how to load. For example, when I was running install on a pen drive, I had three partitions. /, /home, and /storage, where /storage was a NTFS partition to be shared between Windows and Ubuntu. / was /dev/sdc1, /home, was /dev/sdc2, and so on. I had the Ubuntu installer point to just /dev/sdc when installing GRUB so that the drive itself would be receiving the install, rather than one of the partitions.


I installed firefox inside the chroot and it ran from inside the chroot. Then I ran the command from outside the chroot like in the article and it ran from outside the chroot. I think they may have omitted a step in the instructions.


How to appear drive on windows if whole drive is selected as swap space?

If you set up a drive as swap, you are pretty much done with the data that used to live there. That being said, you might want to look into something like this..

Might-Just-Help


Shell scripting : Change in input stream not working as desired

Probably for the last line, or somewhere in between, there's an empty line. When you run set without arguments, it prints every variable set in the current shell. From the POSIX specification:

  If no options or arguments are specified, set shall write the names and values of all shell variables in the collation sequence of the current locale.

This will throw off your calculation, since this does not set the arguments to the empty list - you'll be adding the previous line's word count again.

You're getting that output because $line is empty, so what you should do is check if it is, in fact, empty:

while read line
do
    nol=`expr $nol + 1`
    if [ -n "$line" ]
    then
        set $line
        now=`expr $now + $#`
    fi
done

Aside from that, instead of exec <$f, I'd suggest using:

while read ..
do
    ...
done < "$f"

What your doing now is:

terminal=`tty`
exec < $f
...
exec < $terminal

You are redirecting the whole script, whereas you only need the redirection for the loop. You can skip the call to tty and the two execs:

if [ -s $f ]
then
    nol=0
    now=0

    while read line
    do
        ...
    done < "$f"
    ...
fi

And use arithmetic expansion instead of command substitution with expr:

nol=$((nol + 1))
now=$((now + $#))

And always, always, quote  your variables unless you explicitly want splitting:

[ -s "$f" ]
exec < "$f"

Consider what happens when f contains spaces:

f="there are spaces in this filename"
[ -s $f ]
exec < $f

You'll get errors, because once $f is replaced by its contents, each word in it will be seen separately:

bash: [: too many arguments
bash: $f: ambiguous redirect


Software to sync an iPod that auto converts audio and video to correct format?

Arista Transcoder is what you need.

One Click Install


I know you want the graphical app for killing a window, but there's a command line alternative, pkill app-name, for example

pkill firefox

will kill all the open firefox windows. You can use that until you find something for mir.


Setting a hotkey for connecting and disconnecting a network connection in KDE environment

Control of the NetworkManger

The NetworkManger can be controlled from the commandline:

man nmcli:

NAME
       nmcli – command‐line tool for controlling NetworkManager

SYNOPSIS
       nmcli  [ OPTIONS ] OBJECT { COMMAND | help }
...

The man page on the net: http://manpages.ubuntu.com/manpages/saucy/man1/nmcli.1.html

With the dbus:

Configuration of the Network Manager via DBus: how to set the ad hoc mode
http://cheesehead-techblog.blogspot.fi/2012/09/dbus-tutorial-fun-with-network-manager.html

Example - working at here:

Disconnecting from the current network connection and staying disconnected:

qdbus --system --literal  org.freedesktop.NetworkManager /org/freedesktop/NetworkManager/Devices/0 org.freedesktop.NetworkManager.Device.Disconnect

Connecting the network with th UUID:

1) Reading the UUID:

nmcli -p c

At here the UUID is 81540c01-2377-4d79-9763-d0f3104c81f3

2) Activating the connection:

nmcli c up uuid 81540c01-2377-4d79-9763-d0f3104c81f3

Hotkeys

One way to add the shortcuts/hotkeys is to use the KDE menu editor.

The command can be added to the KDE menu with a shortcut to run the command.

The KDE document can be found: K-Menu > Applications > Help ...

The KDE menu editor handbook on the net: http://docs.kde.org/development/en/kde-workspace/kmenuedit/index.html


The actual name should be Screen Display and not Display and monitor as this shows:

In the middle of the window uncheck the option that says Mirror Displays.

It has happened to me before where extended displays mysteriously changed to mirrored. However it's been a long time since this has happened and it's only ocurred once or twice since upgrading to 16.04 in August 2016.


How to rename (unhide) all files and subdirectories within a directory?

You can do that with find as follows:

find /path/to/test -depth -name ".*" -execdir rename -n 's|/\.|/|' {} +

This only prints the renaming actions, if it shows what you want remove the -n option.

Explanations

-depth – lets find process from bottom to top, renaming files before their parent directories
-name ".*" – lets find search for files (everything is a file) beginning with a dot – the dot is literal here, as this is not a regular expression
-execdir … + – execute … in the matched file‘s directory
rename 's|/\.|/|' {} – replace the first occurence of “/.” from the matched file’s path (find’s placeholder for which is {}) with “/”, essentially removing the dot from the beginning of the filename
This would be e.g. rename 's|/\.|/|' ./.hiddenfile1 in your case, this would be renamed to ./hiddenfile1.

Example run

$ tree -a
.
├── sub1
│   └── .hiddenfile1
└── sub2
    └── .hiddendir
        ├── .hiddendirsub
        ├── .hiddenfile2
        └── not.hidden

$ find ~/test -depth -name ".*" -execdir rename 's|/\.|/|' {} +
$ tree -a
.
├── sub1
│   └── hiddenfile1
└── sub2
    └── hiddendir
        ├── hiddendirsub
        ├── hiddenfile2
        └── not.hidden

Usage in a script

In a script you can simply use positional parameters instead of the path, it may be relative or absolute – just remember to quote correctly:

#!/bin/bash
find "$1" -depth -name ".*" -execdir rename -n 's|/\.|/|' {} +


Gnome 3.4 will be available in the default Ubuntu repositories for the 12.10 release. Ubuntu 12.04 LTS uses many 3.4 components, but to install it in full, add the GNOME3 team's PPA to your Software Sources.

Keep in mind that Gnome is a major component of your user experience, and — in this PPA — is being maintained by a third party, not Canonical. Instability may occur.

References

What are PPAs and how do I use them?


VirtualBox comes with three license versions:

Open Source: this version is free for download and use under the GPLv2 license. It is the version that is published in the Ubuntu repositories, or from other sources including Oracle. If distributed we need to make sure the license requirements are met (e.g. provide access to the source code, allow re-distribution, and more).
PUEL: as soon as we install the Oracle extension pack to an otherwise Open Source VirtualBox we will transform the license into a personal use and evaluation license. This means it is no longer possible to use it commercially for free. Only personal use, educational use, or evaluation are granted for free.
Oracle VM VirtualBox Enterprise: this is the paid closed source version available form Oracle providing enterprise support.


Open /etc/default/openvpn in you favourite text editor, and then change AUTOSTART to  AUTOSTART=all


Use the following setting and check if it works:

Connection Security : "Use old-style SSL"
     Connect port   : 5223
     Connect sever  : talk.google.com


Whoops, sorry!  I have company here and I was a little distracted.  Here is the link I referred to in my comment which might help you to make your graphics controller work better.


By default, the codecs are not installed when you install Ubuntu. If you need to install them on a computer that doesn't have internet connection, you have to use a tool like Apt on cd (aptoncd.sourceforge.net) on a computer with internet connection to create a repository disk media and use it to install the packages on the computer without internet connection.


The default PATH variable is defined in /etc/environment. To reset the path variable, open a terminal and execute the following command: . /etc/environment.

That will restore the PATH variable for the current terminal only!

To restore the .profile file copy it from the folder /etc/skel. The /etc/skel folder contains all the files that are copied to the user's home folder when a new user is created.

Also take a look at that answer: When I create a new user, how do I automatically create a .virtualenvs directory in their home directory?

If you are unable to log-in the you have to use a live-cd and then copy the content of the skeleton folder (/etc/skel) into your home directory.

Update:

To access your home or partition using a live-cd you have to mount your harddisk after you bootet up from the live-cd. Open a terminal in the live-cd and type the following:

sudo mkdir -p /mnt/root
sudo mount /dev/sda1 /mnt/root

Now your hard drive is mounted into the folder /mnt/root. Now copy the content of the skeleton folder into your home folder

cp -r /mnt/root/etc/skel/ /mnt/root/home/<your-user-name>/

The -r switch is important to copy the hidden files. Now you can unmount the disk and reboot the system cd && sync && umount /dev/sda1 && reboot (as root)

Good luck!


Problem With Black Screen When Attempting to Resume After my Laptop Hibernates

As a workaround, if you can't login you can login to tty using ctrl+shift+f2
Then
Use this command

sudo loginctl list-sessions

To get your current session
Then unlock it using this command

sudo loginctl unlock-session {session-id}


Why does removing apps frees less memory compared to installing?

When you install a software you install it and the dependencies it needs, these are other software and libraries it needs to run, but when you remove it, you only remove the software you installed.

You can remove the dependencies (assuming they're not required by something else) with:

sudo apt-get autoremove

Or in one step with the removal of the original package:

sudo apt-get autoremove ndiswrapper


So for the rest of you I hope this is useful. I disabled the onboard video, and plugged into card.

Re-ran

sudo aticonfig --adapter=all --initial -f

rebooted, all devices were enabled.

By default cgminer looks for libudev.so.0, and will not run until it's happy so I set a link up to the newest version.

cd /lib/x86_64-linux-gnu
sudo ln -s libudev.so.1.2.2 libudev.so.0

xubuntu 13.04 = happy


This server was upgraded from 12.04 and i don't know it was the problem or it is ubuntu 16.04 default behavior .

The problem was caused by dnsmasq . Actually the dnsmasq was listening on the port 53 .

/etc/default/dnsmasq

ENABLED=0

Then

service dnsmasq stop
service bind9 restart

Solved my problem .


Same happened to me. Make sure:

You have less to no Gnome extensions. They can kill your computer. So, disable all Gnome extensions to see if that helps.
Disable animations from Gnome Tweak. That made my desktop super fast.
Nvidia 396 is really laggy for me as well so use the 960 one.


It could very well be a protocol issue with the other hosts. What type of hosts are  .101 and .105? Are both Windows 10 machines?

There's a know bug on Avahi in this regard, seem to happen with both OSX and Windows 10 hosts: https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/1342400

An explanation of the interaction that causes the log can be found at: https://github.com/lathiat/avahi/issues/10/#issuecomment-131972196:

  The patch in that bug deals with OSX mDNS response packets that include Additional RRs, but do not include Answer RRs.
  Windows 10 does something different. It sends responses to all mDNS queries, whether or not it has any records for those requests.
  That is, it responds with a mDNS packet containing 0 Answer RRs and 0 Additional RRs. This appears to me to be in violation of RFC 6762 (Multicast DNS) Section 6, which states "A Multicast DNS responder MUST only respond when it has a positive, non-null response to send, or it authoritatively knows that a particular record does not exist." I don't know how to file a bug with Microsoft, but IMHO this should probably be addressed on their side.


Run find command on only local mount points

If you use find you can use the option (from man find):

-xdev  Don't descend directories on other filesystems.


use vlc:

Go to Media -> Open Multiple Files....
In the Open Media window, click Add....
In the Select one or multiple files window, select the desired video file. Click Open.
In the Open Media window, tick Show more options, then tick Play another media synchronously. Click Browse....
In the second Open Media window, click Add....
In the Select one or multiple files window, select the desired file that contains the audio which will be played on top of the video previously selected. (The file that contains the audio can be a video file.) Click Open.
In the second Open Media window, click Select.
In the first Open Media window, click Play.
Go to Audio -> Audio track -> Track 2. (If you have more than one track available, pick the one that corresponds to the desired audio overlay.)


Starting dropbox at the start of the computer

In order to start Dropbox at the startup you need to open Startup applications and click on Add. It would be having 3 fields Name, Command and Comment. Set name as Dropbox, command as ~/.dropbox-dist/dropboxd and comment whatever you want and click on Add

Hope it helps.:-)


Ubuntu unattended Server install not recognising seed files when installing from USB

After a lot of testing and trial and error, I have figured out that an install from USB does not use the same boot cfg file that a CD or ISO do.

Instead of /cdrom/isolinux/txt.cfg it uses /cdrom/boot/grub/grub.cfg. However you need to edit this file a bit differently as they are formated differently.

I ended up adding this just under the 'Set timeout=30'

  menuentry "Autoinstall Netson Ubuntu Server" {
      set gfxpayload=keep
      linux /install/vmlinuz append file=/cdrom/preseed/ubuntu-server.seed initrd=/install/initrd.gz auto=true priority=high preseed/file=/cdrom/preseed/neetson.seed quiet ---
      initrd  /install/initrd.gz
  }

I am not sure this is 100% the correct way to do it as I am very new to all this and only recently started using Linux due to requirements.

If anyone has a better answer please do share.


The solution for me was to remove the file /etc/.pwd.lock. I don't know why, but I read on a bug report page that deleting .lock files in the /etc directory often fixes guest login problems.

It didn't change the white input fields, but that is probably totally unrelated, it only changed at the same time.


apt-get will not shut off after failed install of app

To release the lock, go to a terminal and issue the following commands...

sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock