xfce-session without panels on cygwin - cygwin

My cygwin workflow is as follows
Run XServer
Start xfce session (by running xfce4-session)
Start xfce4-terminal
Everything works well, except that xfce4-session seems to bring up an empty floating-panel, which I'm unable to hide without killing the session itself. Is there a way to configure xfce so this panel doesn't get shown?
PS: Running xfce4-terminal by itself gives me the terminal emulator, but the terminal behaves nicer when xfce4-session is active--text is anti-aliased, icons are slicker, etc.

Try killing just the panel process itself:
killall xfce4-panel

I believe the right way to start xfce is running /usr/bin/startxfce4.
If you want to run it the way you are, perhaps you could right click on the panel and click remove to get rid of it.
xfwm4 is the Window Manager, xfce-session is the session manager which "Restores your session on startup and allows you to shutdown the computer from Xfce."

I just found out that running xfsettingsd will load the XFCE theme and settings.
Using that command you can initiate the XFCE configuration without running the full desktop environment.
xfsettingsd &; xfce4-terminal;

Related

Chromedriver closes after running nohup on google cloud

I have got a simple script which uses selenium and chromedriver. I have installed the chrome. When I run the script using the command nohup python3.7 -u main.py & tail -f nohup.out everything works; script works as it should. When I close the window of the google cloud ssh the scripts stop working. When I reopen the ssh and call tail -f nohup.out I receive such an error
selenium.common.exceptions.WebDriverException: Message: chrome not reachable
(Session info: headless chrome=75.0.3770.142)
I was using the chrome version 87 and read that downgrading it should help, so I downgrade it to 75.
It is run on ubuntu, chrome and chromedriver version are 75. Is there such a command that would make chromedriver not close after closing the ssh window?
You can start processes in background in Linux. They will continue running even when you log off (which closing SSH window essentially is).
There are several ways:
Using bg & disown - as described here
Using screen as described here
You can go through entire thread to get more ideas. I'd recommend using bg & disown - it works well on Ubuntu provided by GCP however you can try out various solutions and pick the one that suits your needs the best.
From my experience - I was using screen for many things - including virtualbox and it worked - it may be more cumbersome if you want many processes to run in background but if that's just one its pretty easy.
Install screen: sudo apt install screen, run it with screen and treat it as another screen, run whatever you want and then just press ctrl + a d and you will be back to "original" shell. If you want to resume yor screen sessions type screen -r. You will find even more about using screen here.

There is an instance of anaconda navigator already running error

Previously my anaconda navigator was not responding so I have rebooted my computer and now when I am trying to open anaconda navigator it pop-ups an error with "there is an instance of anaconda navigator already running".
OS: Windows 10
I met the same problem a few days ago. I found the anaconda navigator will start a process called pythonw. So the following is my solution:
open a cmd window;
use command tasklist | findstr "pythonw" to find the pid of pythonw, like 37200;
use command tskill 37200 to kill the process.
By the way, my OS is Windows.
I got the same error in MAC. logoff & login did not resolve the issue and the below command solved my issue in mac. Restart not required.
killall python
1.In anaconda prompt
$ anaconda-navigator --reset
$ anaconda-navigator
one of the following will solve your issue in ubuntu:
killall Anaconda-Navigator
anaconda-navigator --reset
[With images] The instructions Below works flawlessly in Windows 10.
Run CMD (command prompt) with administrator privileges
Run the following command,
tasklist | findstr "pythonw"
Lastly, after identifying process ID run this command to kill the process,
taskkill /f /pid <PID NUMBER>
Happy Learning :):)
I got the same problem on windows 10, and all the previous answers and commands to taskkill didn't work and gave me the error "Access denied".
I found out that when you turn off your computer in windows 10, by default it doesn't really turn off but instead it hibernates, so it doesn't really "kill" all the tasks running.
Therefore my solution:
Go to Windows Start Menu, select _Settings > System > Power & sleep > Additional power settings > Chose what the power button does.
Under Power button settings, tap the setting bar, choose the option "Shut down".
Click on "Change settings that are currently unavailable", and uncheck the "Turn on fast startup" box.
Click on save changes.
Now Restart your computer.
This will successfully kill all running tasks, including pythonw, and hopefully solve your problem.
The following steps worked for me in windows.
You can do the following.
tasklist | findstr "pythonw"
The PID of the processes will get displayed.
taskkill /pid "PID" (without quotes) /f
This will successfully kill the Anaconda Navigator task.
We can use either of below options to resolve the issue.
1. tasklist | findstr "pythonw"
tskill <pid>
2. Also we can End the task names 'Python' from Task Manager.
Now open the Anaconda Navigator again. It may take a while to open.
I used these processes and it solved my problem :)
open task manager > click processes on the menu > click on "pythonw" > click End process
is may solve your problem
For those who killed the Python processes but the GUI still doesn't show, for me the .condarc file was missing in my user folder... so I created the .condarc file and left it blank, killed the python process, then relaunched and it worked.
My issue was after installing for the first time
I loaded Process Hacker software on Windows 10 and in this software, I search for pythons.exe process, right click and select Terminate. This software is freeware. I am trying to help those who don’t want to type dos command.
Here is the step you can use to solve this issue quickly.
Open Task Manager or use shortcut key Ctrl+Shift+Esc.
Find Python process in the list.
Kill those processes by clicking on it and click End task.
Then open Anaconda Navigator again.

Megasync does not autostart

I installed the ubuntu(14.04 VirtualBox) version of megasync along with the nautilus extension. I typed "megasync" in my console, logged into my account, enabled autostart. But upon closing the console megasync just closes and when I restart the OS megasync does not start itself up.
Megasync is included in the startup options with command "megasync".
Note, I just installed Ubuntu and have no previous experience with Linux so this might be just a misunderstanding from my side, but I am helpless right now.
I also had problems with autostart. In my case it was a prolem with permissions (megasync was not marked as executale), but I don't think yours is the same.
You can give it a try: sudo chmod +x /usr/bin/megasync
Or just run a script I've created to run multiple instances.
1) Log out from the session
2) Download and run my script MEGA-Instances and follow the guide.

Automaticly run xinit from rc.local as different user

I'm working on some tuning of my raspberry. So I decided that midori should start automaticly after autologin.
With startx it works without problems, but X is still to ressource hungry. So I'll start midori with xinit and matchbox.
As test, I use as user "pi" this command "xinit ./home/pi/startmidori.sh" and it works.
So I'll put this into my rc.local file.
There is the command "su -l pi -c xinit ./home/pi/startmidori.sh", this doesn't work. I don't know why, but xinit exit immediately after starting.
How can I solve this? In guides I find this kind of solution, but for it doesn't work. I tryed to run it as root but it doesn't work, too. I've no idea why.
Check this for more information: Running X from The X Window User HOWTO
In general you always need a wrapper and you must run X with root, since it needs raw access to hardware devices.
So I suggest you to install lightweight display manager like LightDM if possible it has almost no footprint and then easy you can set it up to auto login with desired user and run desired window manager like matchbox in your case.

Using script to automatically start program when the system boot up (linux, shell)

Here is the situation, I'm planning to use a simple script to start a program call "STAF", when the Suse system is fully booted. I have achieved this by putting it in the "/etc/init.d/", but this script is basically executed at the background, which means that I cannot see its progress.
When the "STAF" is started this way it works but it doesn't show any working progress when its running service (for example ping, or system backup), instead if I start the "STAF" manually by running the same script whit a terminal, the working progress of "STAF" can be seen on the terminal. Its sort of like the program needs to be started with a interactive terminal, but how can I make this starting process automatic and it should imitate human opening a terminal and run the script?
Sorry if I explained it poorly because its a confusing situation. Thanks.
First, go to the KDE Startup and Shutdown options under System Settings. Then add this command as a new startup script:
konsole -e bash nameofyourscript.sh
I believe the screen utility can do what you describe. Instead of running STAF on startup, you would run screen STAF. To open that terminal, you would run screen -ls to get the screen ID, and screen -r ... to open it.
(Disclaimer: I have not tried this.)

Resources