Thursday, October 10, 2019

Automatically Mount Partition on Fedora

Make sure you can run a graphical application as root (please refer to the previous post) or you logged in as root on a graphical session.

Run gnome-disks:
> gnome-disks --gapplication-service

Select the partition and click on the Settings button.

Right-click and select: "Edit Mount Options..."

Configure at will. Remember to choose a "Display Name".

Reference
  1. How To Auto-mount Partitions On Startup Using Gnome Disks

Running a Graphical Application as root on Fedora

If you, as a regular user, want to run a graphical application with root privileges, you can do the following from your account:

First check you belong to the wheel group (you can invoke sudo).

Create a file with the following script in a file named, for example, wsudo:

#!/bin/bash
# -*- ENCODING: UTF-8 -*-
#small script to enable root access to x-windows system 
xhost +SI:localuser:root
notify-send "ALERT: Enable root user on xhost"
beesu $1
#disable root access after application terminates
xhost -SI:localuser:root
#print access status
notify-send "Disable root user on xhost"

Export the display:
> export DISPLAY=:0.0

then run the graphical application like this:
> ~/bin/wsudo appname

You will be prompted for your password and you're done!

Friday, July 12, 2019

Windows 10: You Don't Have Permission to Access

You mount an external drive while sitting at your home desk and now you don't have access to some directories anymore.
What I did to solve this is:
  • Select the drive and open the Properties -> Security tab.
  • Go to Advanced.
  • Change ownership to "Everyone"
  • Absolutely remember to check: "Replace all child object permissions entries with inheritable permission entries from this object."
That's it.