Linux Programmer | RHCE | RHCSA

Search This Blog

Wednesday, 28 March 2018

Disable default keyring password in ubuntu

Disable default keyring password popup

1. Remove old password entry of default keyring

rm -rf ~/.local/share/keyrings

2. Then next time it is ask for the new password then do not enter any password,

just click on "Continue" button.

then it will ask to save unencrypted password,

Again press on "Continue" button.

from next time it will not ask for the password.

Tuesday, 6 March 2018

VMware client installation & USB Redirection (Ubuntu 14.04)

VMware Horizon client for linux installtion process
VMware Horizon Clients for Windows, Mac, iOS, Linux, and Android allow you to connect to your VMware Horizon virtual desktop from your device of choice giving you on-the-go access from any location.

You can Download VMware client for different versions of OS from here.
we are going to install VMware for 32 bit linux.
1. After Downloading you have .bundle file 
assign full permission to this file,
$ chmod 0777 /home/$user/VMware-Horizon-Client-4.7.0-7395152.x86.bundle
Execute this file,
$ sudo /home/$user//VMware-Horizon-Client-4.7.0-7395152.x86.bundle
You got the VMware installer, Install the software.
After installation press on scan button.
2. Open command prompt as normal user (not root)
$ vmware-view
 (Now, VMware Desktop Application will open, you can create connections and connect with the server from there.)


USB/Printers redirection with VMware Horizon client
Performing this procedure is usually not necessary if you have Horizon Client 3.4 or later because you can specify during client installation that the installer should register and start installed services after installation. When the user launches the client, a configuration file is automatically created and placed in the user's home directory.
Procedure
  1. Open a Terminal window and enter a command to create a folder named .thnuclnt in the home directory.
    $ mkdir ~/.thnuclnt/
    Note:
    Because this file is created in a specific user's home directory, the file needs to be created for each user who will be using the Linux client system.
  2. Use a text editor to create a configuration file called thnuclnt.conf in the ~/.thnuclnt folder, and add the following text to the file:
       autoupdate = 15
       automap = true
       autoid = 0
       updatecount = 1
       editcount = 0
       
       connector svc {
          protocol = listen
          interface = /home/user/.thnuclnt/svc
          setdefault = true
       }
    
    In this text, substitute the user name for user.
  3. Save and close the file.
  4. Enter a command to start the thnuclnt process.
    $ thnuclnt -fg
  5. Enter the commands to set the environment variables for the virtual printing components.
    $ export TPCLIENTADDR=/home/user/.thnuclnt/svc
    $ export THNURDPIMG=/usr/bin/thnurdp
    
  6. To launch Horizon Client, start the vmware-view process.
    The printers that normally appear in the client are now also redirected so that they appear in the Print dialog boxes in your remote desktop.
  7. (Optional) If you ever want to disable the virtual printing feature, use the following steps:
    1. Enter a command to stop the thnuclnt process.
      $ killall thnuclnt
    2. Disconnect from the remote desktop and reconnect to the desktop.
    The printers will no longer be redirected.

If Still Printers are not redirected then,

Note : create the config file if not exists and add the below settings.

$ nano /home/user/.vmware/config
viewusb.AllowAutoDeviceSpiltting = "true"

$ nano /etc/vmware/config
viewusb.AllowAutoDeviceSpiltting = "true"


Then, Remove VMware client(Without removing existing settings)

you can visit here for more,

to uninstall vmware-client

$ vmware-installer -h

Then, Again Reinstall the Vmwareclient with .bundle file .

And it works !!!



Leave reply, if it works for you.

Friday, 16 February 2018

Autologin Ubuntu 16.04 with LightDM

Autologin with LighDM in ubuntu 16.04

$ touch /etc/lightdm/lightdm.conf

open file and add the below entry

$ nano /etc/lightdm/lightdm.conf

[SeatDefaults]
autologin-user=lubuntu
autologin-user-timeout=0
greeter-session=lightdm-gtk-greeter
greeter-hide-users=true
user-session=Lubuntu
session-cleanup-script=service lightdm restart



Start VNC Server


x11vnc -shared -forever -xkb  -rfbport 5007 -httpport 5009 -repeat &
vncviewer -fullscreen -viewonly -listen &

Saturday, 30 December 2017

Folder not deleted from root folder with root user

check the /root/.bashrc script

you can check the aliases are created or not for some commands like kill,killall,chattr

if you found anything like this then remove  it

then write the below command to check the attributes of the folder which is not deleted.

lsattr /root/.folder_name

if this will show the output like
----i-----e-----  /root/.folder_name

you can follow the article below

Attribute “i

Sometimes it might be very useful to render a file immutable – nobody (not even the root user) will be able to edit, rename, move or delete this file. The way to do that on a Linux file system is by using file attributes (also called flags) and more specifically the “i“-immutable file attribute.
On a Linux system, there are two commands for working with file attributes. These are:
  • chattr – this is the command, which is used to set file attributes to files. Some attributes, including the immutable attribute can only be set by the superuser.
  • lsattr – this is the command that is used to display the attributes currently set for a file.
I will illustrate the use of file attributes by the simple example below:
We create an empty file:
root@server:~# touch example.txt
Let’s list the current attributes of this file:
root@server:~# lsattr example.txt
-----------------e- example.txt
As you can see the only flag set for this newly created file is the “e” flag which is on by default for all Linux files on an ext4 file system.
Now, let’s set the “i” flag for this file. Remember that by default, only a superuser can do this:
root@server:~# chattr +i example.txt
Let’s list the attributes now:
root@server:~# lsattr example.txt
----i------------e- example.txt
As you can see the “i” flag is visible now.
To test the functionality, I will try to modify the file in several ways:
root@server:~# mv example.txt renamed.txt
mv: cannot move `example.txt' to `renamed.txt': Operation not
permitted

root@server:~# rm -f example.txt
rm: cannot remove `example.txt': Operation not permitted

root@server:~# echo "Some string" > example.txt
bash: example.txt: Permission denied
As can be seen from the above examples, we cannot move, delete or add content to this file.
To remove the immutable attribute from a file you need to use the chattr command again. For example:
root@server:~# chattr -i example.txt
root@server:~# lsattr example.txt
-----------------e- example.txt

Attribute “a

Another useful file attribute is the “a” attribute. The “a” stands for “append” and this flag indicates that a file can only be opened for append operations, i.e. additional content can only be added to the file but none of the existing content can be modified.
The functionality can be easily illustrated with the example below:
First, set the “a” attribute:
root@server:~# chattr +a example.txt
root@server:~# lsattr example.txt
-----a-----------e- example.txt
Next, attempt to modify the file:
root@server:~# rm -f example.txt
rm: cannot remove `example.txt': Operation not permitted

root@server:~# mv example.txt renamed.txt
mv: cannot move `example.txt' to `renamed.txt': Operation not
permitted

root@server:~# echo "replacing content" > example.txt
bash: example.txt: Operation not permitted

root@server:~# echo "appending new content" >> example.txt
Only the last operation that we attempted on this file was successful because it just appended the “appending new content” string to the end of the file without modifying its existing content.

M3 Button not working in Wayland

Mouse M3 button not working in wayland - ubuntu 26.04 1. Check your desktop Run: echo $XDG_SESSION_TYPE echo $XDG_CURRENT_DESKTOP 2. If...