Page 1 of 1

Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 1:50 pm
by bobbee
I use a news reader called "newsboat".

Anyway I created a launcher, added an icon and have it run in terninal.

The way that Newsboat works is, when one opens a link, it opens it with another application, usually a browser, but I can stream to mpv. Or other program.

It did work, and very well.

But recently, I did a fresh install of mx21, keeping my home folder and settings.

And now, newsboat still runs from the launcher, but when I open a link, it won't open it, the applications fail to run.

The errors indicate that problems with permissions to access programs and other files.

It does work as a normal user from a terminal that I manually open.


So what changed? And why the problems when using it from a launcher?

Is there a way to give it permissions or something?

newsboat config

Code: Select all

auto-reload yes

confirm-exit yes

external-url-viewer "urlview"

bind-key j down
bind-key k up
bind-key j next articlelist
bind-key k prev articlelist
bind-key J next-feed articlelist
bind-key K prev-feed articlelist
bind-key G end
bind-key g home
bind-key d pagedown
bind-key u pageup
bind-key l open
bind-key h quit
bind-key a toggle-article-read
bind-key n next-unread
bind-key N prev-unread
bind-key D pb-download
bind-key U show-urls
bind-key x pb-delete
bind-key LEFT quit
bind-key RIGHT open


color listnormal cyan default dim
color listfocus cyan default 

color listnormal_unread color183 default  
color listfocus_unread color183 default bold

color info red black bold
color article white default 


# highlight feedlist "---.*---" color87 default bold
highlight feedlist "---.*---" blue default bold
# highlight feedlist "---.*---" [COLOR_OF_YOUR_CHOOSING] default bold
highlight feedlist ".*0/0.." default default invis

browser librewolf
macro , open-in-browser

# macro m set browser "/mnt/data/exe/usr/mpvd"; open-in-browser; set browser librewolf
macro m set browser "/usr/bin/mpv"; open-in-browser; set browser librewolf
macro a set browser " /mnt/data/exe/usr/audaciousd "; open-in-browser ; set browser librewolf
The config is mostly color settings
Ad the macros are to set it to open links in different apps.

Quick system Info

Code: Select all

System:    Kernel: 5.14.0-4mx-amd64 x86_64 bits: 64 compiler: gcc v: 10.2.1 
           parameters: BOOT_IMAGE=/vmlinuz-5.14.0-4mx-amd64 
           root=UUID=<filter> ro quiet splash 
           Desktop: Xfce 4.16.0 tk: Gtk 3.24.24 info: xfce4-panel wm: xfwm 4.16.1 vt: 7 
           dm: LightDM 1.26.0 Distro: MX-21.1_ahs_x64 Wildflower November 22  2021 
           base: Debian GNU/Linux 11 (bullseye) 
Machine:   Type: Laptop System: ASUSTeK product: VivoBook_ASUSLaptop X509DAP_M509DA v: 1.0 
           serial: <filter> 
           Mobo: ASUSTeK model: X509DAP v: 1.0 serial: <filter> UEFI: American Megatrends 
           v: X509DAP.302 date: 10/08/2021 
Battery:   ID-1: BAT0 charge: 28.1 Wh (100.0%) condition: 28.1/32.0 Wh (87.8%) volts: 7.6 
           min: 7.6 model: ASUSTeK ASUS Battery type: Li-ion serial: N/A status: Not charging 
           cycles: 8 
CPU:       Info: Dual Core model: AMD Athlon Silver 3050U with Radeon Graphics bits: 64 
           type: MCP arch: Zen family: 17 (23) model-id: 18 (24) stepping: 1 microcode: 8108109 
           cache: L2: 1024 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 9182 
           Speed: 2223 MHz min/max: 1400/2300 MHz boost: enabled Core speeds (MHz): 1: 2223 
           2: 1786 
           Vulnerabilities: Type: itlb_multihit status: Not affected 
           Type: l1tf status: Not affected 
           Type: mds status: Not affected 
           Type: meltdown status: Not affected 
           Type: spec_store_bypass 
           mitigation: Speculative Store Bypass disabled via prctl and seccomp 
           Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer sanitization 
           Type: spectre_v2 
           mitigation: Full AMD retpoline, IBPB: conditional, STIBP: disabled, RSB filling 
           Type: srbds status: Not affected 
           Type: tsx_async_abort status: Not affected 
Graphics:  Device-1: AMD Picasso vendor: ASUSTeK driver: amdgpu v: kernel bus-ID: 03:00.0 
           chip-ID: 1002:15d8 class-ID: 0300 
           Device-2: IMC Networks USB2.0 VGA UVC WebCam type: USB driver: uvcvideo 
           bus-ID: 1-6.2:5 chip-ID: 13d3:5a11 class-ID: 0e02 
           Display: x11 server: X.Org 1.20.13 compositor: xfwm4 v: 4.16.1 driver: 
           loaded: amdgpu,ati unloaded: fbdev,modesetting,vesa display-ID: :0.0 screens: 1 
           Screen-1: 0 s-res: 1366x768 s-dpi: 96 s-size: 361x203mm (14.2x8.0") 
           s-diag: 414mm (16.3") 
           Monitor-1: eDP res: 1366x768 hz: 60 dpi: 101 size: 344x194mm (13.5x7.6") 
           diag: 395mm (15.5") 
           OpenGL: renderer: AMD RAVEN2 (DRM 3.42.0 5.14.0-4mx-amd64 LLVM 12.0.1) 
           v: 4.6 Mesa 21.2.5 direct render: Yes 
Audio:     Device-1: AMD Raven/Raven2/Fenghuang HDMI/DP Audio driver: snd_hda_intel v: kernel 
           bus-ID: 03:00.1 chip-ID: 1002:15de class-ID: 0403 
           Device-2: AMD Raven/Raven2/FireFlight/Renoir Audio Processor driver: snd_pci_acp3x 
           v: kernel alternate: snd_rn_pci_acp3x bus-ID: 03:00.5 chip-ID: 1022:15e2 
           class-ID: 0480 
           Device-3: AMD Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel 
           bus-ID: 03:00.6 chip-ID: 1022:15e3 class-ID: 0403 
           Sound Server-1: ALSA v: k5.14.0-4mx-amd64 running: yes 
           Sound Server-2: PulseAudio v: 14.2 running: yes 
Network:   Device-1: Realtek RTL8821CE 802.11ac PCIe Wireless Network Adapter vendor: AzureWave 
           driver: rtl8821ce v: v5.5.2.1_35598.20191029 modules: rtw88_8821ce,wl port: f000 
           bus-ID: 01:00.0 chip-ID: 10ec:c821 class-ID: 0280 
           IF: wlan0 state: down mac: <filter> 
           Device-2: ASIX AX88179 Gigabit Ethernet type: USB driver: ax88179_178a 
           bus-ID: 2-1.4:4 chip-ID: 0b95:1790 class-ID: ff00 serial: <filter> 
           IF: eth0 state: up speed: 1000 Mbps duplex: full mac: <filter> 
           IF-ID-1: tun0 state: unknown speed: 10 Mbps duplex: full mac: N/A 
Bluetooth: Device-1: IMC Networks Bluetooth Radio type: USB driver: btusb v: 0.8 bus-ID: 1-6.1:4 
           chip-ID: 13d3:3529 class-ID: e001 serial: <filter> 
           Report: hciconfig ID: hci0 rfk-id: 3 state: up address: <filter> bt-v: 2.1 lmp-v: 4.2 
           sub-v: 8821 hci-v: 4.2 rev: c 
           Info: acl-mtu: 820:8 sco-mtu: 255:12 link-policy: rswitch hold sniff park 
           link-mode: slave accept service-classes: rendering, capturing, audio 
Drives:    Local Storage: total: 1.38 TiB used: 356.78 GiB (25.3%) 
           SMART Message: Unable to run smartctl. Root privileges required. 
           ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Western Digital model: WD Blue SN570 500GB 
           size: 465.76 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s lanes: 4 
           type: SSD serial: <filter> rev: 234100WD temp: 31.9 C scheme: GPT 
           ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST1000LM048-2E7172 
           size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s 
           type: HDD rpm: 5400 serial: <filter> rev: 0001 scheme: GPT 
           ID-3: /dev/sdb maj-min: 8:16 type: USB model: Mass Storage Device size: 14.41 GiB 
           block-size: physical: 512 B logical: 512 B type: N/A serial: <filter> rev: 1.00 
           scheme: MBR 
           SMART Message: Unknown USB bridge. Flash drive/Unsupported enclosure? 
Partition: ID-1: / raw-size: 48.83 GiB size: 47.76 GiB (97.81%) used: 12.06 GiB (25.2%) fs: ext4 
           dev: /dev/nvme0n1p6 maj-min: 259:6 
           ID-2: /boot raw-size: 512 MiB size: 487.2 MiB (95.16%) used: 184.3 MiB (37.8%) 
           fs: ext4 dev: /dev/nvme0n1p5 maj-min: 259:5 
           ID-3: /boot/efi raw-size: 100 MiB size: 96 MiB (96.00%) used: 25.2 MiB (26.3%) 
           fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1 
           ID-4: /home raw-size: 68.36 GiB size: 66.79 GiB (97.70%) used: 70.8 MiB (0.1%) 
           fs: ext4 dev: /dev/nvme0n1p7 maj-min: 259:7 
Swap:      Kernel: swappiness: 15 (default 60) cache-pressure: 100 (default) 
           ID-1: swap-1 type: partition size: 313.04 GiB used: 0 KiB (0.0%) priority: -2 
           dev: /dev/nvme0n1p8 maj-min: 259:8 
Sensors:   System Temperatures: cpu: 58.9 C mobo: 58.0 C gpu: amdgpu temp: 58.0 C 
           Fan Speeds (RPM): cpu: 2400 
Repos:     Packages: note: see --pkg apt: 2672 lib: 1477 flatpak: 0 
           No active apt repos in: /etc/apt/sources.list 
           Active apt repos in: /etc/apt/sources.list.d/atom.list 
           1: deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main
           Active apt repos in: /etc/apt/sources.list.d/brave-browser-release.list 
           1: deb [arch=amd64] https://brave-browser-apt-release.s3.brave.com/ bullseye main
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://deb.debian.org/debian bullseye-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://deb.debian.org/debian bullseye main contrib non-free
           2: deb http://security.debian.org/debian-security bullseye-security main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/google-chrome.list 
           1: deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
           Active apt repos in: /etc/apt/sources.list.d/google-earth-pro.list 
           1: deb [arch=amd64] http://dl.google.com/linux/earth/deb/ stable main
           Active apt repos in: /etc/apt/sources.list.d/librewolf.list 
           1: deb [arch=amd64] http://deb.librewolf.net bullseye main
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://mxrepo.com/mx/repo/ bullseye main non-free
           2: deb http://mxrepo.com/mx/repo/ bullseye ahs
           Active apt repos in: /etc/apt/sources.list.d/vscode.list 
           1: deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main
Info:      Processes: 271 Uptime: 2h 8m wakeups: 1 Memory: 5.75 GiB used: 3.13 GiB (54.4%) 
           Init: systemd v: 247 runlevel: 5 default: 5 tool: systemctl Compilers: gcc: 10.2.1 
           alt: 10 Shell: Bash v: 5.1.4 running-in: quick-system-info-mx 
           inxi: 3.3.06 
Boot Mode: UEFI

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 2:04 pm
by Huckleberry Finn
Maybe the ownership of the launcher was changed somehow from user to root or so ...

You can check that or try to create a new launcher to see what happens ...

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 2:06 pm
by bobbee
Huckleberry Finn wrote: Thu Apr 14, 2022 2:04 pm Maybe the ownership of the launcher was changed somehow from user to root or so ...

You can check that or try to create a new launcher to see what happens ...
Where would I find those permissions? Is there a config file or maybe I can use chown or something?

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 2:09 pm
by Huckleberry Finn
Just right-click on it - Properties ..

Meanwhile, where is it? Panel? Desktop ?

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 2:10 pm
by gimcrack
I would just delete the launcher and created another one. Did you use the same username and is the file at the exact location as last time? If everything works beside that. Easy fix, by starting over. Delete/remove, than created again and it should work now.

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 2:20 pm
by bobbee
Huckleberry Finn wrote: Thu Apr 14, 2022 2:09 pm Just right-click on it - Properties ..

Meanwhile, where is it? Panel? Desktop ?
I created it in the whisker menu, and then add it to the pannel, but for right now I'm just doing wisker menu.

That gave me an idea, put a launcher on the desktop so that I could do as you say.

Image

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 2:37 pm
by bobbee
gimcrack wrote: Thu Apr 14, 2022 2:10 pm I would just delete the launcher and created another one. Did you use the same username and is the file at the exact location as last time? If everything works beside that. Easy fix, by starting over. Delete/remove, than created again and it should work now.
Hmm, new launcher, same issue

I did use the same username, all files are at the same locations. Using the same bashrc and same paths
And I use full path file locations, and double checked them.

I also tried making one on the desktop and changing permissions to allow all, my username, a users group and everyone.

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 2:43 pm
by bobbee
Image

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 2:48 pm
by bobbee
It seems to me, the problem shouldn't be with the launcher exactly but either the which terminal that it runs or the settings that it uses when running the terminal.

Because the launcher launches the program just fine, terminal opens, but once the app is opened then the issues.

edit:

can a guy change the settings of the terminal that the launcher uses?

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 2:51 pm
by Huckleberry Finn
Any difference bw. commands in Terminal? Say, one with sudo, one without .. ( in terminal, only newsboat ? )

You can also put that command in "Session and Startup" - "App. Autostart" tab and see what happens if it starts automatically ..

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 2:58 pm
by bobbee
Huckleberry Finn wrote: Thu Apr 14, 2022 2:51 pm Any difference bw. commands in Terminal? Say, one with sudo, one without ..

You can also put that command in "Session and Startup" - "App. Autostart tab" and see what happens if it starts automatically ..
I can run it in a normal terminal. Not with sudo, just with my regular access. and it all works good.
I hesitate to try it with sudo, because that could cause allot more problems if when applications start and write config files as root.

So currently, the access permissions are good to run everything as a normal non-root user.

I haven't fiddled with session start ups so I''m unfamiliar with it, but I could try.

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 3:04 pm
by Huckleberry Finn
Yes, what you do is correct, go on with normal user.. I just wondered if there were any differences when using the command within the terminal...

Don't worry for the Autostart, it's almost the same: just click the + icon (on bottom-left corner) to add new , the rest is the same, as you already know.. You can try 1 boot then remove (just out of curiosity)..

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 3:10 pm
by bobbee
So I opened the launcher and I opened a regular terminal with ctrl alt t and checked the terminal versions and they look identical xfce4-terminal and same version.

It's very strange that they would not work the same.

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 3:20 pm
by Huckleberry Finn
What if you un-check "run in terminal" ? (Right-click - Properties - "Launcher" tab)

You can also (just to test) create a new user with "MX User Manager" , then login with that and try there.. (this is just for you said it was working via launcher previously.. so , there must be something else.. other than commands etc..)

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 3:45 pm
by dolphin_oracle
I would like to see the actual error message when apps don't launch. I find it hard to believe there is a permission issue.

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 3:54 pm
by bobbee
Huckleberry Finn wrote: Thu Apr 14, 2022 3:20 pm What if you un-check "run in terminal" ? (Right-click - Properties - "Launcher" tab)

You can also (just to test) create a new user with "MX User Manager" , then login with that and try there.. (this is just for you said it was working via launcher previously.. so , there must be something else.. other than commands etc..)
I knew before i tried it, that not launching in terminal would not run at all as it is a terminal ap. But I tried it anyway with the expected results.

That with trying creating a new user.. that I did too.
Anyway, after configuring,

Running it in terminal in the new acount gave the same results as running it from a launcher, but this time the terminal window dd not close.

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 3:57 pm
by bobbee
dolphin_oracle wrote: Thu Apr 14, 2022 3:45 pm I would like to see the actual error message when apps don't launch. I find it hard to believe there is a permission issue.
I couldn't copy them before because the launcher would close the term automatically upon exit, but since I got the same results elsewhere, maybe I can past them here.

One minute will switch users and open a browser.

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 4:04 pm
by bobbee
dolphin_oracle wrote: Thu Apr 14, 2022 3:45 pm I would like to see the actual error message when apps don't launch. I find it hard to believe there is a permission issue.

Code: Select all

oading URLs from /home/test/.newsboat/urls...done.
Loading articles from cache...done.
[ytdl_hook] /usr/bin/env: ‘python’: No such file or directory 
[ytdl_hook] youtube-dl failed: not found or not enough permissions 
Failed to recognize file format.


Exiting... (Errors when loading file)
[ytdl_hook] /usr/bin/env: ‘python’: No such file or directory 
[ytdl_hook] youtube-dl failed: not found or not enough permissions 
Failed to recognize file format.
I has these and some other errors with mpv and stuff.
In order to see them before, I did a screen recording that I could pause. It was still hard to read.
Maybe I'll do a screen cap of that and post that too.

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 4:14 pm
by bobbee
dolphin_oracle wrote: Thu Apr 14, 2022 3:45 pm I would like to see the actual error message when apps don't launch. I find it hard to believe there is a permission issue.
Screen cap of the video capture
Image

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 4:17 pm
by dolphin_oracle
do the mpv videos play?

it looks like the format of the strings being passed to start mpv are not valid.

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 4:19 pm
by bobbee
dolphin_oracle wrote: Thu Apr 14, 2022 4:17 pm do the mpv videos play?

it looks like the format of the strings being passed to start mpv are not valid.
They do run from terminal in my regular account.

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 4:27 pm
by Huckleberry Finn
The only confusing thing is they start normally when it's launched within terminal.

Maybe this works:

Code: Select all

sudo ln -s /usr/bin/python3 /usr/bin/python

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 4:41 pm
by bobbee
Huckleberry Finn wrote: Thu Apr 14, 2022 4:27 pm Maybe this works:

Code: Select all

sudo ln -s /usr/bin/python3 /usr/bin/python
I had my doubts about that symbolic link working.

But it did.

Thank you all for the help.

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 4:45 pm
by Huckleberry Finn
:number1:

I notice just now that there's no link for python here, too:

Code: Select all

$ ll /usr/bin/pytho*
lrwxrwxrwx 1 root root    9 Nis  5  2021 /usr/bin/python3 -> python3.9
-rwxr-xr-x 1 root root 5,3M Şub 28  2021 /usr/bin/python3.9
(On MX 21 ... but it's normal on MX 19.4)

Re: Permission on terminal from Launcher  [Solved]

Posted: Thu Apr 14, 2022 4:50 pm
by Huckleberry Finn
So, after the command it shows

Code: Select all

$ ll /usr/bin/pytho*
lrwxrwxrwx 1 root root   16 Nis 14 23:46 /usr/bin/python -> /usr/bin/python3
lrwxrwxrwx 1 root root    9 Nis  5  2021 /usr/bin/python3 -> python3.9
-rwxr-xr-x 1 root root 5,3M Şub 28  2021 /usr/bin/python3.9
In case you feel it's solved:

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 4:53 pm
by bobbee
I will check that out.
Also I thought youtube-dl was a python 2 app.

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 5:01 pm
by Huckleberry Finn
It's also possible to install python2.7-minimal then link that one (in case needed).

Re: Permission on terminal from Launcher

Posted: Thu Apr 14, 2022 5:06 pm
by bobbee
Huckleberry Finn wrote: Thu Apr 14, 2022 5:01 pm It's also possible to install python2.7-minimal then link that one (in case needed).
If I don't have python 2, I will be installing it, lots of things still use it.
Plus I am trying to learn django which uses is python dependent.
If I had gone ahead and installed that, I might not have even had this issue.

Thanks, I did mark this as solved.

It is working after all.