Can’t connect to GNOME desktop [on hold]

We have a linux server installed with RHEL 7.4.

My administrator has installed GNOME on this.

It’s within my network, and i’m trying to remotely connect on to this, but i’ve tried installing VNC on it, as well as X2G0 server, and when I connect all I get is a black screen.

I run sudo gnome-session on the box via SSH, then connect to a gnome session on the X2G0 client on Windows 10, and it opens a new session but it’s just a black screen.

Am I missing something really obvious? I’ve tried just running startx and xinit but these fail.

You’ll have to accept my apologies over my lack of info, i’ve never used LINUX before and we have nobody within the company with any knowledge on it!

Programatically mount network location securely in Linux with Go

In Linux I can mount a network location programatically with Go like this:

func main() {
  var user, pass string
  fmt.Println("username:")
  fmt.Scanln(&user) // ignore errors for brevity
  fmt.Println("password:")
  fmt.Scanln(&pass)

  cmd := exec.Command("mount", "-t", "cifs", "-o", "username="+user+",password="+pass, "//server/dir", "media/dir")
  cmd.Run()
}

The problems:

  1. -t and -o flags require the program to be run with sudo.
  2. Username and password will be provided by the user. This seems very unsafe. Can anyone confirm on the safety or danger of this approach?

Here’s a similar approach with variables:

cmd := exec.Command("mount", "-t", "cifs", "-o", "username=$USER,password=$PASS", "//server/dir", "media/dir")
cmd.Env = []string{"USER="+user, "PASS="+pass}
cmd.Run()

That does not work. It seems that exec.Command() function escapes the dollar sign, so the values in the env variables aren’t replaced there. So this seems to indicate some type of safety or escaping going on here.

Editing the etc/fstab file would allow me to run mount without sudo but then I’d need sudo to edit the fstab file, so back to square one.

TCP TPROXY Linux [on hold]

For a project i am working for i would like to filter requests and response on tcp-level. The primary aim is to drop connections where the tls-ceritificate of the server is not in a whitelist. Thats not the problem but, i am looking for a “pre-built” tcp proxy which handles all clients requests and where i can easily implement my module for filtering the certificates. It’s very important that the proxy works in a transparent mode. I searched for hours but didnt find the right…
The OS will be Centos7.
I hope you have some ideas for me!

install gstreamer1.0-plugins-good but no such element or plugin ‘v4l2src’

i have an embedded device (friendlyarm smart4418) with debian jessie linux. i install gstreamer 1.0 and install all gstreamer pluggins.
when run

gst-inspect-1.0 -b

output is

libgstvideo4linux2.so

but when run

gst-inspect-1.0 v4l2src

output is

No such element or plugin 'v4l2src'

and output of dpkg -L gstreamer1.0-plugins-good is

> /.
/usr
/usr/lib
/usr/lib/arm-linux-gnueabihf
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgst1394.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstaasink.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstalaw.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstalphacolor.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstalpha.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstapetag.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstaudiofx.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstaudioparsers.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstauparse.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstautodetect.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstavi.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstcacasink.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstcairo.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstcutter.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstdebug.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstdeinterlace.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstdtmf.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstdv.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgsteffectv.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstequalizer.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstflac.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstflv.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstflxdec.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstgdkpixbuf.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstgoom.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstgoom2k1.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgsticydemux.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstimagefreeze.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstinterleave.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstid3demux.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstjack.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstjpeg.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstlevel.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstmatroska.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstmonoscope.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstmulaw.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstmultifile.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstmultipart.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstnavigationtest.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstpng.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstossaudio.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstoss4audio.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstisomp4.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstreplaygain.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstrtp.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstrtpmanager.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstrtsp.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstshapewipe.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstshout2.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstsmpte.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstsouphttpsrc.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstspectrum.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstspeex.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgsttaglib.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstudp.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstvideo4linux2.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstvideobox.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstvideocrop.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstvideofilter.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstvideomixer.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstvpx.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstwavenc.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstwavpack.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstwavparse.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgstximagesrc.so
/usr/lib/arm-linux-gnueabihf/gstreamer-1.0/libgsty4menc.so
/usr/share
/usr/share/locale
/usr/share/locale/ja
/usr/share/locale/ja/LC_MESSAGES
/usr/share/locale/ja/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/zh_TW
/usr/share/locale/zh_TW/LC_MESSAGES
/usr/share/locale/zh_TW/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/zh_HK
/usr/share/locale/zh_HK/LC_MESSAGES
/usr/share/locale/zh_HK/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/zh_CN
/usr/share/locale/zh_CN/LC_MESSAGES
/usr/share/locale/zh_CN/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/sr
/usr/share/locale/sr/LC_MESSAGES
/usr/share/locale/sr/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/sq
/usr/share/locale/sq/LC_MESSAGES
/usr/share/locale/sq/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/sl
/usr/share/locale/sl/LC_MESSAGES
/usr/share/locale/sl/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/ro
/usr/share/locale/ro/LC_MESSAGES
/usr/share/locale/ro/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/pt_BR
/usr/share/locale/pt_BR/LC_MESSAGES
/usr/share/locale/pt_BR/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/or
/usr/share/locale/or/LC_MESSAGES
/usr/share/locale/or/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/nl
/usr/share/locale/nl/LC_MESSAGES
/usr/share/locale/nl/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/nb
/usr/share/locale/nb/LC_MESSAGES
/usr/share/locale/nb/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/mt
/usr/share/locale/mt/LC_MESSAGES
/usr/share/locale/mt/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/lv
/usr/share/locale/lv/LC_MESSAGES
/usr/share/locale/lv/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/id
/usr/share/locale/id/LC_MESSAGES
/usr/share/locale/id/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/hu
/usr/share/locale/hu/LC_MESSAGES
/usr/share/locale/hu/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/gl
/usr/share/locale/gl/LC_MESSAGES
/usr/share/locale/gl/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/fr
/usr/share/locale/fr/LC_MESSAGES
/usr/share/locale/fr/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/fi
/usr/share/locale/fi/LC_MESSAGES
/usr/share/locale/fi/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/eu
/usr/share/locale/eu/LC_MESSAGES
/usr/share/locale/eu/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/es
/usr/share/locale/es/LC_MESSAGES
/usr/share/locale/es/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/eo
/usr/share/locale/eo/LC_MESSAGES
/usr/share/locale/eo/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/en_GB
/usr/share/locale/en_GB/LC_MESSAGES
/usr/share/locale/en_GB/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/de
/usr/share/locale/de/LC_MESSAGES
/usr/share/locale/de/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/da
/usr/share/locale/da/LC_MESSAGES
/usr/share/locale/da/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/af
/usr/share/locale/af/LC_MESSAGES
/usr/share/locale/af/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/hr
/usr/share/locale/hr/LC_MESSAGES
/usr/share/locale/hr/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/el
/usr/share/locale/el/LC_MESSAGES
/usr/share/locale/el/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/vi
/usr/share/locale/vi/LC_MESSAGES
/usr/share/locale/vi/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/uk
/usr/share/locale/uk/LC_MESSAGES
/usr/share/locale/uk/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/tr
/usr/share/locale/tr/LC_MESSAGES
/usr/share/locale/tr/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/sv
/usr/share/locale/sv/LC_MESSAGES
/usr/share/locale/sv/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/sk
/usr/share/locale/sk/LC_MESSAGES
/usr/share/locale/sk/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/ru
/usr/share/locale/ru/LC_MESSAGES
/usr/share/locale/ru/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/pl
/usr/share/locale/pl/LC_MESSAGES
/usr/share/locale/pl/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/lt
/usr/share/locale/lt/LC_MESSAGES
/usr/share/locale/lt/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/it
/usr/share/locale/it/LC_MESSAGES
/usr/share/locale/it/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/cs
/usr/share/locale/cs/LC_MESSAGES
/usr/share/locale/cs/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/ca
/usr/share/locale/ca/LC_MESSAGES
/usr/share/locale/ca/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/bg
/usr/share/locale/bg/LC_MESSAGES
/usr/share/locale/bg/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/locale/az
/usr/share/locale/az/LC_MESSAGES
/usr/share/locale/az/LC_MESSAGES/gst-plugins-good-1.0.mo
/usr/share/gstreamer-1.0
/usr/share/gstreamer-1.0/presets
/usr/share/gstreamer-1.0/presets/GstIirEqualizer10Bands.prs
/usr/share/gstreamer-1.0/presets/GstIirEqualizer3Bands.prs
/usr/share/gstreamer-1.0/presets/GstVP8Enc.prs
/usr/share/doc
/usr/share/doc/gstreamer1.0-plugins-good
/usr/share/doc/gstreamer1.0-plugins-good/README.gz
/usr/share/doc/gstreamer1.0-plugins-good/NEWS.gz
/usr/share/doc/gstreamer1.0-plugins-good/changelog.Debian.gz
/usr/share/doc/gstreamer1.0-plugins-good/changelog.gz
/usr/share/doc/gstreamer1.0-plugins-good/copyright
/usr/share/doc/gstreamer1.0-plugins-good/README.Debian
/usr/share/doc/gstreamer1.0-plugins-good/AUTHORS

Linux Create a group admin login and user logins at specific home directory [on hold]

I am looking to create a SFTP server with proper ACLs in place. What I am looking to build a system is something like:
I will have two groups : Group1 and Group2
Both Groups will have some users like user1, user2, user3 in both groups
So I should have something like this
<br /> Group1 : user1 /home/Group1/user1<br /> Group1 : user2 /home/Group1/user2<br /> Group2 : user1 /home/Group2/user2<br /> Group2 : user2 /home/Group2/user3<br />
when user1 of group1 logins, its home directory to sftp should be /home/Group1/user1 and should not have access to any other directory. Same applies to all directories and users.

Now I am looking for a root group user which should have a permission at group level. Example:
/home/Group1 should be accessible by admin1 and /home/group2/ should be accessible by admin2 but admin1 should not be able to access admin2 directory.

Appreciate with the help in how can I setup admin users in the above scenraio. I am able to create users, add them to some groups and force them to there directories in sftp connection.

How to interleave lines from two text files

What’s the easiest/quickest way to interleave the lines of two (or more) text files? Example:

File 1:

line1.1
line1.2
line1.3

File 2:

line2.1
line2.2
line2.3

Interleaved:

line1.1
line2.1
line1.2
line2.2
line1.3
line2.3

Sure it’s easy to write a little Perl script that opens them both and does the task. But I was wondering if it’s possible to get away with fewer code, maybe a one-liner using Unix tools?

NTFS Sparse file and ADS in .NET Core running in Docker on Linux?

Is there any chance I can utilize NTFS features such as Sparse files and Alternate Data Stream when using .NET Core and deploying to Docker on Linux? For both read and write.

If not now, will there ever be any .NET interface for using similar features on different file systems through .NET Core?

Also on my wish list is “extended attributes”.