LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-30-2017, 08:48 AM   #1
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
In Fluxbox trying to cli a text editor and file and no go x org error.


Trying to get ma' thumbnailer working, it is not producing thumbnails for mp4 movies. So when I went to open up the file for it to take a look see, I got this instead of the application opening the file. Both Kwrite, and greany.

Fluxbox

Code:
(userx@slacko⚡️~)>>$ sudo kwrite /usr/share/thumbnailers/pcmanfm.thumbnailer
No protocol specified
kwrite: cannot connect to X server :0
(userx@slacko⚡️~)>>$ sudo geany  /usr/share/thumbnailers/pcmanfm.thumbnailer
No protocol specified
Geany: cannot open display
what more info needed, I will get it.
 
Old 01-30-2017, 09:09 AM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,098

Rep: Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175
regarding the other issue you got, FYI, to have video thumbnail in pcmanfm you need ffmpegthumbnailer: note that, like written in the README, "supported videoformats depend on the configuration flags of [its dependency] ffmpeg".

Last edited by ponce; 01-30-2017 at 09:12 AM.
 
Old 01-30-2017, 09:16 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by ponce View Post
regarding the other issue you got, FYI, to have video thumbnail in pcmanfm you need ffmpegthumbnailer: note that, like written in the README, "supported videoformats depend on the configuration flags of [its dependency] ffmpeg".
installed already -- ffmpegthumbnailer -- that is why I was investigating the pcmanfm.thumbnailer file ..

This does work in Void Linux, I had it working in here once,
Thanks though.. though I might have to check which one I installed, it was a while ago... it is one of them little things that need to be fixed to get it working (again). I'm just getting around to it.

Last edited by BW-userx; 01-30-2017 at 09:22 AM.
 
Old 01-30-2017, 09:17 AM   #4
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
I fix this problem due to .Xauthority


Quote:
Eventually, run the following command as the user that you want to get access with, on the server:

xauth info

This will show the 'Authority file' that will be used (/root/.Xauthority by default, for root, or something like /home/theuser/.Xauthority). If it shows the correct .Xauthority file then you don't have to worry about the XAUTHORITY environment variable actually (actually, I wouldn't know when it wouldn't, except if you want to manipulate a non-standard place of that file).

Remove that file (if it even exists):

rm /root/.Xauthority

Replace /root/.Xauthority with the correct XAUTHORITY file for your case.

Recreate it, but empty (this is needed for a lot of commands):

touch /root/.Xauthority

At this point you'll get the No protocol specified error, even if you got Invalid MIT-MAGIC-COOKIE-1 before. Find the authority file that the X server is using at the moment:

ps aux | grep Xorg

This should show something like:

root 1153 0.0 1.0 149560 44464 tty7 Ss+ dec02 0:00 /usr/lib/xorg/Xorg -nolisten tcp -auth /var/run/sddm/{ef18c483-7891-4e82-80ef-2c8f9bd79711} -background none -noreset -displayfd 17 vt7

The file name after -auth is what you need in the next command. Run this as root:

sudo xauth -f '/var/run/sddm/{ef18c483-7891-4e82-80ef-2c8f9bd79711}' list

That lists a 32 digit hexadecimal key. For example the output could be:

hostname/unix:0 MIT-MAGIC-COOKIE-1 c0eaf749aa252101a0f57d5087089db7

Use that to generate your .Xauthority file (as user who needs to login again):

xauth add $DISPLAY MIT-MAGIC-COOKIE-1 c0eaf749aa252101a0f57d5087089db7

replace 'c0eaf749aa252101a0f57d5087089db7' with what was returned by the list command for you. Now your .Xauthority should be size 51 bytes and you can connect to the X server (again).
reference:
http://unix.stackexchange.com/questi...ed-for-su-user
 
Old 01-30-2017, 09:54 AM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by ponce View Post
regarding the other issue you got, FYI, to have video thumbnail in pcmanfm you need ffmpegthumbnailer: note that, like written in the README, "supported videoformats depend on the configuration flags of [its dependency] ffmpeg".
Haha like I thought, it was just one of them little things missing like, ffmpeg itself .. lol fixed that too..
 
Old 01-30-2017, 10:09 AM   #6
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
well I thought it was sovled untill this hapened

rebooted then tried it again and got this...
Code:
(userx@slacko⚡️~)>>$ sudo kwrite &
[1] 31933
(userx@slacko⚡️~)>>$ Invalid MIT-MAGIC-COOKIE-1 keykwrite: cannot connect to X server :0
^C
[1]+  Exit 1                  sudo kwrite
(userx@slacko⚡️~)>>$ sudo geany
Invalid MIT-MAGIC-COOKIE-1 keyGeany: cannot open display
so that fix I posted didn't permanently work
 
Old 01-30-2017, 10:29 AM   #7
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Don't run GUI apps as root. They simply weren't designed for it.
A better workflow would be:
Code:
cp /somewhere/somefile /tmp
kwrite /tmp/somefile
# And if you want to put the changes back...
sudo cp /tmp/somefile /somewhere/somefile
 
Old 01-30-2017, 10:44 AM   #8
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by GazL View Post
Don't run GUI apps as root. They simply weren't designed for it.
A better workflow would be:
Code:
cp /somewhere/somefile /tmp
kwrite /tmp/somefile
# And if you want to put the changes back...
sudo cp /tmp/somefile /somewhere/somefile
mmmm

even /tmp requires root priv yes?

but I do get your methodology

sudo nano /etc/somefile ???

well Slack does do somethings differently

thanks
 
Old 01-30-2017, 11:13 PM   #9
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
If you really want to run GUI apps as root (which most of the time, there shouldn't be a reason for it, but it can happen occasionally), you can use kdesu, which is included in a full Slackware install (it is obviously part of KDE), or you could get gksu from SBo. This will set the environment correctly and shouldn't affect permissions in your regular user's home folder (which is a common issue when using su or sudo for GUI apps).
 
1 members found this post helpful.
Old 01-31-2017, 05:55 AM   #10
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Original Poster
Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by bassmadrigal View Post
If you really want to run GUI apps as root (which most of the time, there shouldn't be a reason for it, but it can happen occasionally), you can use kdesu, which is included in a full Slackware install (it is obviously part of KDE), or you could get gksu from SBo. This will set the environment correctly and shouldn't affect permissions in your regular user's home folder (which is a common issue when using su or sudo for GUI apps).
Like you said on occasions. Mostly I use nano but yeah I just like working with a gui when the file maybe big or copy paste mab required, (ooh I know that already, got a be careful with copy paste).

But there was an incident not long ago when I was having problems with my clock no syncing with my other distro, had I copy pasted instead of relying on my finders. they took a break and the word never got finished being completely typed out. Due to my fingers not doing what they should have when my brain did. the time wasn't being set properly. that being said on copy paste.


yeah GUI, It is easier to scroll down and for me to do things to it. especially with a desktop file, I'll chop out all of that non needed added defs to shorten it up.

I'm just use to running sudo program name - edit - save - done.



kdesu in fluxbox
gksu I've used before.
got a get / change habits I suppose.

thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CLI RTF text editor? linus72 Linux - General 4 08-23-2013 12:40 AM
Which CLI / Text editor has greatest number of features ? frenchn00b General 1 06-20-2010 04:10 AM
Which light text editor can copy text from file and paste in browser? davidas Linux - Software 9 03-06-2006 11:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:21 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration